<?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=Aravich6</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=Aravich6"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Aravich6"/>
	<updated>2026-08-06T21:05:43Z</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_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117316</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117316"/>
		<updated>2018-05-03T00:14:04Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
#Allowing Instructor to create new badges - which involves adding name and badge image and letting the instructor add them to the assignment&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Reviewer&amp;quot; badges, for reviews received.&lt;br /&gt;
#Create a pipeline to enable instructor to manually approve badges suggested by students&lt;br /&gt;
&lt;br /&gt;
= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest ''Good Teammate'' and ''Good Reviewer'' badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Design Description =&lt;br /&gt;
The following steps briefly describe the implementation steps taken during the course of this project. Two major flows exist in this project , one being new badge creation and associating them with the assignment. Second one is modifying the flow for good teammate and reviewer badges to be present in appropriate question section.  &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
To add a new badge which is a new functionality,  we display a button, at the end of the badges tab, which redirects the user to a page enabling him to create a New badge. The new form fields include ''Badge Name'', ''Image'' and ''Description''. Upon saving the user is again redirected back to the earlier assignments display display.&lt;br /&gt;
&lt;br /&gt;
[[File:New Badge.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Adding Badges to Assignments ==&lt;br /&gt;
&lt;br /&gt;
We change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. The view is changed to display all the available badges and a check box to select each of them. It was initially present as a badge vs threshold display. Once the user clicks save, entries are modified in the data base. &lt;br /&gt;
[[File:Badges list.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of this badges is done automatically based on a threshold, which is set during assignment creation. The score is calculated based on answers to questions on the review page.&lt;br /&gt;
 &lt;br /&gt;
In this implementation, the earlier flow was changed to allow participant to be able to suggest these badges to their fellow students. To enable this process, a new question in the format of a checkbox, was added into the teammate review questionnaire. This question appears after the Additional Comments section.&lt;br /&gt;
&lt;br /&gt;
Upon selection of this check box an entry is made into the assigned badges table with the participant id and approval status being 0, implying that it is pending with the instructor, for approval before displaying. &lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review_new.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Similar to Good Teammate badge, in the existing workflow, good reviewer was also assigned based on score and threshold. This is modified in our implementation, in a similar way as that of teammate badge. We add a &amp;quot;Good Reviewer check box&amp;quot; as a question in the feedback of the reviews given page. An entry is made to the awarded badges table with the approval status as 0. Once this field is changed to 1, it would display badges in the assignment row .&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewer-badge.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. A db migrate was run to include this column.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded Badges.png|center]]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
== Files modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/assignment_badge.rb - create badges without threshold method was added&lt;br /&gt;
*  expertiza/app/models/assignment_form.rb - update assigned badges method was added. this method modifies the db entries for assignment_badges table based on the checkbox entries&lt;br /&gt;
* expertiza/app/models/awarded_badge.rb - suggest badge method was added, which is called when badge is suggested by student by checking the checkbox in questioner. &lt;br /&gt;
* expertiza/app/models/badge.rb - functionality to get image name from name was added&lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*   expertiza/app/controllers/assignments_controller.rb - Modifications were done to include the functionality of displaying all badges in the badges tab and check box based selection process &lt;br /&gt;
*  expertiza/app/controllers/badges_controller.rb - This was a new file added in this implementation . Code on handling new badge creation, in create method was added. &lt;br /&gt;
* expertiza/app/controllers/response_controller.rb -  Modification to process question responses from checkbox about badges were added to this file&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb - Modification to display all available badges to badges tab as checkbox was done. Also a link to creating a new badge is provided&lt;br /&gt;
* expertiza/app/views/badges/new.html.erb - New file to create a new badge was added to this file&lt;br /&gt;
* expertiza/app/views/badges/_form.html.erb - New file to create a form for  badge was added to this file&lt;br /&gt;
* expetiza/app/views/response/response.html.erb - Modification to display checkbox questions in review questioner was added to this file&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== Routes===&lt;br /&gt;
* Routes for badges was added&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
New rspec file was added in spec/models/badge_spec.rb. Test cases were written to validate the different conditions of creating a new badge. Here are the test cases:&lt;br /&gt;
&lt;br /&gt;
1. it is valid when it has a name, description and image name&lt;br /&gt;
&lt;br /&gt;
2. it is invalid when it does not have a name&lt;br /&gt;
&lt;br /&gt;
3. it is invalid when it does not have a description&lt;br /&gt;
&lt;br /&gt;
4. it is invalid when it does not have an image name&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
#The approval workflow is currently missing - when a student assigns a badge to a peer, the approval status is set to 0 and it will never appear in the other student’s homepage. Workflow to change the status by the instructor must be implemented. &lt;br /&gt;
#There is currently no way for a newly created badge to be assigned to a student through the UI, even if it has been added to an assignment. This needs to be implemented.&lt;br /&gt;
#Instructors cannot directly assign “Good Reviewer” badge through the UI. A separate flow to enable instructors to do that would be useful&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1176 Pull Request for present implementation] &lt;br /&gt;
#[https://youtu.be/GZrZTBlH7GQ Link to Screen-cast of our implementation]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117315</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117315"/>
		<updated>2018-05-03T00:13:42Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
#Allowing Instructor to create new badges - which involves adding name and badge image and letting the instructor add them to the assignment&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Reviewer&amp;quot; badges, for reviews received.&lt;br /&gt;
#Create a pipeline to enable instructor to manually approve badges suggested by students&lt;br /&gt;
&lt;br /&gt;
= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest ''Good Teammate'' and ''Good Reviewer'' badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Design Description =&lt;br /&gt;
The following steps briefly describe the implementation steps taken during the course of this project. Two major flows exist in this project , one being new badge creation and associating them with the assignment. Second one is modifying the flow for good teammate and reviewer badges to be present in appropriate question section.  &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
To add a new badge which is a new functionality,  we display a button, at the end of the badges tab, which redirects the user to a page enabling him to create a New badge. The new form fields include ''Badge Name'', ''Image'' and ''Description''. Upon saving the user is again redirected back to the earlier assignments display display.&lt;br /&gt;
&lt;br /&gt;
[[File:New Badge.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Adding Badges to Assignments ==&lt;br /&gt;
&lt;br /&gt;
We change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. The view is changed to display all the available badges and a check box to select each of them. It was initially present as a badge vs threshold display. Once the user clicks save, entries are modified in the data base. &lt;br /&gt;
[[File:Badges list.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of this badges is done automatically based on a threshold, which is set during assignment creation. The score is calculated based on answers to questions on the review page.&lt;br /&gt;
 &lt;br /&gt;
In this implementation, the earlier flow was changed to allow participant to be able to suggest these badges to their fellow students. To enable this process, a new question in the format of a checkbox, was added into the teammate review questionnaire. This question appears after the Additional Comments section.&lt;br /&gt;
&lt;br /&gt;
Upon selection of this check box an entry is made into the assigned badges table with the participant id and approval status being 0, implying that it is pending with the instructor, for approval before displaying. &lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review_new.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Similar to Good Teammate badge, in the existing workflow, good reviewer was also assigned based on score and threshold. This is modified in our implementation, in a similar way as that of teammate badge. We add a &amp;quot;Good Reviewer check box&amp;quot; as a question in the feedback of the reviews given page. An entry is made to the awarded badges table with the approval status as 0. Once this field is changed to 1, it would display badges in the assignment row .&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewer-badge.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. A db migrate was run to include this column.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded Badges.png|center]]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
== Files modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/assignment_badge.rb - create badges without threshold method was added&lt;br /&gt;
*  expertiza/app/models/assignment_form.rb - update assigned badges method was added. this method modifies the db entries for assignment_badges table based on the checkbox entries&lt;br /&gt;
* expertiza/app/models/awarded_badge.rb - suggest badge method was added, which is called when badge is suggested by student by checking the checkbox in questioner. &lt;br /&gt;
* expertiza/app/models/badge.rb - functionality to get image name from name was added&lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*   expertiza/app/controllers/assignments_controller.rb - Modifications were done to include the functionality of displaying all badges in the badges tab and check box based selection process &lt;br /&gt;
*  expertiza/app/controllers/badges_controller.rb - This was a new file added in this implementation . Code on handling new badge creation, in create method was added. &lt;br /&gt;
* expertiza/app/controllers/response_controller.rb -  Modification to process question responses from checkbox about badges were added to this file&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb - Modification to display all available badges to badges tab as checkbox was done. Also a link to creating a new badge is provided&lt;br /&gt;
* expertiza/app/views/badges/new.html.erb - New file to create a new badge was added to this file&lt;br /&gt;
* expertiza/app/views/badges/_form.html.erb - New file to create a form for  badge was added to this file&lt;br /&gt;
* expetiza/app/views/response/response.html.erb - Modification to display checkbox questions in review questioner was added to this file&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== Routes===&lt;br /&gt;
* Routes for badges was added&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
New rspec file was added in spec/models/badge_spec.rb. Test cases were written to validate the different conditions of creating a new badge. Here are the test cases:&lt;br /&gt;
&lt;br /&gt;
1. it is valid when it has a name, description and image name&lt;br /&gt;
&lt;br /&gt;
2. it is invalid when it does not have a name&lt;br /&gt;
&lt;br /&gt;
3. it is invalid when it does not have a description&lt;br /&gt;
&lt;br /&gt;
4. it is invalid when it does not have an image name&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
#The approval workflow is currently missing - when a student assigns a badge to a peer, the approval status is set to 0 and it will never appear in the other student’s homepage. Workflow to change the status by the instructor must be implemented. &lt;br /&gt;
#There is currently no way for a newly created badge to be assigned to a student through the UI, even if it has been added to an assignment. This needs to be implemented.&lt;br /&gt;
#Instructors cannot directly assign “Good Reviewer” badge through the UI. A separate flow to enable instructors to do that would be useful&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1176 Pull Request for present implementation] &lt;br /&gt;
#[https://youtu.be/GZrZTBlH7GQ Link to Screen-cast of out implementation]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117268</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117268"/>
		<updated>2018-04-29T19:44:23Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
#Allowing Instructor to create new badges - which involves adding name and badge image and letting the instructor add them to the assignment&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Reviewer&amp;quot; badges, for reviews received.&lt;br /&gt;
#Create a pipeline to enable instructor to manually approve badges suggested by students&lt;br /&gt;
&lt;br /&gt;
= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest ''Good Teammate'' and ''Good Reviewer'' badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Design Description =&lt;br /&gt;
The following steps briefly describe the implementation steps taken during the course of this project. Two major flows exist in this project , one being new badge creation and associating them with the assignment. Second one is modifying the flow for good teammate and reviewer badges to be present in appropriate question section.  &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
To add a new badge which is a new functionality,  we display a button, at the end of the badges tab, which redirects the user to a page enabling him to create a New badge. The new form fields include ''Badge Name'', ''Image'' and ''Description''. Upon saving the user is again redirected back to the earlier assignments display display.&lt;br /&gt;
&lt;br /&gt;
[[File:New Badge.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Adding Badges to Assignments ==&lt;br /&gt;
&lt;br /&gt;
We change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. The view is changed to display all the available badges and a check box to select each of them. It was initially present as a badge vs threshold display. Once the user clicks save, entries are modified in the data base. &lt;br /&gt;
[[File:Badges list.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of this badges is done automatically based on a threshold, which is set during assignment creation. The score is calculated based on answers to questions on the review page.&lt;br /&gt;
 &lt;br /&gt;
In this implementation, the earlier flow was changed to allow participant to be able to suggest these badges to their fellow students. To enable this process, a new question in the format of a checkbox, was added into the teammate review questionnaire. This question appears after the Additional Comments section.&lt;br /&gt;
&lt;br /&gt;
Upon selection of this check box an entry is made into the assigned badges table with the participant id and approval status being 0, implying that it is pending with the instructor, for approval before displaying. &lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review_new.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Similar to Good Teammate badge, in the existing workflow, good reviewer was also assigned based on score and threshold. This is modified in our implementation, in a similar way as that of teammate badge. We add a &amp;quot;Good Reviewer check box&amp;quot; as a question in the feedback of the reviews given page. An entry is made to the awarded badges table with the approval status as 0. Once this field is changed to 1, it would display badges in the assignment row .&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewer-badge.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. A db migrate was run to include this column.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded Badges.png|center]]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
== Files modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/assignment_badge.rb - create badges without threshold method was added&lt;br /&gt;
*  expertiza/app/models/assignment_form.rb - update assigned badges method was added. this method modifies the db entries for assignment_badges table based on the checkbox entries&lt;br /&gt;
* expertiza/app/models/awarded_badge.rb - suggest badge method was added, which is called when badge is suggested by student by checking the checkbox in questioner. &lt;br /&gt;
* expertiza/app/models/badge.rb - functionality to get image name from name was added&lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*   expertiza/app/controllers/assignments_controller.rb - Modifications were done to include the functionality of displaying all badges in the badges tab and check box based selection process &lt;br /&gt;
*  expertiza/app/controllers/badges_controller.rb - This was a new file added in this implementation . Code on handling new badge creation, in create method was added. &lt;br /&gt;
* expertiza/app/controllers/response_controller.rb -  Modification to process question responses from checkbox about badges were added to this file&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb - Modification to display all available badges to badges tab as checkbox was done. Also a link to creating a new badge is provided&lt;br /&gt;
* expertiza/app/views/badges/new.html.erb - New file to create a new badge was added to this file&lt;br /&gt;
* expertiza/app/views/badges/_form.html.erb - New file to create a form for  badge was added to this file&lt;br /&gt;
* expetiza/app/views/response/response.html.erb - Modification to display checkbox questions in review questioner was added to this file&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== Routes===&lt;br /&gt;
* Routes for badges was added&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
5. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
6. Check that a student cannot see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
#The approval workflow is currently missing - when a student assigns a badge to a peer, the approval status is set to 0 and it will never appear in the other student’s homepage. Workflow to change the status by the instructor must be implemented. &lt;br /&gt;
#There is currently no way for a newly created badge to be assigned to a student through the UI, even if it has been added to an assignment. This needs to be implemented.&lt;br /&gt;
#Instructors cannot directly assign “Good Reviewer” badge through the UI. A separate flow to enable instructors to do that would be useful&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1176 Pull Request for present implementation] &lt;br /&gt;
#[https://youtu.be/GZrZTBlH7GQ Link to Screen-cast of out implementation]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117197</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117197"/>
		<updated>2018-04-29T02:58:16Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
#Allowing Instructor to create new badges - which involves adding name and badge image and letting the instructor add them to the assignment&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Reviewer&amp;quot; badges, for reviews received.&lt;br /&gt;
#Create a pipeline to enable instructor to manually approve badges suggested by students&lt;br /&gt;
&lt;br /&gt;
= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest ''Good Teammate'' and ''Good Reviewer'' badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Design Description =&lt;br /&gt;
The following steps briefly describe the implementation steps taken during the course of this project. Two major flows exist in this project , one being new badge creation and associating them with the assignment. Second one is modifying the flow for good teammate and reviewer badges to be present in appropriate question section.  &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
To add a new badge which is a new functionality,  we display a button, at the end of the badges tab, which redirects the user to a page enabling him to create a New badge. The new form fields include ''Badge Name'', ''Image'' and ''Description''. Upon saving the user is again redirected back to the earlier assignments display display.&lt;br /&gt;
&lt;br /&gt;
[[File:New Badge.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Adding Badges to Assignments ==&lt;br /&gt;
&lt;br /&gt;
We change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. The view is changed to display all the available badges and a check box to select each of them. It was initially present as a badge vs threshold display. Once the user clicks save, entries are modified in the data base. &lt;br /&gt;
[[File:Badges list.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of this badges is done automatically based on a threshold, which is set during assignment creation. The score is calculated based on answers to questions on the review page.&lt;br /&gt;
 &lt;br /&gt;
In this implementation, the earlier flow was changed to allow participant to be able to suggest these badges to their fellow students. To enable this process, a new question in the format of a checkbox, was added into the teammate review questionnaire. This question appears after the Additional Comments section.&lt;br /&gt;
&lt;br /&gt;
Upon selection of this check box an entry is made into the assigned badges table with the participant id and approval status being 0, implying that it is pending with the instructor, for approval before displaying. &lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review_new.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Similar to Good Teammate badge, in the existing workflow, good reviewer was also assigned based on score and threshold. This is modified in our implementation, in a similar way as that of teammate badge. We add a &amp;quot;Good Reviewer check box&amp;quot; as a question in the feedback of the reviews given page. An entry is made to the awarded badges table with the approval status as 0. Once this field is changed to 1, it would display badges in the assignment row .&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewer-badge.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. A db migrate was run to include this column.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded Badges.png|center]]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
== Files modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/assignment_badge.rb - create badges without threshold method was added&lt;br /&gt;
*  expertiza/app/models/assignment_form.rb - update assigned badges method was added. this method modifies the db entries for assignment_badges table based on the checkbox entries&lt;br /&gt;
* expertiza/app/models/awarded_badge.rb - suggest badge method was added, which is called when badge is suggested by student by checking the checkbox in questioner. &lt;br /&gt;
* expertiza/app/models/badge.rb - functionality to get image name from name was added&lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*   expertiza/app/controllers/assignments_controller.rb - Modifications were done to include the functionality of displaying all badges in the badges tab and check box based selection process &lt;br /&gt;
*  expertiza/app/controllers/badges_controller.rb - This was a new file added in this implementation . Code on handling new badge creation, in create method was added. &lt;br /&gt;
* expertiza/app/controllers/response_controller.rb -  Modification to process question responses from checkbox about badges were added to this file&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb - Modification to display all available badges to badges tab as checkbox was done. Also a link to creating a new badge is provided&lt;br /&gt;
* expertiza/app/views/badges/new.html.erb - New file to create a new badge was added to this file&lt;br /&gt;
* expertiza/app/views/badges/_form.html.erb - New file to create a form for  badge was added to this file&lt;br /&gt;
* expetiza/app/views/response/response.html.erb - Modification to display checkbox questions in review questioner was added to this file&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== Routes===&lt;br /&gt;
* Routes for badges was added&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
#The approval workflow is currently missing - when a student assigns a badge to a peer, the approval status is set to 0 and it will never appear in the other student’s homepage. Workflow to change the status by the instructor must be implemented. &lt;br /&gt;
#There is currently no way for a newly created badge to be assigned to a student through the UI, even if it has been added to an assignment. This needs to be implemented.&lt;br /&gt;
#Instructors cannot directly assign “Good Reviewer” badge through the UI. A separate flow to enable instructors to do that would be useful&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1176 Pull Request for present implementation] &lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;br /&gt;
#[https://youtu.be/GZrZTBlH7GQ Link to Screencast]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117169</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=117169"/>
		<updated>2018-04-29T01:38:39Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Future Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
#Allowing Instructor to create new badges - which involves adding name and badge image and letting the instructor add them to the assignment&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
#Students must be able to suggest &amp;quot;Good Reviewer&amp;quot; badges, for reviews received.&lt;br /&gt;
#Create a pipeline to enable instructor to manually approve badges suggested by students&lt;br /&gt;
&lt;br /&gt;
= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest ''Good Teammate'' and ''Good Reviewer'' badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Design Description =&lt;br /&gt;
The following steps briefly describe the implementation steps taken during the course of this project. Two major flows exist in this project , one being new badge creation and associating them with the assignment. Second one is modifying the flow for good teammate and reviewer badges to be present in appropriate question section.  &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
To add a new badge which is a new functionality,  we display a button, at the end of the badges tab, which redirects the user to a page enabling him to create a New badge. The new form fields include ''Badge Name'', ''Image'' and ''Description''. Upon saving the user is again redirected back to the earlier assignments display display.&lt;br /&gt;
&lt;br /&gt;
[[File:New Badge.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Adding Badges to Assignments ==&lt;br /&gt;
&lt;br /&gt;
We change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. The view is changed to display all the available badges and a check box to select each of them. It was initially present as a badge vs threshold display. Once the user clicks save, entries are modified in the data base. &lt;br /&gt;
[[File:Badges list.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of this badges is done automatically based on a threshold, which is set during assignment creation. The score is calculated based on answers to questions on the review page.&lt;br /&gt;
 &lt;br /&gt;
In this implementation, the earlier flow was changed to allow participant to be able to suggest these badges to their fellow students. To enable this process, a new question in the format of a checkbox, was added into the teammate review questionnaire. This question appears after the Additional Comments section.&lt;br /&gt;
&lt;br /&gt;
Upon selection of this check box an entry is made into the assigned badges table with the participant id and approval status being 0, implying that it is pending with the instructor, for approval before displaying. &lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review_new.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Similar to Good Teammate badge, in the existing workflow, good reviewer was also assigned based on score and threshold. This is modified in our implementation, in a similar way as that of teammate badge. We add a &amp;quot;Good Reviewer check box&amp;quot; as a question in the feedback of the reviews given page. An entry is made to the awarded badges table with the approval status as 0. Once this field is changed to 1, it would display badges in the assignment row .&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewer-badge.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. A db migrate was run to include this column.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
== Files modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/assignment_badge.rb - create badges without threshold method was added&lt;br /&gt;
*  expertiza/app/models/assignment_form.rb - update assigned badges method was added. this method modifies the db entries for assignment_badges table based on the checkbox entries&lt;br /&gt;
* expertiza/app/models/awarded_badge.rb - suggest badge method was added, which is called when badge is suggested by student by checking the checkbox in questioner. &lt;br /&gt;
* expertiza/app/models/badge.rb - functionality to get image name from name was added&lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*   expertiza/app/controllers/assignments_controller.rb - Modifications were done to include the functionality of displaying all badges in the badges tab and check box based selection process &lt;br /&gt;
*  expertiza/app/controllers/badges_controller.rb - This was a new file added in this implementation . Code on handling new badge creation, in create method was added. &lt;br /&gt;
* expertiza/app/controllers/response_controller.rb -  Modification to process question responses from checkbox about badges were added to this file&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb - Modification to display all available badges to badges tab as checkbox was done. Also a link to creating a new badge is provided&lt;br /&gt;
* expertiza/app/views/badges/new.html.erb - New file to create a new badge was added to this file&lt;br /&gt;
* expertiza/app/views/badges/_form.html.erb - New file to create a form for  badge was added to this file&lt;br /&gt;
* expetiza/app/views/response/response.html.erb - Modification to display checkbox questions in review questioner was added to this file&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== Routes===&lt;br /&gt;
* Routes for badges was added&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
#The approval workflow is currently missing - when a student assigns a badge to a peer, the approval status is set to 0 and it will never appear in the other student’s homepage. Workflow to change the status by the instructor must be implemented. &lt;br /&gt;
#There is currently no way for a newly created badge to be assigned to a student through the UI, even if it has been added to an assignment. This needs to be implemented.&lt;br /&gt;
#Instructors cannot directly assign “Good Reviewer” badge through the UI. A separate flow to enable instructors to do that would be useful&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1176 Pull Request for present implementation] &lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116628</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116628"/>
		<updated>2018-04-14T02:34:13Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest ''Good Teammate'' and ''Good Reviewer'' badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/awarded_badge.rb &lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*    expertiza/app/controllers/badge_controller.rb (to be added)&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb&lt;br /&gt;
*	expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
*	expertiza/app/views/review_mapping/_review_report.html.erb&lt;br /&gt;
*       expertiza/app/views/student_task/list.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_badge.html.erb&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_approve_badge.html.erb&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116627</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116627"/>
		<updated>2018-04-14T02:34:06Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background And Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/awarded_badge.rb &lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*    expertiza/app/controllers/badge_controller.rb (to be added)&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb&lt;br /&gt;
*	expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
*	expertiza/app/views/review_mapping/_review_report.html.erb&lt;br /&gt;
*       expertiza/app/views/student_task/list.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_badge.html.erb&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_approve_badge.html.erb&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116626</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116626"/>
		<updated>2018-04-14T02:33:43Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Previous Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest ''Good Teammate'' and ''Good Reviewer'' badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/awarded_badge.rb &lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*    expertiza/app/controllers/badge_controller.rb (to be added)&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb&lt;br /&gt;
*	expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
*	expertiza/app/views/review_mapping/_review_report.html.erb&lt;br /&gt;
*       expertiza/app/views/student_task/list.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_badge.html.erb&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_approve_badge.html.erb&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116619</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116619"/>
		<updated>2018-04-14T02:23:33Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Controllers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/awarded_badge.rb &lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
*    expertiza/app/controllers/badge_controller.rb (to be added)&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb&lt;br /&gt;
*	expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
*	expertiza/app/views/review_mapping/_review_report.html.erb&lt;br /&gt;
*       expertiza/app/views/student_task/list.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_badge.html.erb&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_approve_badge.html.erb&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116618</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116618"/>
		<updated>2018-04-14T02:22:35Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Controllers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/awarded_badge.rb &lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
We will need to add a new controller for badge&lt;br /&gt;
&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb&lt;br /&gt;
*	expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
*	expertiza/app/views/review_mapping/_review_report.html.erb&lt;br /&gt;
*       expertiza/app/views/student_task/list.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_badge.html.erb&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_approve_badge.html.erb&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116617</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116617"/>
		<updated>2018-04-14T02:20:09Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Expertiza */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name, description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Usecase Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
*       expertiza/app/models/awarded_badge.rb &lt;br /&gt;
&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
=== Views ===&lt;br /&gt;
*	expertiza/app/views/assignments/edit/_badges.html.erb&lt;br /&gt;
*	expertiza/app/views/student_teams/view.html.erb&lt;br /&gt;
*	expertiza/app/views/review_mapping/_review_report.html.erb&lt;br /&gt;
*       expertiza/app/views/student_task/list.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
*       Add a new column 'approval_status' in the awarded_badges table&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_badge.html.erb&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_approve_badge.html.erb&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116159</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116159"/>
		<updated>2018-04-06T15:02:38Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name m description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Flowchart ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
Here are some tests we have in mind:&lt;br /&gt;
&lt;br /&gt;
1. Can save a badge with a valid name, description, and image.&lt;br /&gt;
&lt;br /&gt;
2. Cannot save a badge with an invalid name.&lt;br /&gt;
&lt;br /&gt;
3. Cannot save a badge with empty description.&lt;br /&gt;
&lt;br /&gt;
4. Cannot save a badge without an image path.&lt;br /&gt;
&lt;br /&gt;
5. Check that all badge names are rendered in the &amp;quot;Badges&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
6. Check that an instructor can approve student-suggested badges.&lt;br /&gt;
&lt;br /&gt;
7. Check that an approved badge is rendered on student's assignments page if it is approved.&lt;br /&gt;
&lt;br /&gt;
8. Check that a student can not see a badge on assignments page if it is not approved.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116155</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116155"/>
		<updated>2018-04-06T14:50:14Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Creation of new badges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background And Motivation =&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
==Previous Implementation==&lt;br /&gt;
&lt;br /&gt;
The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better.  This has the ability to improve the overall class performance. &lt;br /&gt;
&lt;br /&gt;
With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly earlier project]]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.&lt;br /&gt;
&lt;br /&gt;
The team had implemented the system, by introduction of 3 new badge related tables &lt;br /&gt;
&lt;br /&gt;
1. “badges” :- id , name m description &lt;br /&gt;
&lt;br /&gt;
2. “assignment_badges” :- id, badge_id, assignment_id, threshold&lt;br /&gt;
&lt;br /&gt;
3. “awarded_badges” :- id, badge_id,participant_id&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
4. All badges assigned, must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
2. Arunkumar Krishnamoorthy&lt;br /&gt;
&lt;br /&gt;
3. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
4. Krithika Sekhar&lt;br /&gt;
&lt;br /&gt;
Mentor:- Zhewei Hu (zhu6@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
The following steps briefly describe the implementation steps planned to be taken during the course of this project &lt;br /&gt;
&lt;br /&gt;
== Flowchart ==&lt;br /&gt;
&lt;br /&gt;
[[File:Usecase.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_good_reviewer.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Visibility of assigned badges to Students ==&lt;br /&gt;
&lt;br /&gt;
Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:badge_final_view.png|center]]&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
All new code to be added would be thoroughly tested using TDD methodology.&lt;br /&gt;
&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116105</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116105"/>
		<updated>2018-04-06T01:18:51Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Flowchart =&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116102</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116102"/>
		<updated>2018-04-06T01:13:32Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Manual assignment of &amp;quot;Good Reviewer&amp;quot; badges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Flowchart =&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the '''expertiza/app/views/review_mapping/_review_report.html.erb''' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116100</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116100"/>
		<updated>2018-04-06T01:13:06Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Creation of new badges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Flowchart =&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as specified in '''expertiza/app/views/assignments/edit/_badges.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|center|]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the ''expertiza/app/views/review_mapping/_review_report.html.erb'' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116096</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116096"/>
		<updated>2018-04-06T01:06:34Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Implementation Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Flowchart =&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|left|alt text]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the ''expertiza/app/views/review_mapping/_review_report.html.erb'' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116092</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116092"/>
		<updated>2018-04-06T01:02:16Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Manual assignment of &amp;quot;Good Reviewer&amp;quot; badges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Team_mate_review.png|200px|left|alt text]]&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
Instructors and TAs can see a review report for an assignment that they are managing as given in the ''expertiza/app/views/review_mapping/_review_report.html.erb'' view. They can add grades and comments to every reviewer. We would like to add another column to this view to allow that allows the instructor/TA to click on a checkbox to indicate if this reviewer is a &amp;quot;Good Reviewer&amp;quot;. The view we have in mind will look as follows:&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116088</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116088"/>
		<updated>2018-04-06T00:57:32Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Implementation Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of &amp;quot;Good Reviewer&amp;quot; badges ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116087</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116087"/>
		<updated>2018-04-06T00:56:37Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Approval of badges by instructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
Currently, the '''awarded_badges''' table has no column to indicate the approval status of an awarded badge. We would need to run a db migration to include this column. Also, a new view needs to be created to allow instructors to approve student-suggested badges. The view we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116086</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116086"/>
		<updated>2018-04-06T00:53:27Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Teammate&amp;quot; badges during the teammate review periods.&lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
4. Instructors and TAs must be able to manually assign &amp;quot;Good Reviewer&amp;quot; badges.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116083</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116083"/>
		<updated>2018-04-06T00:50:21Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Assignment of &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges by student */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. Initially it was automatically assigned based on pre-define score thresholdes. &lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
Presently, the assignment of these badges is done based on a threshold, which is assigned by the TA. We would like to allow students to be able to directly add these badges to their fellow students.&lt;br /&gt;
&lt;br /&gt;
In order to allow students to assign &amp;quot;Good Teammate&amp;quot; badges, the '''expertiza/app/views/student_teams/view.html.erb''' view needs to be edited. The UI we have in mind is as shown below:&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116073</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116073"/>
		<updated>2018-04-06T00:35:15Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Assignment of Good Reviewer and Good Teammate badges by student */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. Initially it was automatically assigned based on pre-define score thresholdes. &lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges by student ==&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116072</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116072"/>
		<updated>2018-04-06T00:34:44Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Implementation Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. Initially it was automatically assigned based on pre-define score thresholdes. &lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assignment of Good Reviewer and Good Teammate badges by student ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Approval of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116071</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116071"/>
		<updated>2018-04-06T00:19:57Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Creation of new badges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last previously. [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly (Previous Implementation)]].&lt;br /&gt;
&lt;br /&gt;
The primary objectives for this project are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Allowing Instructor to create new badges - which involves adding name and badge image.&lt;br /&gt;
&lt;br /&gt;
2. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. Initially it was automatically assigned based on pre-define score thresholdes. &lt;br /&gt;
&lt;br /&gt;
3. All badges assigned by students must require the approval of the instructor, who would manually accept/deny them before final posting.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
When an assignment is created/edited, there is a checkbox called ''&amp;quot;Has Badges?&amp;quot;''. Checking this renders the ''&amp;quot;Badges&amp;quot;'' tab. This tab currently lists the two available badges namely '''&amp;quot;Good Reviewer&amp;quot;''' and '''&amp;quot;Good Teammate&amp;quot;''' as ''specified in expertiza/app/views/assignments/edit/_badges.html.erb''.&lt;br /&gt;
&lt;br /&gt;
We intend to change this view to allow an instructor to add a new badge, and select all badges that will be applicable for this assignment. For this, we intend to display a link called '''&amp;quot;Add&amp;quot;''' and list all the available badges as a series checkboxes. The view we have in mind would look something similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clicking on '''&amp;quot;Add&amp;quot;''' would redirect to a new view, where there is a simple form to add a new badge. The form fields would include ''Badge Name'', ''Image'' and ''Description''.&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
== Assignment of Good Reviewer and Good Teammate badges by student ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly Previous Badge implementation page ]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116068</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116068"/>
		<updated>2018-04-06T00:06:22Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
== Assignment of Good Reviewer and Good Teammate badges by student ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
= References=&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116065</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116065"/>
		<updated>2018-04-06T00:05:25Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Background =&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
== Assignment of Good Reviewer and Good Teammate badges by student ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116064</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116064"/>
		<updated>2018-04-06T00:02:27Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Implementation Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
== Creation of new badges ==&lt;br /&gt;
&lt;br /&gt;
== Manual assignment of badges by instructor ==&lt;br /&gt;
&lt;br /&gt;
== Assignment of Good Reviewer and Good Teammate badges by student ==&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116062</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116062"/>
		<updated>2018-04-05T23:52:45Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116061</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116061"/>
		<updated>2018-04-05T23:52:32Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Statement ==&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116060</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116060"/>
		<updated>2018-04-05T23:51:57Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Implementation Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116059</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116059"/>
		<updated>2018-04-05T23:51:36Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;br /&gt;
&lt;br /&gt;
= Implementation Plan =&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116055</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116055"/>
		<updated>2018-04-05T23:11:47Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116054</id>
		<title>CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1822:_Extend_the_functionality_of_badging&amp;diff=116054"/>
		<updated>2018-04-05T23:11:28Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: Created page with &amp;quot;= Problem Statement = The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Problem Statement =&lt;br /&gt;
The aim of this project is to extend the functionality of badging that was implemented last semester [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E17A2._Lightweight_badging_system_based_on_Credly]].&lt;br /&gt;
&lt;br /&gt;
The project has the following objectives:&lt;br /&gt;
&lt;br /&gt;
1. Instructors must be able to create new badges.&lt;br /&gt;
2. Instead of assigning badges to students based on some pre-defined criteria, instructors must be able to assign badges manually.&lt;br /&gt;
3. Students must be able to assign &amp;quot;Good Reviewer&amp;quot; and &amp;quot;Good Teammate&amp;quot; badges during the author feedback and teammate review periods respectively. These badges must require the approval of the instructor.&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=116053</id>
		<title>MainPage</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=116053"/>
		<updated>2018-04-05T23:03:32Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Expertiza */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Expertiza==&lt;br /&gt;
* [[Expertiza documentation]]&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Summer 2008]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2010]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2011]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2012]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2013]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2015]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2016]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2015]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2016]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2017]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2017]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project Juniper:Bookmark Enhancements]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management]]&lt;br /&gt;
* [[CSC/ECE_517_Spring_2018- Project E1805: Convolutional data extraction from Github]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project E1808: Refactor review_mapping_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project E1810: Show sample submissions and reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018/E1814 Write unit tests for collusion cycle.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project M1802: 2D Canvas Rendering]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018 - E1800: Add past-due assignments to task list]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project E1812: on the fly calc.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project M1803: Implement a web page buzzer to find rendering mismatches ]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018/E1813 Test Menu Items Model]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging]]&lt;br /&gt;
* [[CSC 456 Spring 2011|CSC 456 Spring 2012]]&lt;br /&gt;
* [[ECE 633]]&lt;br /&gt;
* [[KCU]]&lt;br /&gt;
* [[Progress reports]]&lt;br /&gt;
&lt;br /&gt;
==Application Behavior==&lt;br /&gt;
* [[Grading]]&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
* [[CSC/ECE_517_Spring_2013/ch1b_1k_hf|Lecture on Metaprogramming]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
''Expertiza now has a Java dependency, so the machine you are using to develop Expertiza on should have the JVM installed.''&lt;br /&gt;
&lt;br /&gt;
* [[Setting Up a Development Machine]]&lt;br /&gt;
* [[Creating a Linux Development Environment for Expertiza - Installation Guide]]&lt;br /&gt;
* [[Using git and github for projects]]&lt;br /&gt;
* [[Using heroku to deploy your projects]]&lt;br /&gt;
* [[How to Begin a Project from the Current Expertiza Repository]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[How to Change a User's Password on a Development Machine]]&lt;br /&gt;
* [[Debugging Rails]]&lt;br /&gt;
* [http://rajanalwan.com/ui_guidelines/ Design Template]&lt;br /&gt;
&lt;br /&gt;
==Production==&lt;br /&gt;
* [[Deploying to Production]]&lt;br /&gt;
* [[Downloading Production Data]]&lt;br /&gt;
* [[Accessing the Production Server]]&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
* [[Using Cucumber with Expertiza]]&lt;br /&gt;
* [[Rails Testing Overview]]&lt;br /&gt;
* [[Expertiza Continuous Integration]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [[Object-Oriented Design and Programming]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115866</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115866"/>
		<updated>2018-04-03T02:53:43Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Automated Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
This file is shared between all views and is responsible for rendering all the elements in the top-most part of the web page. (i.e Displaying the menu items, the logout button etc.)&lt;br /&gt;
&lt;br /&gt;
In order to switch between '''instructor view''' and '''student view''', the following code was added. When the user is in '''instructor view''', there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to '''student view''' and when the user is in '''student view''', 'here is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to the '''instructor view'''.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
This file is responsible for rendering all menu items and their children (if any).&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
The ''after_login'' method in this controller sets up the session object after the user logs in, so it is a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor. Enter 'instructor6' as username and 'password' as password.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
1. '''Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.'''  &lt;br /&gt;
This test case is to check if the menu items ''Assignments'' and ''Course Evaluation'' are hidden when an instructor is in instructor view. The following lines can be added to a spec/features file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot; can display relevant menu items after login as an admin/instructor/TA&amp;quot;, js: true do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit '/tree_display/list'&lt;br /&gt;
    expect(page).to have_current_path('/tree_display/list')&lt;br /&gt;
    expect(page).to have_content('Manage content')&lt;br /&gt;
    expect(page).to have_content('Survey Deployments')&lt;br /&gt;
    expect(page).not_to have_content('Assignments')&lt;br /&gt;
    expect(page).not_to have_content('Course Evaluation')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. '''Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.'''&lt;br /&gt;
This test case is to check if the menu items ''Manage content'' and ''Survey Deployments'' are hidden when the instructor switches to student view. The following lines are to be added:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;can display relevant menu items when switching to student view&amp;quot;, js: true do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit '/tree_display/list'&lt;br /&gt;
    click_link 'Swtich to Student View'&lt;br /&gt;
    expect(page).to have_current_path('/student_task/list')&lt;br /&gt;
    expect(page).to have_content('Assignments')&lt;br /&gt;
    expect(page).to have_content('Course Evaluation')&lt;br /&gt;
    expect(page).not_to have_content('Manage content')&lt;br /&gt;
    expect(page).not_to have_content('Survey Deployments')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# Link to forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;br /&gt;
# Link to screen cast [[https://youtu.be/lRZT4q7YDLA]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
Expertiza&lt;br /&gt;
* https://expertiza.ncsu.edu/ &lt;br /&gt;
&lt;br /&gt;
Expertiza Github&lt;br /&gt;
* https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
Expertiza Documentation&lt;br /&gt;
* http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
RSpec Documentation&lt;br /&gt;
* http://rspec.info/documentation/&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115852</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115852"/>
		<updated>2018-04-03T02:34:45Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Automated Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
This file is shared between all views and is responsible for rendering all the elements in the top-most part of the web page. (i.e Displaying the menu items, the logout button etc.)&lt;br /&gt;
&lt;br /&gt;
In order to switch between '''instructor view''' and '''student view''', the following code was added. When the user is in '''instructor view''', there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to '''student view''' and when the user is in '''student view''', 'here is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to the '''instructor view'''.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
This file is responsible for rendering all menu items and their children (if any).&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
The ''after_login'' method in this controller sets up the session object after the user logs in, so it is a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
1. '''Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.'''  &lt;br /&gt;
This test case is to check if the menu items ''Assignments'' and ''Course Evaluation'' are hidden when an instructor is in instructor view. The following lines in the file spec/features/airbrake_expection_errors_feature_tests_spec.rb are to be modified:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;can access to '/tree_display/list' after login as an admin/instructor/TA&amp;quot;, js: true do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit '/tree_display/list'&lt;br /&gt;
    expect(page).to have_current_path('/tree_display/list')&lt;br /&gt;
    expect(page).to have_content('Manage content')&lt;br /&gt;
    expect(page).to have_content('Survey Deployments')&lt;br /&gt;
    expect(page).not_to have_content('Assignments')&lt;br /&gt;
    expect(page).not_to have_content('Course Evaluation')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. '''Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.'''&lt;br /&gt;
This test case is to check if the menu items ''Manage content'' and ''Survey Deployments'' are hidden when the instructor switches to student view. The following lines in the file spec/features/airbrake_expection_errors_feature_tests_spec.rb are to be added:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;can access to '/tree_display/list' when switching to student view&amp;quot;, js: true do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit '/tree_display/list'&lt;br /&gt;
    expect(page).to have_current_path('/tree_display/list')&lt;br /&gt;
    expect(page).to have_content('Assignments')&lt;br /&gt;
    expect(page).to have_content('Course Evaluation')&lt;br /&gt;
    expect(page).not_to have_content('Manage content')&lt;br /&gt;
    expect(page).not_to have_content('Survey Deployments')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# Link to forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;br /&gt;
# Link to screen cast [[https://youtu.be/lRZT4q7YDLA]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
Expertiza&lt;br /&gt;
* https://expertiza.ncsu.edu/ &lt;br /&gt;
&lt;br /&gt;
Expertiza Github&lt;br /&gt;
* https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
Expertiza Documentation&lt;br /&gt;
* http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
RSpec Documentation&lt;br /&gt;
* http://rspec.info/documentation/&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115790</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115790"/>
		<updated>2018-04-03T01:31:50Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
This file is shared between all views and is responsible for rendering all the elements in the top-most part of the web page. (i.e Displaying the menu items, the logout button etc.)&lt;br /&gt;
&lt;br /&gt;
In order to switch between '''instructor view''' and '''student view''', the following code was added. When the user is in '''instructor view''', there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to '''student view''' and when the user is in '''student view''', 'here is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to the '''instructor view'''.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
This file is responsible for rendering all menu items and their children (if any).&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
The ''after_login'' method in this controller sets up the session object after the user logs in, so it is a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# Link to forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;br /&gt;
# Link to screen cast [[https://youtu.be/lRZT4q7YDLA]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115789</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115789"/>
		<updated>2018-04-03T01:31:35Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
This file is shared between all views and is responsible for rendering all the elements in the top-most part of the web page. (i.e Displaying the menu items, the logout button etc.)&lt;br /&gt;
&lt;br /&gt;
In order to switch between '''instructor view''' and '''student view''', the following code was added. When the user is in '''instructor view''', there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to '''student view''' and when the user is in '''student view''', 'here is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to the '''instructor view'''.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
This file is responsible for rendering all menu items and their children (if any).&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
The ''after_login'' method in this controller sets up the session object after the user logs in, so it is a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;br /&gt;
# link for screen cast [[https://youtu.be/lRZT4q7YDLA]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115761</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115761"/>
		<updated>2018-04-03T01:05:50Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* expertiza/app/controllers/auth_controller.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
This file is shared between all views and is responsible for rendering all the elements in the top-most part of the web page. (i.e Displaying the menu items, the logout button etc.)&lt;br /&gt;
&lt;br /&gt;
In order to switch between '''instructor view''' and '''student view''', the following code was added. When the user is in '''instructor view''', there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to '''student view''' and when the user is in '''student view''', 'here is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to the '''instructor view'''.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
This file is responsible for rendering all menu items and their children (if any).&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
The ''after_login'' method in this controller sets up the session object after the user logs in, so it is a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115758</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115758"/>
		<updated>2018-04-03T01:04:44Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* expertiza/app/views/menu_items/_suckerfish.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
This file is shared between all views and is responsible for rendering all the elements in the top-most part of the web page. (i.e Displaying the menu items, the logout button etc.)&lt;br /&gt;
&lt;br /&gt;
In order to switch between '''instructor view''' and '''student view''', the following code was added. When the user is in '''instructor view''', there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to '''student view''' and when the user is in '''student view''', 'here is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to the '''instructor view'''.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
This file is responsible for rendering all menu items and their children (if any).&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115757</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115757"/>
		<updated>2018-04-03T01:03:16Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* expertiza/app/views/shared/_navigation.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
This file is shared between all views and is responsible for rendering all the elements in the top-most part of the web page. (i.e Displaying the menu items, the logout button etc.)&lt;br /&gt;
&lt;br /&gt;
In order to switch between '''instructor view''' and '''student view''', the following code was added. When the user is in '''instructor view''', there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to '''student view''' and when the user is in '''student view''', 'here is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to the '''instructor view'''.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115751</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115751"/>
		<updated>2018-04-03T00:59:58Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors. When in '''student view''', an instructor must not be able to view ''&amp;quot;Manage content&amp;quot;'' and ''&amp;quot;Survey Deployments&amp;quot;'' menu items, and must be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). When in '''instructor view''', an instructor must not be able to view the ''&amp;quot;Assignment&amp;quot;'' and ''&amp;quot;Course Evaluation&amp;quot;'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115748</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115748"/>
		<updated>2018-04-03T00:57:05Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors, which will allow an instructor to see what students see without having to actually impersonate a particular student. When in '''student view''', an instructor must be able to view only the menu items that a student can view and must also be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). Also when in '''instructor view''', an instructor must not be able to view the ''Assignment'' and ''Course Evaluation'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115747</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115747"/>
		<updated>2018-04-03T00:56:54Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage content   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
And, a student can see the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home Assignments Pending Surveys Profile Contact Us''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage content” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage content &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Therefore, it makes sense to create a '''student view''' for instructors, which will enable them to see menu items that are only related to students. This will help resolve the confusion.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors, which will allow an instructor to see what students see without having to actually impersonate a particular student. When in '''student view''', an instructor must be able to view only the menu items that a student can view and must also be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). Also when in '''instructor view''', an instructor must not be able to view the ''Assignment'' and ''Course Evaluation'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115744</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115744"/>
		<updated>2018-04-03T00:51:06Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Problem statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Create a '''student view''' for instructors, which will allow an instructor to see what students see without having to actually impersonate a particular student. When in '''student view''', an instructor must be able to view only the menu items that a student can view and must also be able to switch back to the '''instructor view''' (the default view that an instructor first sees when he/she logs in). Also when in '''instructor view''', an instructor must not be able to view the ''Assignment'' and ''Course Evaluation'' menu items.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115742</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115742"/>
		<updated>2018-04-03T00:48:47Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
Currently, when an '''instructor''' logs into Expertiza, he/she sees the following menu items across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
On the instructor’s “Manage” menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu (that both students and instructors) see allows the instructor to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Our aim is to create a student view for instructors, which will allow an instructor to see what the students see without having to actually impersonate a particular student. When in student view, an instructor must be able to view only the menu items that a student can view and must also be able to switch back to the instructor view. Also when in instructor view, an instructor won't be able to view the 'Assignment' and 'Course Evaluation' menu items, which as of now the instructor can see.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115719</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115719"/>
		<updated>2018-04-03T00:19:18Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
Our project is to introduce a student view to the instructors. Currently, an '''instructor''' sees the following menus across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
On the instructor’s Manage menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu that both students and instructors see allows them to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Hence, to avoid confusion, when in '''instructor view''',the following menus are displayed across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
When in '''student view''', the following menus are displayed across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Assignments   Course Evaluations   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
When the instructor first logs in, he is in '''instructor view'''. He can choose to switch to '''student view''' at any time, and also revert back to '''instructor view''' at any time.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Our aim is to create a student view for instructors, which will allow an instructor to see what the students see without having to actually impersonate a particular student. When in student view, an instructor must be able to view only the menu items that a student can view and must also be able to switch back to the instructor view. Also when in instructor view, an instructor won't be able to view the 'Assignment' and 'Course Evaluation' menu items, which as of now the instructor can see.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115718</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115718"/>
		<updated>2018-04-03T00:18:57Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Our project is to introduce a student view to the instructors. Currently, an '''instructor''' sees the following menus across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
On the instructor’s Manage menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu that both students and instructors see allows them to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Hence, to avoid confusion, when in '''instructor view''',the following menus are displayed across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
When in '''student view''', the following menus are displayed across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Assignments   Course Evaluations   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
When the instructor first logs in, he is in '''instructor view'''. He can choose to switch to '''student view''' at any time, and also revert back to '''instructor view''' at any time.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Our aim is to create a student view for instructors, which will allow an instructor to see what the students see without having to actually impersonate a particular student. When in student view, an instructor must be able to view only the menu items that a student can view and must also be able to switch back to the instructor view. Also when in instructor view, an instructor won't be able to view the 'Assignment' and 'Course Evaluation' menu items, which as of now the instructor can see.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115717</id>
		<title>CSC/ECE 517 Spring 2018- Project E1803: Introducing a Student View for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1803:_Introducing_a_Student_View_for_Instructors&amp;diff=115717"/>
		<updated>2018-04-03T00:18:31Z</updated>

		<summary type="html">&lt;p&gt;Aravich6: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Our project is to introduce a student view to the instructors. Currently, an '''instructor''' sees the following menus across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Assignments   Course Evaluation   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
On the instructor’s Manage menu, one of the options is “Assignments”.  Having “Assignments” appear in two places is potentially confusing.  “Manage &amp;gt; Assignments” allows the instructor to edit and create assignments, whereas the “Assignments” menu that both students and instructors see allows them to participate in assignments.&lt;br /&gt;
&lt;br /&gt;
Hence, to avoid confusion, when in '''instructor view''',the following menus are displayed across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Manage   Survey Deployments   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
When in '''student view''', the following menus are displayed across the top:&lt;br /&gt;
&lt;br /&gt;
''Home	 Assignments   Course Evaluations   Profile   Contact Us''&lt;br /&gt;
&lt;br /&gt;
When the instructor first logs in, he is in '''instructor view'''. He can choose to switch to '''student view''' at any time, and also revert back to '''instructor view''' at any time.&lt;br /&gt;
&lt;br /&gt;
=== Problem statement ===&lt;br /&gt;
Our aim is to create a student view for instructors, which will allow an instructor to see what the students see without having to actually impersonate a particular student. When in student view, an instructor must be able to view only the menu items that a student can view and must also be able to switch back to the instructor view. Also when in instructor view, an instructor won't be able to view the 'Assignment' and 'Course Evaluation' menu items, which as of now the instructor can see.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
# Akshay Ravichandran&lt;br /&gt;
# Krithika Sekhar&lt;br /&gt;
# Sameer Poudwal&lt;br /&gt;
&lt;br /&gt;
'''Mentor''' - Dr. Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== expertiza/app/views/shared/_navigation.html.erb ===&lt;br /&gt;
To switch from instructor to student view and to switch back from student to instructor view, the following code was added in the _navigation.html.erb file. When the user is in instructor view, there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when the user is in student view, there is a link named &amp;quot;Revert to Instructor View&amp;quot; to switch back to Instructor View.&lt;br /&gt;
 &amp;lt;% if session[:user].role.instructor? %&amp;gt;&lt;br /&gt;
                  &amp;lt;% if session.key?(:student_view) %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Revert to Instructor View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;revert_to_instructor_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% else %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to &amp;quot;Switch to Student View&amp;quot;, {controller: &amp;quot;instructor&amp;quot;, action: &amp;quot;set_student_view&amp;quot;},&lt;br /&gt;
                                  method: :post, :style =&amp;gt; &amp;quot;color: white&amp;quot; %&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/views/menu_items/_suckerfish.html.erb ===&lt;br /&gt;
&lt;br /&gt;
A condition was needed to check if the current menu item that is to be rendered is in the list of hidden menu items. The ''hidden_menu_items'' session variable holds the IDs of menu items that must not be rendered. This applies only when the type of user currently logged in is an instructor. Hence, the following condition was added.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 display_item_condition = (session[:user].role.instructor?)?(session[:hidden_menu_items].include?item_id)?false:true:true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/instructor_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
A new instructor_controller.rb file has been added. This controller currently contains the actions to switch to student view and revert back to instructor view.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class InstructorController &amp;lt; ApplicationController&lt;br /&gt;
  # check to see if the current action is allowed&lt;br /&gt;
  def action_allowed?&lt;br /&gt;
    # only an instructor is allowed to perform all the actions in&lt;br /&gt;
    # this controller&lt;br /&gt;
    return true if session[:user].role.instructor?&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object and redirects to&lt;br /&gt;
  # student_task/list after updating hidden_menu_items&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    redirect_to controller: 'student_task', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # destroys student_view in session object and redirects to&lt;br /&gt;
  # tree_display/list after updating hidden_menu_items&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/helpers/menu_items_helper.rb ===&lt;br /&gt;
&lt;br /&gt;
This is a helper for deciding what menu items must be hidden.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''update_hidden_menu_items_for_student_view'' method is used to hide the ''Survey Deployments'' and ''Manage Instructor Content'' menu items. It does this by including the menu item IDs of these two menus in the ''hidden_menu_items'' session variable. (The ''hidden_menu_item'' variable will be used by &amp;lt;b&amp;gt;_suckerfish.html.erb&amp;lt;/b&amp;gt; to decide whether or not to render a given menu item).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Similarly, the ''update_hidden_menu_items_for_instructor_view'' method is used to hide the ''Assignments'' and ''Course Evaluation'' menu items. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The ''set_hidden_menu_items'' method is used to set check if the given user is an instructor. If it is, then the ''update_hidden_menu_items_for_instructor_view'' method is called. This method is used to ensure that only those items that must be visible to an instructor view are visible to an instructor when he logs in for the first time. The method has been designed in this way because, in the future, other menu items may need to be hidden based on the user type.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module MenuItemsHelper&lt;br /&gt;
  # sets hidden_menu_items for the given user if&lt;br /&gt;
  # user is an instructor. This method is needed to set&lt;br /&gt;
  # the hidden_menu_items during initial login by instructor.&lt;br /&gt;
  def self.set_hidden_menu_items(user, session)&lt;br /&gt;
    if user.role.instructor?&lt;br /&gt;
      MenuItemsHelper.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    else&lt;br /&gt;
      session[:hidden_menu_items] = []&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in student view&lt;br /&gt;
  def self.update_hidden_menu_items_for_student_view(session)&lt;br /&gt;
    # 35 - Survey Deployments, 37 - Manage Instructor Content&lt;br /&gt;
    session[:hidden_menu_items] = [35, 37]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # updates hidden_menu_items in session object when an instructor is&lt;br /&gt;
  # in instructor view&lt;br /&gt;
  def self.update_hidden_menu_items_for_instructor_view(session)&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/app/controllers/auth_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''after_login'' method. This call is intended to set the 'hidden_menu_items' variable in the session object when an instructor logs in for the first time. This is done so that the instructor is by default in Instructor View when he logs in. (i.e ''Assignments'' and ''Course Evaluation'' are hidden). The ''after_login'' method sets up the session object after the user logs in, so it seemed like a good candidate to include the initial set up of the ''hidden_menu_items'' session variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # hide menu items based on type of user&lt;br /&gt;
    MenuItemsHelper.set_hidden_menu_items(user,session)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines were added to the ''clear_session'' method. These lines clear the ''student_view'' and ''hidden_menu_items'' session variables.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    session[:student_view] = nil&lt;br /&gt;
    session[:hidden_menu_items] = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== expertiza/config/routes.rb ===&lt;br /&gt;
&lt;br /&gt;
New post methods are added in ''config/routes.rb''. The routes are directed to the instructor controller's ''set_student_view'' and ''revert_to_instructor_view'' actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :instructor, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      post  :set_student_view&lt;br /&gt;
      post  :revert_to_instructor_view&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual UI Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as an instructor to view this functionality.&lt;br /&gt;
&lt;br /&gt;
1. Log into Expertiza as an instructor.&lt;br /&gt;
&lt;br /&gt;
2. Click on '''Switch to Student View''' below username to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below username to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View_1.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Automated Test Plan ==&lt;br /&gt;
# Check whether ''Assignments'' and ''Course Evaluation'' are hidden when in instructor view.&lt;br /&gt;
# Check whether ''Manage content'' and ''Survey Deployments'' are hidden in student view.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [[https://github.com/akshayravichandran/expertiza]]&lt;/div&gt;</summary>
		<author><name>Aravich6</name></author>
	</entry>
</feed>