<?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=Ksekhar</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=Ksekhar"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Ksekhar"/>
	<updated>2026-10-01T07:40:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116649</id>
		<title>File:Usecase.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116649"/>
		<updated>2018-04-14T03:16:19Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: uploaded a new version of &amp;amp;quot;File:Usecase.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ksekhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116647</id>
		<title>File:Usecase.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116647"/>
		<updated>2018-04-14T03:03:33Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: uploaded a new version of &amp;amp;quot;File:Usecase.jpg&amp;amp;quot;: Reverted to version as of 02:55, 14 April 2018&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ksekhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116646</id>
		<title>File:Usecase.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116646"/>
		<updated>2018-04-14T03:00:04Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: uploaded a new version of &amp;amp;quot;File:Usecase.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ksekhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116643</id>
		<title>File:Usecase.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116643"/>
		<updated>2018-04-14T02:55:41Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: uploaded a new version of &amp;amp;quot;File:Usecase.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ksekhar</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=116556</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=116556"/>
		<updated>2018-04-14T00:11:29Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Files to be modified */&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, 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>Ksekhar</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=116547</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=116547"/>
		<updated>2018-04-13T23:49:31Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Approval of badges by instructor */&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, 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;
=== 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;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_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>Ksekhar</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=116544</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=116544"/>
		<updated>2018-04-13T23:45:47Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Files to be modified */&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, 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. 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;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&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;
&lt;br /&gt;
=== Database changes ===&lt;br /&gt;
=== New Files ===&lt;br /&gt;
*       expertiza/app/views/assignments/edit/_add_new_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>Ksekhar</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=116543</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=116543"/>
		<updated>2018-04-13T23:43:15Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Views */&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, 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. 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;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&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;
&lt;br /&gt;
=== Database changes ===&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>Ksekhar</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=116533</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=116533"/>
		<updated>2018-04-13T23:27:30Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Views */&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, 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. 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;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&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;
*&lt;br /&gt;
&lt;br /&gt;
=== Database changes ===&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>Ksekhar</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=116523</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=116523"/>
		<updated>2018-04-13T23:11:38Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: &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, 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. 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;
== Files to be modified ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
=== Views ===&lt;br /&gt;
=== Database changes ===&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>Ksekhar</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=116186</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=116186"/>
		<updated>2018-04-06T19:29:13Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Flowchart */&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, 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. 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>Ksekhar</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=116185</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=116185"/>
		<updated>2018-04-06T19:25:52Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Previous Implementation */&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, 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>Ksekhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116129</id>
		<title>File:Usecase.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116129"/>
		<updated>2018-04-06T03:37:37Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: uploaded a new version of &amp;amp;quot;File:Usecase.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ksekhar</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=116125</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=116125"/>
		<updated>2018-04-06T03:31:44Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Team Members */&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;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Harish Pullagurla&lt;br /&gt;
&lt;br /&gt;
2. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
3. Arunkumar Krishnamoorthy&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. 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;
[[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>Ksekhar</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=116124</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=116124"/>
		<updated>2018-04-06T03:30:47Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Team Members */&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;
= Team Members =&lt;br /&gt;
Students who collaborated to work on this problem statement are :&lt;br /&gt;
&lt;br /&gt;
1. Harish Pullagurla ( hpullag@ncsu.edu )&lt;br /&gt;
&lt;br /&gt;
2. Akshay Ravichandran&lt;br /&gt;
&lt;br /&gt;
3. Arunkumar Krishnamoorthy&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. 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;
[[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>Ksekhar</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=116107</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=116107"/>
		<updated>2018-04-06T01:21:45Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: &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;
[[File:Usecase.jpg]]&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>Ksekhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116106</id>
		<title>File:Usecase.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.jpg&amp;diff=116106"/>
		<updated>2018-04-06T01:19:10Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ksekhar</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=116095</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=116095"/>
		<updated>2018-04-06T01:04:28Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: &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;
== 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>Ksekhar</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=115857</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=115857"/>
		<updated>2018-04-03T02:47:51Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Manual UI Testing */&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;
    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>Ksekhar</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=115855</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=115855"/>
		<updated>2018-04-03T02:43:43Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* 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 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;
    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>Ksekhar</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=115845</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=115845"/>
		<updated>2018-04-03T02:32:29Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Team */&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>Ksekhar</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=115843</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=115843"/>
		<updated>2018-04-03T02:30:39Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* 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;
=== 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;
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>Ksekhar</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=115813</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=115813"/>
		<updated>2018-04-03T02:11:09Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* 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;
=== 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;
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;
# 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;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>Ksekhar</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=115803</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=115803"/>
		<updated>2018-04-03T01:55:47Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: &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;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>Ksekhar</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=115071</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=115071"/>
		<updated>2018-03-25T23:06:51Z</updated>

		<summary type="html">&lt;p&gt;Ksekhar: /* Testing */&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;
A '''student''' sees these menus:&lt;br /&gt;
&lt;br /&gt;
''Home	 Assignments   Course Evaluations   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 in the menu is potentially confusing.  Manage &amp;gt; Assignments allows the instructor to edit and create assignments.  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;
=== 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''' - Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
== Development ==&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 in instructor view there is a link named &amp;quot;Switch to Student View&amp;quot; to switch to student view and when 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;tree_display&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;tree_display&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;
Based on whether the instructor or student view is being displayed, appropriate menu items a rendered by adding the following to the _suckerfish.html.erb file.&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/tree_display_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
To check what all menu items need to displayed based on what view an instructor is in, the following changes were made to the tree_display_controller.rb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def list&lt;br /&gt;
    # check to see which menu items need to be hidden&lt;br /&gt;
    if session[:user].role.instructor?&lt;br /&gt;
      if session.key?(:student_view)&lt;br /&gt;
        set_student_view_hidden_menu_items&lt;br /&gt;
      else&lt;br /&gt;
        set_instructor_view_hidden_menu_items&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: :content_pages, action: :view if current_user.nil?&lt;br /&gt;
    redirect_to controller: :student_task, action: :list if current_user.try(:student?)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets student_view in session object&lt;br /&gt;
  def set_student_view&lt;br /&gt;
    session[:student_view] = true&lt;br /&gt;
    redirect_back&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets hidden_menu_items in session object when in student view&lt;br /&gt;
  def set_student_view_hidden_menu_items&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;
  # destroys student_view in session object&lt;br /&gt;
  def revert_to_instructor_view&lt;br /&gt;
    session.delete(:student_view)&lt;br /&gt;
    redirect_back&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # sets hidden_menu_items in session object when in instructor view&lt;br /&gt;
  def set_instructor_view_hidden_menu_items&lt;br /&gt;
    # 26 - Assignments, 30 - Course Evaluation&lt;br /&gt;
    session[:hidden_menu_items] = [26, 30]&lt;br /&gt;
  end&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''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  resources :tree_display, only: [] do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :action&lt;br /&gt;
      post :list&lt;br /&gt;
      post :children_node_ng&lt;br /&gt;
      post :children_node_2_ng&lt;br /&gt;
      post :bridge_to_is_available&lt;br /&gt;
      get :session_last_open_tab&lt;br /&gt;
      get :set_session_last_open_tab&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;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
The user needs to log-in as instructor to view the developed functionality, this won't be visible for other user roles-&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 user name to switch to student view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Student_View.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Click on '''Revert to Instructor View'''' below user name to come back to instructor view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_View.PNG]]&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>Ksekhar</name></author>
	</entry>
</feed>