<?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=Aarivan</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=Aarivan"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Aarivan"/>
	<updated>2026-05-06T16:50:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1740_-_Lightweight_Badging_System_based_on_Credly&amp;diff=108527</id>
		<title>E1740 - Lightweight Badging System based on Credly</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1740_-_Lightweight_Badging_System_based_on_Credly&amp;diff=108527"/>
		<updated>2017-04-13T03:17:05Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the design review of our final project as part of CSC 517 in Spring 2017.&lt;br /&gt;
The Project is titled Lightweight badging system based on Credly. &lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is to implement several different “badges” that will be achievable for students by reaching a set of criteria. These badges will be “1st Submission”, “Dream Team”, and “Good Reviewer”. The images for the badges have previously been created, but must be re-worked to remove text that was too small to read. The logic for earning these badges must be implemented in Expertiza as well as how they display for both students and instructors.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
==== '''Expertizza''' ====&lt;br /&gt;
Expertiza project is a software to create reusable learning objects through peer review. It is an open source project based on Ruby on Rails framework. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages. It allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. The main goal of Expertiza as a whole is to have a platform for instructors to create or assign topics and students to submit their work related to the assigned topics.&lt;br /&gt;
&lt;br /&gt;
==== '''Credly''' ====&lt;br /&gt;
Credly provides an universal way for people to earn and showcase their achievements and badges. We use Credly to design the badges. We are tasked with designing three badges - namely, Top Scores, Dream Team, and Good Reviewer. We store these badges as images for use in our project and can always add, remove or modify the existing badges in the future.  &lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
The end goal of this project is to have the earned badges appear on the student’s task view as well as the instructor’s participants view. When the user hovers their cursor over an image a brief description of the badge will appear.&lt;br /&gt;
&lt;br /&gt;
===Current Implementation===&lt;br /&gt;
The student’s task view appears as shown in the below screenshot, as per the current implementation. Students can see the list of tasks/assignments and the topics, grades and deadlines for each of those assignments.  &lt;br /&gt;
&lt;br /&gt;
[[File:before_1.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
The participants view in the current implementation (i.e, prior to the proposed changes). The instructors can see the list of students, their details, and the details related to that particular task.&lt;br /&gt;
&lt;br /&gt;
[[File:after_1.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
===Proposed Implementation===&lt;br /&gt;
The student’s task view after our changes should appear as shown in the below screenshot, as per the current implementation. Students can see the badges earned along with the list of tasks/assignments and the topics, grades and deadlines for each of those assignments. Hovering over the badges would give you a brief description of the badge earned.&lt;br /&gt;
&lt;br /&gt;
[[File:before_2.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
The participants view after the proposed implementation would be changed as shown below. The instructors can see the badges earned by the student next to the student's name along with the existing details. &lt;br /&gt;
&lt;br /&gt;
[[File:after_2.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
===UML Diagram===&lt;br /&gt;
'''Use Case Diagram''':&lt;br /&gt;
&lt;br /&gt;
[[File:e1740_use_case.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
===Use Case Description===&lt;br /&gt;
'''Use Case 1: First Submission Badge for Student'''&lt;br /&gt;
&lt;br /&gt;
The student here will be able to view the first submission badge in their view (student_task/list) page, if the badge computer component in the system can determine the submission made by the team of the student is the first submission of the assignment.&lt;br /&gt;
&lt;br /&gt;
'''Use Case 2: Dream Team Badge for Student'''&lt;br /&gt;
&lt;br /&gt;
The student here will be able to view the dream team badge in their view (student_task/list) page, if the badge computer component in the system computes the aggregate scores of all the teammate reviews to be greater than 95.&lt;br /&gt;
&lt;br /&gt;
'''Use Case 3: Good Reviewer Badge for Student'''&lt;br /&gt;
&lt;br /&gt;
The student here will be able to view the good reviewer badge in their view (student_task/list) page, if the badge computer component in the system determines the review grade for the student to be greater than 95. Here, the system needs to wait for the grade score from the teaching staff to display this badge.&lt;br /&gt;
&lt;br /&gt;
'''Use Case 4: First Submission Badge for Participants'''&lt;br /&gt;
&lt;br /&gt;
The instructor here will be able to view the first submission badge for participants in their view (participants/list) page, if the badge computer component in the system can determine the submissions made by teams of each participants (in the list) are the first submissions of different assignments.&lt;br /&gt;
&lt;br /&gt;
'''Use Case 5: Dream Team Badge for Participants'''&lt;br /&gt;
&lt;br /&gt;
The instructor here will be able to view the dream team badge for participants in their view (student_task/list) page, if the badge computer component in the system computes the aggregate scores of all the teammate reviews for each participant to be greater than 95.&lt;br /&gt;
&lt;br /&gt;
'''Use Case 6: Good Reviewer Badge for Participants'''&lt;br /&gt;
&lt;br /&gt;
The instructor here will be able to view the good reviewer badge for participants in their view (student_task/list) page, if the badge computer component in the system determines the review grade for the each participant to be greater than 95. Here, the system needs to wait for the grade score from the teaching staff for each participant to display this badge.&lt;br /&gt;
===Proposed Design===&lt;br /&gt;
&lt;br /&gt;
====Tasks to be completed====&lt;br /&gt;
&lt;br /&gt;
To achieve the goal of this project we will work on four aspects.&lt;br /&gt;
&lt;br /&gt;
'''TASK 1''' - creating the badge images and implementing them as a model in Expertiza&lt;br /&gt;
* This will involve using Credly to create the badges and, &lt;br /&gt;
* Making changes to student_task/list and participants/list to show them&lt;br /&gt;
&lt;br /&gt;
'''TASK 2''' - Implement the 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt; Submission badge&lt;br /&gt;
* To do this we will need to check the submission times of each assignment through the db teams table &lt;br /&gt;
* The team with the earliest submission time will have each member earn the 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt; Submission badge&lt;br /&gt;
* The logic for this badge will be written in the team.rb file.&lt;br /&gt;
&lt;br /&gt;
'''TASK 3''' - Implement the Dream Team badge&lt;br /&gt;
* This badge will be given to a team when all of their members receive an aggregate teammate review score of 95 or above&lt;br /&gt;
* To check for this, we will average the teammate review scores for each individual member and then check to see if each member had an average of 95 or above&lt;br /&gt;
* If the team accomplishes this, each member will be awarded the Dream Team badge&lt;br /&gt;
* If any member of the team does not have an average of 95 or above then none of the team members will be awarded the badge&lt;br /&gt;
* The logic for this badge will be written in the teammate_review_response_map.rb file&lt;br /&gt;
&lt;br /&gt;
'''TASK 4''' - Implement the Good Reviewer badge&lt;br /&gt;
* This badge will be given to a student if they receive a review grade average of 95 or above from the teaching staff&lt;br /&gt;
* In order to calculate this score we will have to get each individual grade the student received on their reviews and average it out&lt;br /&gt;
* If that average is at 95 or above they will receive the badge, if not they will not be given this award&lt;br /&gt;
* The logic for this badge will be written in review_response_map.rb&lt;br /&gt;
On completing the tasks the badge system will be functional.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
As verified with the instructor, the scope for testing in this project will be limited to majorly UI testing&lt;br /&gt;
&lt;br /&gt;
==== Manual Testing ====&lt;br /&gt;
The following steps need to followed to test implementation manually.&lt;br /&gt;
&lt;br /&gt;
1. Log in as an instructor and identify the top scorer for a particular assignment and later later impersonate the students of that team and make sure that all the team members have received the 'top score' badge.&lt;br /&gt;
&lt;br /&gt;
2. Log in as an instructor and identify the team which received an average score greater than or equal to 95% and later later impersonate the students of that team and make sure that all the team members have received the 'dream team' badge.&lt;br /&gt;
&lt;br /&gt;
3. Log in as an instructor and give review scores for two students (one more that 95% and one less than 95% for the other) and later later impersonate the students to make sure that the student who received more than 95% review grade received the 'good reviewer' badge and the other student does not.&lt;br /&gt;
&lt;br /&gt;
4. Log in as an instructor and check if the students tested above has the badges reflected in the participant_list/list view page. The page shows all the assignment specific badges (Top score, Dream team and Good reviewer badge).&lt;br /&gt;
&lt;br /&gt;
NOTE: The details about the badge should appear when we hover the mouse pointer above the badge&lt;br /&gt;
&lt;br /&gt;
===Files to Change===&lt;br /&gt;
The following are a list of files that has been identified, which would be modified for the proposed implementation.&lt;br /&gt;
&lt;br /&gt;
====Models====&lt;br /&gt;
&lt;br /&gt;
#app/models/team.rb&lt;br /&gt;
#app/models/teammate_review_response_map.rb&lt;br /&gt;
#app/models/review_response_map.rb&lt;br /&gt;
&lt;br /&gt;
====Views====&lt;br /&gt;
&lt;br /&gt;
# app/views/participants/list.html.erb&lt;br /&gt;
# app/views/student_task/list.html.reb&lt;br /&gt;
&lt;br /&gt;
====Controllers====&lt;br /&gt;
&lt;br /&gt;
#app/controllers/participants_controller.rb&lt;br /&gt;
#app/controllers/student_task_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Important Links===&lt;br /&gt;
&lt;br /&gt;
Link to Github repository : https://github.com/gokkulasudanr92/expertiza&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#''http://www.ibm.com/developerworks/rational/library/769.html''&lt;br /&gt;
#''https://sourcemaking.com/design_patterns''&lt;br /&gt;
#''http://wiki.expertiza.ncsu.edu/index.php/Main_Page''&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1740_-_Lightweight_Badging_System_based_on_Credly&amp;diff=108367</id>
		<title>E1740 - Lightweight Badging System based on Credly</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1740_-_Lightweight_Badging_System_based_on_Credly&amp;diff=108367"/>
		<updated>2017-04-12T22:43:27Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: /* UML Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the design review of our final project as part of CSC 517 in Spring 2017.&lt;br /&gt;
The Project is titled Lightweight badging system based on Credly. &lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is to implement several different “badges” that will be achievable for students by reaching a set of criteria. These badges will be “1st Submission”, “Dream Team”, and “Good Reviewer”. The images for the badges have previously been created, but must be re-worked to remove text that was too small to read. The logic for earning these badges must be implemented in Expertiza as well as how they display for both students and instructors.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
==== '''Expertizza''' ====&lt;br /&gt;
Expertiza project is a software to create reusable learning objects through peer review. It is an open source project based on Ruby on Rails framework. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages. It allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. The main goal of Expertiza as a whole is to have a platform for instructors to create or assign topics and students to submit their work related to the assigned topics.&lt;br /&gt;
&lt;br /&gt;
==== '''Credly''' ====&lt;br /&gt;
Credly provides an universal way for people to earn and showcase their achievements and badges. We use Credly to design the badges. We are tasked with designing three badges - namely, Top Scores, Dream Team, and Good Reviewer. We store these badges as images for use in our project and can always add, remove or modify the existing badges in the future.  &lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
The end goal of this project is to have the earned badges appear on the student’s task view as well as the instructor’s participants view. When the user hovers their cursor over an image a brief description of the badge will appear.&lt;br /&gt;
&lt;br /&gt;
===Current Implementation===&lt;br /&gt;
The student’s task view appears as shown in the below screenshot, as per the current implementation. Students can see the list of tasks/assignments and the topics, grades and deadlines for each of those assignments.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The participants view in the current implementation (i.e, prior to the proposed changes). The instructors can see the list of students, their details, and the details related to that particular task.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Proposed Implementation===&lt;br /&gt;
The student’s task view after our changes should appear as shown in the below screenshot, as per the current implementation. Students can see the badges earned along with the list of tasks/assignments and the topics, grades and deadlines for each of those assignments. Hovering over the badges would give you a brief description of the badge earned.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The participants view after the proposed implementation would be changed as shown below. The instructors can see the badges earned by the student next to the student's name along with the existing details. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===UML Diagram===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- Brief description of the UML ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Proposed Design===&lt;br /&gt;
&lt;br /&gt;
====Tasks to be completed====&lt;br /&gt;
&lt;br /&gt;
To achieve the goal of this project we will work on four aspects.&lt;br /&gt;
&lt;br /&gt;
'''TASK 1''' - creating the badge images and implementing them as a model in Expertiza&lt;br /&gt;
* This will involve using Credly to create the badges and, &lt;br /&gt;
* Making changes to student_task/list and participants/list to show them&lt;br /&gt;
&lt;br /&gt;
'''TASK 2''' - Implement the 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt; Submission badge&lt;br /&gt;
* To do this we will need to check the submission times of each assignment through the db teams table &lt;br /&gt;
* The team with the earliest submission time will have each member earn the 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt; Submission badge&lt;br /&gt;
* The logic for this badge will be written in the team.rb file.&lt;br /&gt;
&lt;br /&gt;
'''TASK 3''' - Implement the Dream Team badge&lt;br /&gt;
* This badge will be given to a team when all of their members receive an aggregate teammate review score of 95 or above&lt;br /&gt;
* To check for this, we will average the teammate review scores for each individual member and then check to see if each member had an average of 95 or above&lt;br /&gt;
* If the team accomplishes this, each member will be awarded the Dream Team badge&lt;br /&gt;
* If any member of the team does not have an average of 95 or above then none of the team members will be awarded the badge&lt;br /&gt;
* The logic for this badge will be written in the teammate_review_response_map.rb file&lt;br /&gt;
&lt;br /&gt;
'''TASK 4''' - Implement the Good Reviewer badge&lt;br /&gt;
* This badge will be given to a student if they receive a review grade average of 95 or above from the teaching staff&lt;br /&gt;
* In order to calculate this score we will have to get each individual grade the student received on their reviews and average it out&lt;br /&gt;
* If that average is at 95 or above they will receive the badge, if not they will not be given this award&lt;br /&gt;
* The logic for this badge will be written in review_response_map.rb&lt;br /&gt;
On completing the tasks the badge system will be functional.&lt;br /&gt;
&lt;br /&gt;
==== Design Pattern Used ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- BRIEF DESC ON THE DESIGN PATTERN USED ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Features to be added====&lt;br /&gt;
&lt;br /&gt;
The badges are created in Credly and would be stored in app/assets/images/badges. The badges would called whenever a new  &lt;br /&gt;
&lt;br /&gt;
Added label or pop up which will indicate the metrics as icons, as shown below.&lt;br /&gt;
These icons will directly summarize the review in terms of predefined metrics. The reviews will be sorted according to the text metrics and will be displayed to the student on the 'Your Scores' page.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
As verified with the instructor, the scope for testing in this project will be limited to majorly UI testing&lt;br /&gt;
&lt;br /&gt;
==== Manual Testing ====&lt;br /&gt;
The following steps need to followed to test implementation manually.&lt;br /&gt;
&lt;br /&gt;
1. Log in as an instructor and identify the top scorer for a particular assignment and later later impersonate the students of that team and make sure that all the team members have received the 'top score' badge.&lt;br /&gt;
&lt;br /&gt;
2. Log in as an instructor and identify the team which received an average score greater than or equal to 95% and later later impersonate the students of that team and make sure that all the team members have received the 'dream team' badge.&lt;br /&gt;
&lt;br /&gt;
3. Log in as an instructor and give review scores for two students (one more that 95% and one less than 95% for the other) and later later impersonate the students to make sure that the student who received more than 95% review grade received the 'good reviewer' badge and the other student does not.&lt;br /&gt;
&lt;br /&gt;
4. Log in as an instructor and check if the students tested above has the badges reflected in the participant_list/list view page. The page shows all the assignment specific badges (Top score, Dream team and Good reviewer badge).&lt;br /&gt;
&lt;br /&gt;
NOTE: The details about the badge should appear when we hover the mouse pointer above the badge&lt;br /&gt;
&lt;br /&gt;
===Files Changed===&lt;br /&gt;
The following are a list of files that has been identified, which would be modified for the proposed implementation.&lt;br /&gt;
&lt;br /&gt;
====Models====&lt;br /&gt;
&lt;br /&gt;
#app/models/team.rb&lt;br /&gt;
#app/models/teammate_review_response_map.rb&lt;br /&gt;
#app/models/review_response_map.rb&lt;br /&gt;
&lt;br /&gt;
====Views====&lt;br /&gt;
&lt;br /&gt;
# app/views/participants/list.html.erb&lt;br /&gt;
# app/views/student_task/list.html.reb&lt;br /&gt;
&lt;br /&gt;
====Controllers====&lt;br /&gt;
&lt;br /&gt;
#app/controllers/participants_controller.rb&lt;br /&gt;
#app/controllers/student_task_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Important Links===&lt;br /&gt;
&lt;br /&gt;
Link to Github repository :   &lt;br /&gt;
&lt;br /&gt;
Link to Pull request : &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#''https://github.com/diasks2/ruby-nlp''&lt;br /&gt;
#''http://www.ibm.com/developerworks/rational/library/769.html''&lt;br /&gt;
#''https://sourcemaking.com/design_patterns''&lt;br /&gt;
#''http://wiki.expertiza.ncsu.edu/index.php/Main_Page''&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1740_-_Lightweight_Badging_System_based_on_Credly&amp;diff=108363</id>
		<title>E1740 - Lightweight Badging System based on Credly</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1740_-_Lightweight_Badging_System_based_on_Credly&amp;diff=108363"/>
		<updated>2017-04-12T22:36:04Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: first draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the design review of our final project as part of CSC 517 in Spring 2017.&lt;br /&gt;
The Project is titled Lightweight badging system based on Credly. &lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is to implement several different “badges” that will be achievable for students by reaching a set of criteria. These badges will be “1st Submission”, “Dream Team”, and “Good Reviewer”. The images for the badges have previously been created, but must be re-worked to remove text that was too small to read. The logic for earning these badges must be implemented in Expertiza as well as how they display for both students and instructors.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
==== '''Expertizza''' ====&lt;br /&gt;
Expertiza project is a software to create reusable learning objects through peer review. It is an open source project based on Ruby on Rails framework. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages. It allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. The main goal of Expertiza as a whole is to have a platform for instructors to create or assign topics and students to submit their work related to the assigned topics.&lt;br /&gt;
&lt;br /&gt;
==== '''Credly''' ====&lt;br /&gt;
Credly provides an universal way for people to earn and showcase their achievements and badges. We use Credly to design the badges. We are tasked with designing three badges - namely, Top Scores, Dream Team, and Good Reviewer. We store these badges as images for use in our project and can always add, remove or modify the existing badges in the future.  &lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
The end goal of this project is to have the earned badges appear on the student’s task view as well as the instructor’s participants view. When the user hovers their cursor over an image a brief description of the badge will appear.&lt;br /&gt;
&lt;br /&gt;
===Current Implementation===&lt;br /&gt;
The student’s task view appears as shown in the below screenshot, as per the current implementation. Students can see the list of tasks/assignments and the topics, grades and deadlines for each of those assignments.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The participants view in the current implementation (i.e, prior to the proposed changes). The instructors can see the list of students, their details, and the details related to that particular task.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Proposed Implementation===&lt;br /&gt;
The student’s task view after our changes should appear as shown in the below screenshot, as per the current implementation. Students can see the badges earned along with the list of tasks/assignments and the topics, grades and deadlines for each of those assignments. Hovering over the badges would give you a brief description of the badge earned.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The participants view after the proposed implementation would be changed as shown below. The instructors can see the badges earned by the student next to the student's name along with the existing details. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===UML Diagram===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- INSERT IMG ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brief description of the UML&lt;br /&gt;
&lt;br /&gt;
===Proposed Design===&lt;br /&gt;
&lt;br /&gt;
====Tasks to be completed====&lt;br /&gt;
&lt;br /&gt;
To achieve the goal of this project we will work on four aspects.&lt;br /&gt;
&lt;br /&gt;
'''TASK 1''' - creating the badge images and implementing them as a model in Expertiza&lt;br /&gt;
* This will involve using Credly to create the badges and, &lt;br /&gt;
* Making changes to student_task/list and participants/list to show them&lt;br /&gt;
&lt;br /&gt;
'''TASK 2''' - Implement the 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt; Submission badge&lt;br /&gt;
* To do this we will need to check the submission times of each assignment through the db teams table &lt;br /&gt;
* The team with the earliest submission time will have each member earn the 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt; Submission badge&lt;br /&gt;
* The logic for this badge will be written in the team.rb file.&lt;br /&gt;
&lt;br /&gt;
'''TASK 3''' - Implement the Dream Team badge&lt;br /&gt;
* This badge will be given to a team when all of their members receive an aggregate teammate review score of 95 or above&lt;br /&gt;
* To check for this, we will average the teammate review scores for each individual member and then check to see if each member had an average of 95 or above&lt;br /&gt;
* If the team accomplishes this, each member will be awarded the Dream Team badge&lt;br /&gt;
* If any member of the team does not have an average of 95 or above then none of the team members will be awarded the badge&lt;br /&gt;
* The logic for this badge will be written in the teammate_review_response_map.rb file&lt;br /&gt;
&lt;br /&gt;
'''TASK 4''' - Implement the Good Reviewer badge&lt;br /&gt;
* This badge will be given to a student if they receive a review grade average of 95 or above from the teaching staff&lt;br /&gt;
* In order to calculate this score we will have to get each individual grade the student received on their reviews and average it out&lt;br /&gt;
* If that average is at 95 or above they will receive the badge, if not they will not be given this award&lt;br /&gt;
* The logic for this badge will be written in review_response_map.rb&lt;br /&gt;
On completing the tasks the badge system will be functional.&lt;br /&gt;
&lt;br /&gt;
==== Design Pattern Used ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;---- BRIEF DESC ON THE DESIGN PATTERN USED ----&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Features to be added====&lt;br /&gt;
&lt;br /&gt;
The badges are created in Credly and would be stored in app/assets/images/badges. The badges would called whenever a new  &lt;br /&gt;
&lt;br /&gt;
Added label or pop up which will indicate the metrics as icons, as shown below.&lt;br /&gt;
These icons will directly summarize the review in terms of predefined metrics. The reviews will be sorted according to the text metrics and will be displayed to the student on the 'Your Scores' page.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
As verified with the instructor, the scope for testing in this project will be limited to majorly UI testing&lt;br /&gt;
&lt;br /&gt;
==== Manual Testing ====&lt;br /&gt;
The following steps need to followed to test implementation manually.&lt;br /&gt;
&lt;br /&gt;
1. Log in as an instructor and identify the top scorer for a particular assignment and later later impersonate the students of that team and make sure that all the team members have received the 'top score' badge.&lt;br /&gt;
&lt;br /&gt;
2. Log in as an instructor and identify the team which received an average score greater than or equal to 95% and later later impersonate the students of that team and make sure that all the team members have received the 'dream team' badge.&lt;br /&gt;
&lt;br /&gt;
3. Log in as an instructor and give review scores for two students (one more that 95% and one less than 95% for the other) and later later impersonate the students to make sure that the student who received more than 95% review grade received the 'good reviewer' badge and the other student does not.&lt;br /&gt;
&lt;br /&gt;
4. Log in as an instructor and check if the students tested above has the badges reflected in the participant_list/list view page. The page shows all the assignment specific badges (Top score, Dream team and Good reviewer badge).&lt;br /&gt;
&lt;br /&gt;
NOTE: The details about the badge should appear when we hover the mouse pointer above the badge&lt;br /&gt;
&lt;br /&gt;
===Files Changed===&lt;br /&gt;
The following are a list of files that has been identified, which would be modified for the proposed implementation.&lt;br /&gt;
&lt;br /&gt;
====Models====&lt;br /&gt;
&lt;br /&gt;
#app/models/team.rb&lt;br /&gt;
#app/models/teammate_review_response_map.rb&lt;br /&gt;
#app/models/review_response_map.rb&lt;br /&gt;
&lt;br /&gt;
====Views====&lt;br /&gt;
&lt;br /&gt;
# app/views/participants/list.html.erb&lt;br /&gt;
# app/views/student_task/list.html.reb&lt;br /&gt;
&lt;br /&gt;
====Controllers====&lt;br /&gt;
&lt;br /&gt;
#app/controllers/participants_controller.rb&lt;br /&gt;
#app/controllers/student_task_controller.rb&lt;br /&gt;
&lt;br /&gt;
===Important Links===&lt;br /&gt;
&lt;br /&gt;
Link to Github repository :   &lt;br /&gt;
&lt;br /&gt;
Link to Pull request : &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#''https://github.com/diasks2/ruby-nlp''&lt;br /&gt;
#''http://www.ibm.com/developerworks/rational/library/769.html''&lt;br /&gt;
#''https://sourcemaking.com/design_patterns''&lt;br /&gt;
#''http://wiki.expertiza.ncsu.edu/index.php/Main_Page''&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Aarivan&amp;diff=108361</id>
		<title>User:Aarivan</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Aarivan&amp;diff=108361"/>
		<updated>2017-04-12T22:34:47Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: moved User:Aarivan to E1726 - Remove Cache Field in Roles Table: final&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[E1726 - Remove Cache Field in Roles Table]]&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=108360</id>
		<title>E1726 - Remove Cache Field in Roles Table</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=108360"/>
		<updated>2017-04-12T22:34:47Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: moved User:Aarivan to E1726 - Remove Cache Field in Roles Table: final&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is an open source web-based peer review system developed using Ruby on Rails. It is a dashboard containing all assignments for a particular course which is managed by the Professors and Teaching Assistants.&lt;br /&gt;
&lt;br /&gt;
It eases the process of selecting assignment topics and choosing team-mates for the projects and greatly reduces the burden on the Professors and Teaching Assistants of assigning and managing teams for each assignment.&lt;br /&gt;
&lt;br /&gt;
The main motive of this project is to make learning more effective through peer review. It allows students to review each other’s work and improve their work upon this feedback. It not only helps one improve their work but also provides a new way to learn.&lt;br /&gt;
&lt;br /&gt;
Students upload or provide URLs of their work on expertiza which would be reviewed by the instructors and peers. Students later get to improve their work based on the reviews provided their peers.&lt;br /&gt;
&lt;br /&gt;
== Problem statement : Remove cache field in roles table ==&lt;br /&gt;
The project requires us to remove the cache column from the roles table in database. Expertiza's 'roles' table has a 'cache' column, used by the superfish-rails gem to display different menus for different roles (super-administrator, administrator, instructor, teaching assistant, student, and unregistered user).&lt;br /&gt;
&lt;br /&gt;
There is a Role model which makes use of the long text string data stored in the roles table under the cache column to load the menus (e.g., Users \n Questionnaires \n Courses …) for a particular role at the top of the page after login. Storing such long strings in databases is a bad idea because if we want to change that large text we are required to write a migration file which would be inconvenient and also there is a restriction on the number of characters allowed for long string datatype in MySQL.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
The Design plan followed here is as follows:&lt;br /&gt;
# Move the cache column value to YAML files for each role.&lt;br /&gt;
# Load the YAML value on environment/server startup.&lt;br /&gt;
# Use the corresponding YAML values for the corresponding role for the user logging in.&lt;br /&gt;
The reason for using this design is to have a pre-defined menu list for each roles. This gives more DRY principle for the application code, instead of going with the new object declaration every time the role model is needed.&lt;br /&gt;
&lt;br /&gt;
== Tasks Identified ==&lt;br /&gt;
# Create YAML files containing the cache column data for each role from roles table in database.&lt;br /&gt;
## Create YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment&lt;br /&gt;
## Create ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up&lt;br /&gt;
# Change the role.rb model to facilitate the use of above defined YAML files&lt;br /&gt;
# Remove the cache column from the roles table by migration&lt;br /&gt;
# Write rspec unit test for 'role.rb'&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Created YAML files containing the cache column data for each role from roles table in database ===&lt;br /&gt;
&lt;br /&gt;
===== Created YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment =====&lt;br /&gt;
* 6 new files (role_admin.yml, role_instructor.yml, role_student.yml, role_super_admin.yml, role_ta.yml, role_unreg_user.yml)  each corresponding to specific role are created&lt;br /&gt;
* Content of cache column from roles table are added for development, production and test environments&lt;br /&gt;
[[File:Role_admin.JPG|center]]&lt;br /&gt;
&lt;br /&gt;
===== Created ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up =====&lt;br /&gt;
This code loads content of &amp;quot;/config/role_admin.yml&amp;quot; file and assigns to CACHED_ADMIN_MENU. Similarly, fields corresponding to different roles are populated from corresponding &amp;quot;/config/role_[ROLE]_.yml&amp;quot; file&lt;br /&gt;
[[File:load_roles.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Changed the role.rb model to facilitate the use of above defined YAML files ===&lt;br /&gt;
Rebuid_credentials and rebuild_menu method are modified to load content from yml file. Here ApplicationHelper exposes get_cache_roles method to retrieve cache content corresponding to role id.&lt;br /&gt;
[[File:role-3.jpg|center]]&lt;br /&gt;
[[File:Application helper.jpg|center]]&lt;br /&gt;
In rebuild_cache method, role.save line is removed as cache field is not saved in database now.&lt;br /&gt;
Since cache field is removed from roles table, this field is added to role model  using attr_accessible. It’s getter and setter are also created&lt;br /&gt;
[[File:role_4.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Removed the cache column from the roles table by migration ===&lt;br /&gt;
Before removing cache column in roles table&lt;br /&gt;
[[File:Cache_col.png‎|center]]&lt;br /&gt;
&lt;br /&gt;
Roles table after removing cache column&lt;br /&gt;
[[File:cache_after.jpg|center]]&lt;br /&gt;
Migration file to drop cache column&lt;br /&gt;
[[File:migrate.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The test plan followed here is done across 3 roles namely, student, administrator and instructor. The scenarios covered here are as follows:&lt;br /&gt;
# Check for the cache field and see if we get the expected value.&lt;br /&gt;
# Check if the role is valid role.&lt;br /&gt;
# Check for the cache field mismatch, that is, invalid cache field match.&lt;br /&gt;
The sections below points out the implementation steps taken to cover the test plan described above.&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
# Login into Expertiza as one of the roles - super-admin or admin or student or instructor&lt;br /&gt;
# Check the menu tabs on the top and you can find the respective drop-downs according to the role logged in&lt;br /&gt;
# On clicking the option from the drop down you will be able to navigate to the respective pages&lt;br /&gt;
# This ensures that the code change done by us didn't break the code and it delivered it's expected functionality&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
Unit tests have been written to check whether the modules work as it did earlier before. We have written rspec unit test for ‘role.rb’ which can be found here: ‘spec/models/role_spec.rb’ which tests 10 cases&lt;br /&gt;
# Evaluate the cache value with YAML values for student&lt;br /&gt;
# Evaluate the cache value with YAML values for instructor&lt;br /&gt;
# Evaluate the cache value with YAML values for admin&lt;br /&gt;
# Validation of name for student&lt;br /&gt;
# Validation of name for instructor&lt;br /&gt;
# Validation of name for admin&lt;br /&gt;
# Check the mismatch for cache values for the student in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the instructor in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the admin in factories.rb&lt;br /&gt;
# An invalid check for role object&lt;br /&gt;
[[File:rspec.jpg|center]]&lt;br /&gt;
[[File:rspec_result.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Executing RSpec===&lt;br /&gt;
The steps required to execute the unit tests as an automated run:&lt;br /&gt;
&lt;br /&gt;
1) cd into the expertiza directory&lt;br /&gt;
&lt;br /&gt;
2) Run the command: rspec spec/models/role_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
There is a lot of scope for improvement for the current code. For instance, in the present situation, the YAML files have the database data corresponding to menu_items hard coded. We could define YAML file for menu_items table and load the menu_item YAML into the corresponding role YAML during environment setup. This would eradicate the use of menu_item table from the database.&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107383</id>
		<title>E1726 - Remove Cache Field in Roles Table</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107383"/>
		<updated>2017-03-24T01:44:06Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is an open source web-based peer review system developed using Ruby on Rails. It is a dashboard containing all assignments for a particular course which is managed by the Professors and Teaching Assistants.&lt;br /&gt;
&lt;br /&gt;
It eases the process of selecting assignment topics and choosing team-mates for the projects and greatly reduces the burden on the Professors and Teaching Assistants of assigning and managing teams for each assignment.&lt;br /&gt;
&lt;br /&gt;
The main motive of this project is to make learning more effective through peer review. It allows students to review each other’s work and improve their work upon this feedback. It not only helps one improve their work but also provides a new way to learn.&lt;br /&gt;
&lt;br /&gt;
Students upload or provide URLs of their work on expertiza which would be reviewed by the instructors and peers. Students later get to improve their work based on the reviews provided their peers.&lt;br /&gt;
&lt;br /&gt;
== Problem statement : Remove cache field in roles table ==&lt;br /&gt;
The project requires us to remove the cache column from the roles table in database. Expertiza's 'roles' table has a 'cache' column, used by the superfish-rails gem to display different menus for different roles(super-administrator, administrator, instructor, teaching assistant, student, and unregistered user).&lt;br /&gt;
&lt;br /&gt;
There is a Role model which makes use of the long text string data stored in the roles table under the cache column to load the menus (e.g., Users \n Questionnaires \n Courses …) for a particular role at the top of the page after login. Storing such long strings in databases is a bad idea because if we want to change that large text we are required to write a migration file which would be inconvenient and also there is a restriction on the number of characters allowed for long string datatype in MySQL.&lt;br /&gt;
&lt;br /&gt;
We can resolve it by modifying the lines during cache attribute value assignment in the model. But the problem is that it will make the data used by different users inconsistent. We can work around this modification in an easy fashion, if we could store the large strings in the YAML files (one file for each role in the database)&lt;br /&gt;
&lt;br /&gt;
== Tasks Identified ==&lt;br /&gt;
# Create YAML files containing the cache column data for each role from roles table in database.&lt;br /&gt;
## Create YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment&lt;br /&gt;
## Create ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up&lt;br /&gt;
# Change the role.rb model to facilitate the use of above defined YAML files&lt;br /&gt;
# Remove the cache column from the roles table by migration&lt;br /&gt;
# Write rspec unit test for 'role.rb'&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Created YAML files containing the cache column data for each role from roles table in database ===&lt;br /&gt;
&lt;br /&gt;
===== Created YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment =====&lt;br /&gt;
* 6 new files (role_admin.yml, role_instructor.yml, role_student.yml, role_super_admin.yml, role_ta.yml, role_unreg_user.yml)  each corresponding to specific role are created&lt;br /&gt;
* Content of cache column from roles table are added for development, production and test environments&lt;br /&gt;
[[File:Role_admin.JPG|center]]&lt;br /&gt;
&lt;br /&gt;
===== Created ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up =====&lt;br /&gt;
This code loads content of &amp;quot;/config/role_admin.yml&amp;quot; file and assigns to CACHED_ADMIN_MENU. Similarly, fields corresponding to different roles are populated from corresponding &amp;quot;/config/role_[ROLE]_.yml&amp;quot; file&lt;br /&gt;
[[File:load_roles.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Changed the role.rb model to facilitate the use of above defined YAML files ===&lt;br /&gt;
Rebuid_credentials and rebuild_menu method are modified to load content from yml file. Here ApplicationHelper exposes get_cache_roles method to retrieve cache content corresponding to role id.&lt;br /&gt;
[[File:role-3.jpg|center]]&lt;br /&gt;
[[File:Application helper.jpg|center]]&lt;br /&gt;
In rebuild_cache method, role.save line is removed as cache field is not saved in database now.&lt;br /&gt;
Since cache field is removed from roles table, this field is added to role model  using attr_accessible. It’s getter and setter are also created&lt;br /&gt;
[[File:role_4.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Removed the cache column from the roles table by migration ===&lt;br /&gt;
Before removing cache column in roles table&lt;br /&gt;
[[File:Cache_col.png‎|center]]&lt;br /&gt;
&lt;br /&gt;
Roles table after removing cache column&lt;br /&gt;
[[File:cache_after.jpg|center]]&lt;br /&gt;
Migration file to drop cache column&lt;br /&gt;
[[File:migrate.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
# Login into Expertiza as one of the roles - super-admin or admin or student or instructor&lt;br /&gt;
# Check the menu tabs on the top and you can find the respective drop-downs according to the role logged in&lt;br /&gt;
# On clicking the option from the drop down you will be able to navigate to the respective pages&lt;br /&gt;
# This ensures that the code change done by us didn't break the code and it delivered it's expected functionality&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing ===&lt;br /&gt;
Unit tests have been written to check whether the modules work as it did earlier before. We have written rspec unit test for ‘role.rb’ which can be found here: ‘spec/models/role_spec.rb’ which tests 10 cases&lt;br /&gt;
# Evaluate the cache value with YAML values for student&lt;br /&gt;
# Evaluate the cache value with YAML values for instructor&lt;br /&gt;
# Evaluate the cache value with YAML values for admin&lt;br /&gt;
# Validation of name for student&lt;br /&gt;
# Validation of name for instructor&lt;br /&gt;
# Validation of name for admin&lt;br /&gt;
# Check the mismatch for cache values for the student in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the instructor in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the admin in factories.rb&lt;br /&gt;
# An invalid check for role object&lt;br /&gt;
[[File:rspec.jpg|center]]&lt;br /&gt;
[[File:rspec_result.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
There is a lot of scope for improvement for the current code. For instance, in the present situation, the YAML files have the database data corresponding to menu_items hard coded. We could define YAML file for menu_items table and load the menu_item YAML into the corresponding role YAML during environment setup. This would eradicate the use of menu_item table from the database.&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role_4.jpg&amp;diff=107382</id>
		<title>File:Role 4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role_4.jpg&amp;diff=107382"/>
		<updated>2017-03-24T01:43:48Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role-3.jpg&amp;diff=107381</id>
		<title>File:Role-3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role-3.jpg&amp;diff=107381"/>
		<updated>2017-03-24T01:43:30Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107366</id>
		<title>E1726 - Remove Cache Field in Roles Table</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107366"/>
		<updated>2017-03-24T01:18:44Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is an open source web-based peer review system developed using Ruby on Rails. It is a dashboard containing all assignments for a particular course which is managed by the Professors and Teaching Assistants.&lt;br /&gt;
&lt;br /&gt;
It eases the process of selecting assignment topics and choosing team-mates for the projects and greatly reduces the burden on the Professors and Teaching Assistants of assigning and managing teams for each assignment.&lt;br /&gt;
&lt;br /&gt;
The main motive of this project is to make learning more effective through peer review. It allows students to review each other’s work and improve their work upon this feedback. It not only helps one improve their work but also provides a new way to learn.&lt;br /&gt;
&lt;br /&gt;
Students upload or provide URLs of their work on expertiza which would be reviewed by the instructors and peers. Students later get to improve their work based on the reviews provided their peers.&lt;br /&gt;
&lt;br /&gt;
== Problem statement : Remove cache field in roles table ==&lt;br /&gt;
The project requires us to remove the cache column from the roles table in database. Expertiza's 'roles' table has a 'cache' column, used by the superfish-rails gem to display different menus for different roles(super-administrator, administrator, instructor, teaching assistant, student, and unregistered user).&lt;br /&gt;
&lt;br /&gt;
There is a Role model which makes use of the long text string data stored in the roles table under the cache column to load the menus (e.g., Users \n Questionnaires \n Courses …) for a particular role at the top of the page after login. Storing such long strings in databases is a bad idea because if we want to change that large text we are required to write a migration file which would be inconvenient and also there is a restriction on the number of characters allowed for long string datatype in MySQL.&lt;br /&gt;
&lt;br /&gt;
We can resolve it by modifying the lines during cache attribute value assignment in the model. But the problem is that it will make the data used by different users inconsistent. We can work around this modification in an easy fashion, if we could store the large strings in the YAML files (one file for each role in the database)&lt;br /&gt;
&lt;br /&gt;
== Tasks Identified ==&lt;br /&gt;
# Create YAML files containing the cache column data for each role from roles table in database.&lt;br /&gt;
## Create YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment&lt;br /&gt;
## Create ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up&lt;br /&gt;
# Change the role.rb model to facilitate the use of above defined YAML files&lt;br /&gt;
# Remove the cache column from the roles table by migration&lt;br /&gt;
# Write rspec unit test for 'role.rb'&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Created YAML files containing the cache column data for each role from roles table in database ===&lt;br /&gt;
&lt;br /&gt;
===== Created YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment =====&lt;br /&gt;
* 6 new files (role_admin.yml, role_instructor.yml, role_student.yml, role_super_admin.yml, role_ta.yml, role_unreg_user.yml)  each corresponding to specific role are created&lt;br /&gt;
* Content of cache column from roles table are added for development, production and test environments&lt;br /&gt;
[[File:Role_admin.JPG|center]]&lt;br /&gt;
&lt;br /&gt;
===== Created ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up =====&lt;br /&gt;
This code loads content of &amp;quot;/config/role_admin.yml&amp;quot; file and assigns to CACHED_ADMIN_MENU. Similarly, fields corresponding to different roles are populated from corresponding &amp;quot;/config/role_[ROLE]_.yml&amp;quot; file&lt;br /&gt;
[[File:load_roles.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Changed the role.rb model to facilitate the use of above defined YAML files ===&lt;br /&gt;
Rebuid_credentials and rebuild_menu method are modified to load content from yml file. Here ApplicationHelper exposes get_cache_roles method to retrieve cache content corresponding to role id.&lt;br /&gt;
[[File:Role 2.jpg|center]]&lt;br /&gt;
[[File:Application helper.jpg|center]]&lt;br /&gt;
In rebuild_cache method, role.save line is removed as cache field is not saved in database now.&lt;br /&gt;
Since cache field is removed from roles table, this field is added to role model  using attr_accessible. It’s getter and setter are also created&lt;br /&gt;
[[File:Role.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Removed the cache column from the roles table by migration ===&lt;br /&gt;
Before removing cache column in roles table&lt;br /&gt;
[[File:cache_col.jpg|center]]&lt;br /&gt;
Migration file to drop cache column&lt;br /&gt;
&lt;br /&gt;
Roles table after removing cache column&lt;br /&gt;
[[File:cache_after.jpg|center]]&lt;br /&gt;
Migration file is created to remove cache column from roles table&lt;br /&gt;
[[File:migrate.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
# Login into Expertiza as one of the roles - super-admin or admin or student or instructor&lt;br /&gt;
# Check the menu tabs on the top and you can find the respective drop-downs according to the role logged in&lt;br /&gt;
# On clicking the option from the drop down you will be able to navigate to the respective pages&lt;br /&gt;
# This ensures that the code change done by us didn't break the code and it delivered it's expected functionality&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing ===&lt;br /&gt;
Unit tests have been written to check whether the modules work as it did earlier before. We have written rspec unit test for ‘role.rb’ which can be found here: ‘spec/models/role_spec.rb’ which tests 10 cases&lt;br /&gt;
# Evaluate the cache value with YAML values for student&lt;br /&gt;
# Evaluate the cache value with YAML values for instructor&lt;br /&gt;
# Evaluate the cache value with YAML values for admin&lt;br /&gt;
# Validation of name for student&lt;br /&gt;
# Validation of name for instructor&lt;br /&gt;
# Validation of name for admin&lt;br /&gt;
# Check the mismatch for cache values for the student in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the instructor in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the admin in factories.rb&lt;br /&gt;
# An invalid check for role object&lt;br /&gt;
[[File:rspec.jpg|center]]&lt;br /&gt;
[[File:rspec_result.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
There is a lot of scope for improvement for the current code. For instance, in the present situation, the YAML files have the database data corresponding to menu_items hard coded. We could define YAML file for menu_items table and load the menu_item YAML into the corresponding role YAML during environment setup. This would eradicate the use of menu_item table from the database.&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Rspec_result.jpg&amp;diff=107364</id>
		<title>File:Rspec result.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Rspec_result.jpg&amp;diff=107364"/>
		<updated>2017-03-24T01:18:25Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Rspec.jpg&amp;diff=107363</id>
		<title>File:Rspec.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Rspec.jpg&amp;diff=107363"/>
		<updated>2017-03-24T01:18:12Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107355</id>
		<title>E1726 - Remove Cache Field in Roles Table</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107355"/>
		<updated>2017-03-24T01:03:29Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is an open source web-based peer review system developed using Ruby on Rails. It is a dashboard containing all assignments for a particular course which is managed by the Professors and Teaching Assistants.&lt;br /&gt;
&lt;br /&gt;
It eases the process of selecting assignment topics and choosing team-mates for the projects and greatly reduces the burden on the Professors and Teaching Assistants of assigning and managing teams for each assignment.&lt;br /&gt;
&lt;br /&gt;
The main motive of this project is to make learning more effective through peer review. It allows students to review each other’s work and improve their work upon this feedback. It not only helps one improve their work but also provides a new way to learn.&lt;br /&gt;
&lt;br /&gt;
Students upload or provide URLs of their work on expertiza which would be reviewed by the instructors and peers. Students later get to improve their work based on the reviews provided their peers.&lt;br /&gt;
&lt;br /&gt;
== Problem statement : Remove cache field in roles table ==&lt;br /&gt;
The project requires us to remove the cache column from the roles table in database. Expertiza's 'roles' table has a 'cache' column, used by the superfish-rails gem to display different menus for different roles(super-administrator, administrator, instructor, teaching assistant, student, and unregistered user).&lt;br /&gt;
&lt;br /&gt;
There is a Role model which makes use of the long text string data stored in the roles table under the cache column to load the menus (e.g., Users \n Questionnaires \n Courses …) for a particular role at the top of the page after login. Storing such long strings in databases is a bad idea because if we want to change that large text we are required to write a migration file which would be inconvenient and also there is a restriction on the number of characters allowed for long string datatype in MySQL.&lt;br /&gt;
&lt;br /&gt;
We can resolve it by modifying the lines during cache attribute value assignment in the model. But the problem is that it will make the data used by different users inconsistent. We can work around this modification in an easy fashion, if we could store the large strings in the YAML files (one file for each role in the database)&lt;br /&gt;
&lt;br /&gt;
== Tasks Identified ==&lt;br /&gt;
# Create YAML files containing the cache column data for each role from roles table in database.&lt;br /&gt;
## Create YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment&lt;br /&gt;
## Create ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up&lt;br /&gt;
# Change the role.rb model to facilitate the use of above defined YAML files&lt;br /&gt;
# Remove the cache column from the roles table by migration&lt;br /&gt;
# Write rspec unit test for 'role.rb'&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Created YAML files containing the cache column data for each role from roles table in database ===&lt;br /&gt;
&lt;br /&gt;
===== Created YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment =====&lt;br /&gt;
* 6 new files (role_admin.yml, role_instructor.yml, role_student.yml, role_super_admin.yml, role_ta.yml, role_unreg_user.yml)  each corresponding to specific role are created&lt;br /&gt;
* Content of cache column from roles table are added for development, production and test environments&lt;br /&gt;
[[File:Role_admin.JPG|center]]&lt;br /&gt;
&lt;br /&gt;
===== Created ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up =====&lt;br /&gt;
This code loads content of &amp;quot;/config/role_admin.yml&amp;quot; file and assigns to CACHED_ADMIN_MENU. Similarly, fields corresponding to different roles are populated from corresponding &amp;quot;/config/role_[ROLE]_.yml&amp;quot; file&lt;br /&gt;
[[File:load_roles.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Changed the role.rb model to facilitate the use of above defined YAML files ===&lt;br /&gt;
Rebuid_credentials and rebuild_menu method are modified to load content from yml file. Here ApplicationHelper exposes get_cache_roles method to retrieve cache content corresponding to role id.&lt;br /&gt;
[[File:Role 2.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
In rebuild_cache method, role.save line is removed as cache field is not saved in database now.&lt;br /&gt;
Since cache field is removed from roles table, this field is added to role model  using attr_accessible. It’s getter and setter are also created&lt;br /&gt;
[[File:Role.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
=== Removed the cache column from the roles table by migration ===&lt;br /&gt;
Before removing cache column in roles table&lt;br /&gt;
[[File:cache_col.jpg|center]]&lt;br /&gt;
Migration file to drop cache column&lt;br /&gt;
&lt;br /&gt;
Roles table after removing cache column&lt;br /&gt;
[[File:cache_after.jpg|center]]&lt;br /&gt;
Migration file is created to remove cache column from roles table&lt;br /&gt;
[[File:migrate.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
# Login into Expertiza as one of the roles - super-admin or admin or student or instructor&lt;br /&gt;
# Check the menu tabs on the top and you can find the respective drop-downs according to the role logged in&lt;br /&gt;
# On clicking the option from the drop down you will be able to navigate to the respective pages&lt;br /&gt;
# This ensures that the code change done by us didn't break the code and it delivered it's expected functionality&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing ===&lt;br /&gt;
Unit tests have been written to check whether the modules work as it did earlier before. We have written rspec unit test for ‘role.rb’ which can be found here: ‘spec/models/role_spec.rb’ which tests 10 cases&lt;br /&gt;
# Evaluate the cache value with YAML values for student&lt;br /&gt;
# Evaluate the cache value with YAML values for instructor&lt;br /&gt;
# Evaluate the cache value with YAML values for admin&lt;br /&gt;
# Validation of name for student&lt;br /&gt;
# Validation of name for instructor&lt;br /&gt;
# Validation of name for admin&lt;br /&gt;
# Check the mismatch for cache values for the student in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the instructor in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the admin in factories.rb&lt;br /&gt;
# An invalid check for role object&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
There is a lot of scope for improvement for the current code. For instance, in the present situation, the YAML files have the database data corresponding to menu_items hard coded. We could define YAML file for menu_items table and load the menu_item YAML into the corresponding role YAML during environment setup. This would eradicate the use of menu_item table from the database.&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Migrate.jpg&amp;diff=107353</id>
		<title>File:Migrate.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Migrate.jpg&amp;diff=107353"/>
		<updated>2017-03-24T01:03:06Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Cache_after.jpg&amp;diff=107346</id>
		<title>File:Cache after.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Cache_after.jpg&amp;diff=107346"/>
		<updated>2017-03-24T00:54:46Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role_2.jpg&amp;diff=107335</id>
		<title>File:Role 2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role_2.jpg&amp;diff=107335"/>
		<updated>2017-03-24T00:18:11Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107334</id>
		<title>File:Role.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107334"/>
		<updated>2017-03-24T00:15:26Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: uploaded a new version of &amp;amp;quot;File:Role.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107332</id>
		<title>File:Role.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107332"/>
		<updated>2017-03-24T00:14:24Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: uploaded a new version of &amp;amp;quot;File:Role.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107330</id>
		<title>File:Role.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107330"/>
		<updated>2017-03-24T00:13:49Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: uploaded a new version of &amp;amp;quot;File:Role.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107329</id>
		<title>File:Role.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role.jpg&amp;diff=107329"/>
		<updated>2017-03-24T00:13:27Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Application_helper.jpg&amp;diff=107327</id>
		<title>File:Application helper.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Application_helper.jpg&amp;diff=107327"/>
		<updated>2017-03-24T00:09:37Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Load_roles.jpg&amp;diff=107316</id>
		<title>File:Load roles.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Load_roles.jpg&amp;diff=107316"/>
		<updated>2017-03-23T23:28:41Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Role_admin.JPG&amp;diff=107310</id>
		<title>File:Role admin.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Role_admin.JPG&amp;diff=107310"/>
		<updated>2017-03-23T23:21:22Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107180</id>
		<title>E1726 - Remove Cache Field in Roles Table</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107180"/>
		<updated>2017-03-23T01:39:13Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: First draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is an open source web-based peer review system developed using Ruby on Rails. It is a dashboard containing all assignments for a particular course which is managed by the Professors and Teaching Assistants.&lt;br /&gt;
&lt;br /&gt;
It eases the process of selecting assignment topics and choosing team-mates for the projects and greatly reduces the burden on the Professors and Teaching Assistants of assigning and managing teams for each assignment.&lt;br /&gt;
&lt;br /&gt;
The main motive of this project is to make learning more effective through peer review. It allows students to review each other’s work and improve their work upon this feedback. It not only helps one improve their work but also provides a new way to learn.&lt;br /&gt;
&lt;br /&gt;
Students upload or provide URLs of their work on expertiza which would be reviewed by the instructors and peers. Students later get to improve their work based on the reviews provided their peers.&lt;br /&gt;
&lt;br /&gt;
== Problem statement : Remove cache field in roles table ==&lt;br /&gt;
The project requires us to remove the cache column from the roles table in database. Expertiza's 'roles' table has a 'cache' column, used by the superfish-rails gem to display different menus for different roles(super-administrator, administrator, instructor, teaching assistant, student, and unregistered user).&lt;br /&gt;
&lt;br /&gt;
There is a Role model which makes use of the long text string data stored in the roles table under the cache column to load the menus (e.g., Users \n Questionnaires \n Courses …) for a particular role at the top of the page after login. Storing such long strings in databases is a bad idea because if we want to change that large text we are required to write a migration file which would be inconvenient and also there is a restriction on the number of characters allowed for long string datatype in MySQL.&lt;br /&gt;
&lt;br /&gt;
We can resolve it by modifying the lines during cache attribute value assignment in the model. But the problem is that it will make the data used by different users inconsistent. We can work around this modification in an easy fashion, if we could store the large strings in the YAML files (one file for each role in the database)&lt;br /&gt;
&lt;br /&gt;
== Tasks Identified ==&lt;br /&gt;
# Create YAML files containing the cache column data for each role from roles table in database.&lt;br /&gt;
## Create YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment&lt;br /&gt;
## Create ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up&lt;br /&gt;
# Change the role.rb model to facilitate the use of above defined YAML files&lt;br /&gt;
# Remove the cache column from the roles table by migration&lt;br /&gt;
# Write rspec unit test for 'role.rb'&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Created YAML files containing the cache column data for each role from roles table in database ===&lt;br /&gt;
&lt;br /&gt;
===== Created YAML files under 'config' folder named 'role_admin.yml' and put the 'cache' column value in it split across rails environment =====&lt;br /&gt;
* 6 new files (role_admin.yml, role_instructor.yml, role_student.yml, role_super_admin.yml, role_ta.yml, role_unreg_user.yml)  each corresponding to specific role are created&lt;br /&gt;
* Content of cache column from roles table are added for development, production and test environments&lt;br /&gt;
&lt;br /&gt;
===== Created ruby script under 'config/initializers' folder named 'load_roles.rb' - to load the corresponding YAML values once the environment is set up =====&lt;br /&gt;
This code loads content of &amp;quot;/config/role_admin.yml&amp;quot; file and assigns to CACHED_ADMIN_MENU. Similarly, fields corresponding to different roles are populated from corresponding &amp;quot;/config/role_[ROLE]_.yml&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
=== Changed the role.rb model to facilitate the use of above defined YAML files ===&lt;br /&gt;
Rebuid_credentials and rebuild_menu method are modified to load content from yml file. Here ApplicationController exposes get_cache_roles method to retrieve cache content corresponding to role id.&lt;br /&gt;
&lt;br /&gt;
In rebuild_cache method, role.save line is removed as cache field is not saved in database now.&lt;br /&gt;
&lt;br /&gt;
Since cache field is removed from roles table, this field is added to role model  using attr_accessible. It’s getter and setter are also created&lt;br /&gt;
&lt;br /&gt;
=== Removed the cache column from the roles table by migration ===&lt;br /&gt;
Before removing cache column in roles table&lt;br /&gt;
&lt;br /&gt;
Migration file to drop cache column&lt;br /&gt;
&lt;br /&gt;
Roles table after removing cache column&lt;br /&gt;
&lt;br /&gt;
Migration file is created to remove cache column from roles table&lt;br /&gt;
&lt;br /&gt;
== Testing Details ==&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
# Login into Expertiza as one of the roles - super-admin or admin or student or instructor&lt;br /&gt;
# Check the menu tabs on the top and you can find the respective drop-downs according to the role logged in&lt;br /&gt;
# On clicking the option from the drop down you will be able to navigate to the respective pages&lt;br /&gt;
# This ensures that the code change done by us didn't break the code and it delivered it's expected functionality&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing ===&lt;br /&gt;
Unit tests have been written to check whether the modules work as it did earlier before. We have written rspec unit test for ‘role.rb’ which can be found here: ‘spec/models/role_spec.rb’ which tests 10 cases&lt;br /&gt;
# Evaluate the cache value with YAML values for student&lt;br /&gt;
# Evaluate the cache value with YAML values for instructor&lt;br /&gt;
# Evaluate the cache value with YAML values for admin&lt;br /&gt;
# Validation of name for student&lt;br /&gt;
# Validation of name for instructor&lt;br /&gt;
# Validation of name for admin&lt;br /&gt;
# Check the mismatch for cache values for the student in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the instructor in factories.rb&lt;br /&gt;
# Check the mismatch for cache values for the admin in factories.rb&lt;br /&gt;
# An invalid check for role object&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
There is a lot of scope for improvement for the current code. For instance, in the present situation, the YAML files have the database data corresponding to menu_items hard coded. We could define YAML file for menu_items table and load the menu_item YAML into the corresponding role YAML during environment setup. This would eradicate the use of menu_item table from the database.&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107165</id>
		<title>E1726 - Remove Cache Field in Roles Table</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1726_-_Remove_Cache_Field_in_Roles_Table&amp;diff=107165"/>
		<updated>2017-03-23T00:53:32Z</updated>

		<summary type="html">&lt;p&gt;Aarivan: Created page with &amp;quot;Introduction Background   Expertiza is an open source web-based peer review system developed using Ruby on Rails. It is a dashboard containing all assignments for a particular co...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Introduction&lt;br /&gt;
Background&lt;br /&gt;
 &lt;br /&gt;
Expertiza is an open source web-based peer review system developed using Ruby on Rails. It is a dashboard containing all assignments for a particular course which is managed by the Professors and Teaching Assistants.&lt;br /&gt;
 &lt;br /&gt;
It eases the process of selecting assignment topics and choosing team-mates for the projects.&lt;br /&gt;
 &lt;br /&gt;
It greatly reduces the burden on the Professors and Teaching Assistants of assigning and managing teams for each assignment.&lt;br /&gt;
 &lt;br /&gt;
The main motive of this project is to make learning more effective through peer review. It allows students to review each other’s work and improve their work upon this feedback. This helps in improving the existing work and also provides a new way to learn.&lt;br /&gt;
 &lt;br /&gt;
Students upload or provide URLs of their work on expertiza which would be reviewed by the instructors and peers. Students later get to improve their work based on the reviews provided their peers.&lt;/div&gt;</summary>
		<author><name>Aarivan</name></author>
	</entry>
</feed>