<?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=Knjhaver</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=Knjhaver"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Knjhaver"/>
	<updated>2026-08-23T00:10:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=84929</id>
		<title>MainPage</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=84929"/>
		<updated>2014-09-08T13:47:35Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Course-Specific Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Course-Specific Topics==&lt;br /&gt;
* [[CSC 216]] learning exercise&lt;br /&gt;
* [[CSC 379]]&lt;br /&gt;
* [[CSC/ECE 506 Fall 2007]]&lt;br /&gt;
* [[ECE506_Main_Page | CSC/ECE 506 Main Portal]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2007]]&lt;br /&gt;
* [[CSC/ECE 517 Summer 2008]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2010]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2011]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2012]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2013]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2014]]&lt;br /&gt;
* [[CSC 456 Spring 2011|CSC 456 Spring 2012]]&lt;br /&gt;
* [[ECE 633]]&lt;br /&gt;
* [[KCU]]&lt;br /&gt;
* [[Progress reports]]&lt;br /&gt;
&lt;br /&gt;
==Application Behavior==&lt;br /&gt;
* [[Grading]]&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
* [[CSC/ECE_517_Spring_2013/ch1b_1k_hf|Lecture on Metaprogramming]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
''Expertiza now has a Java dependency, so the machine you are using to develop Expertiza on should have the JVM installed.''&lt;br /&gt;
&lt;br /&gt;
* [[Setting Up a Development Machine]]&lt;br /&gt;
* [[Creating a Linux Development Environment for Expertiza - Installation Guide]]&lt;br /&gt;
* [[Using git and github for projects]]&lt;br /&gt;
* [[Using heroku to deploy your projects]]&lt;br /&gt;
* [[How to Begin a Project from the Current Expertiza Repository]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[How to Change a User's Password on a Development Machine]]&lt;br /&gt;
* [[Debugging Rails]]&lt;br /&gt;
&lt;br /&gt;
==Production==&lt;br /&gt;
* [[Deploying to Production]]&lt;br /&gt;
* [[Downloading Production Data]]&lt;br /&gt;
* [[Accessing the Production Server]]&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
* [[Using Cucumber with Expertiza]]&lt;br /&gt;
* [[Rails Testing Overview]]&lt;br /&gt;
* [[Expertiza Continuous Integration]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
* [[Object-Oriented Design and Programming]]&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Downloading_Production_Data&amp;diff=84925</id>
		<title>Downloading Production Data</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Downloading_Production_Data&amp;diff=84925"/>
		<updated>2014-08-27T13:39:00Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rails 3 ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd &amp;lt;your_github_repository&amp;gt;&lt;br /&gt;
 bundle install&lt;br /&gt;
 bundle exec cap -v&lt;br /&gt;
 ruby -v&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
 rvm use 1.8.7&lt;br /&gt;
 rails -v&lt;br /&gt;
 bundle exec rails -v&lt;br /&gt;
 bundle exec rake db:setup&lt;br /&gt;
 # Create tunnel in another window:&lt;br /&gt;
 ssh -L 127.0.0.1:2222:expertiza.ncsu.edu:22 &amp;lt;your-realm-id&amp;gt;@remote.eos.ncsu.edu&lt;br /&gt;
 Leave this tunnel open while executing the following commands.&lt;br /&gt;
 bundle exec cap proxy load_data&lt;br /&gt;
 [When prompted to log in:&lt;br /&gt;
   Proxy server: localhost&lt;br /&gt;
   Login: &amp;lt;your-realm-id&amp;gt;&lt;br /&gt;
   Port: 22&lt;br /&gt;
   Password: &amp;lt;realm pw.&amp;gt;]&lt;br /&gt;
 bundle exec rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rails 4 ==&lt;br /&gt;
cd &amp;lt;your_github_repository&amp;gt;&lt;br /&gt;
bundle install&lt;br /&gt;
bundle exec cap -v&lt;br /&gt;
ruby -v&lt;br /&gt;
source /etc/profile&lt;br /&gt;
rvm use 1.8.7&lt;br /&gt;
rails -v&lt;br /&gt;
bundle exec rails -v&lt;br /&gt;
bundle exec rake db:setup&lt;br /&gt;
[Create tunnel in another window:&lt;br /&gt;
 ssh -L 127.0.0.1:2222:expertiza.ncsu.edu:22 &amp;lt;your-realm-id&amp;gt;@remote.eos.ncsu.edu&lt;br /&gt;
 Leave this tunnel open while executing the following commands.]&lt;br /&gt;
bundle exec cap proxy db:pull&lt;br /&gt;
 [When prompted to log in:&lt;br /&gt;
   Proxy server: localhost&lt;br /&gt;
   Login: &amp;lt;your-realm-id&amp;gt;&lt;br /&gt;
   Port: 22&lt;br /&gt;
   Password: &amp;lt;realm pw.&amp;gt;]&lt;br /&gt;
bundle exec rake db:migrate&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Downloading_Production_Data&amp;diff=84922</id>
		<title>Downloading Production Data</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Downloading_Production_Data&amp;diff=84922"/>
		<updated>2014-08-27T13:33:51Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rails 3:&lt;br /&gt;
cd &amp;lt;your_github_repository&amp;gt;&lt;br /&gt;
bundle install&lt;br /&gt;
bundle exec cap -v&lt;br /&gt;
ruby -v&lt;br /&gt;
source /etc/profile&lt;br /&gt;
rvm use 1.8.7&lt;br /&gt;
rails -v&lt;br /&gt;
bundle exec rails -v&lt;br /&gt;
bundle exec rake db:setup&lt;br /&gt;
[Create tunnel in another window:&lt;br /&gt;
 ssh -L 127.0.0.1:2222:expertiza.ncsu.edu:22 &amp;lt;your-realm-id&amp;gt;@remote.eos.ncsu.edu&lt;br /&gt;
 Leave this tunnel open while executing the following commands.]&lt;br /&gt;
bundle exec cap proxy load_data&lt;br /&gt;
 [When prompted to log in:&lt;br /&gt;
   Proxy server: localhost&lt;br /&gt;
   Login: &amp;lt;your-realm-id&amp;gt;&lt;br /&gt;
   Port: 22&lt;br /&gt;
   Password: &amp;lt;realm pw.&amp;gt;]&lt;br /&gt;
bundle exec rake db:migrate&lt;br /&gt;
&lt;br /&gt;
Rails 4:&lt;br /&gt;
cd &amp;lt;your_github_repository&amp;gt;&lt;br /&gt;
bundle install&lt;br /&gt;
bundle exec cap -v&lt;br /&gt;
ruby -v&lt;br /&gt;
source /etc/profile&lt;br /&gt;
rvm use 1.8.7&lt;br /&gt;
rails -v&lt;br /&gt;
bundle exec rails -v&lt;br /&gt;
bundle exec rake db:setup&lt;br /&gt;
[Create tunnel in another window:&lt;br /&gt;
 ssh -L 127.0.0.1:2222:expertiza.ncsu.edu:22 &amp;lt;your-realm-id&amp;gt;@remote.eos.ncsu.edu&lt;br /&gt;
 Leave this tunnel open while executing the following commands.]&lt;br /&gt;
bundle exec cap proxy load_data&lt;br /&gt;
 [When prompted to log in:&lt;br /&gt;
   Proxy server: localhost&lt;br /&gt;
   Login: &amp;lt;your-realm-id&amp;gt;&lt;br /&gt;
   Port: 22&lt;br /&gt;
   Password: &amp;lt;realm pw.&amp;gt;]&lt;br /&gt;
bundle exec rake db:migrate&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82364</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82364"/>
		<updated>2013-11-03T02:08:34Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Appendix==&lt;br /&gt;
Expertiza VCL image: http://152.46.19.82:3000/&lt;br /&gt;
Forked GitHub Repository: https://github.com/krunaljhaveri/expertiza&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82363</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82363"/>
		<updated>2013-11-03T02:03:58Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Submit.png&amp;diff=82362</id>
		<title>File:Submit.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Submit.png&amp;diff=82362"/>
		<updated>2013-11-03T02:02:38Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: uploaded a new version of &amp;amp;quot;File:Submit.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Newview_my_scores.png&amp;diff=82361</id>
		<title>File:Newview my scores.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Newview_my_scores.png&amp;diff=82361"/>
		<updated>2013-11-03T02:01:14Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: uploaded a new version of &amp;amp;quot;File:Newview my scores.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:One_new_partial.png&amp;diff=82360</id>
		<title>File:One new partial.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:One_new_partial.png&amp;diff=82360"/>
		<updated>2013-11-03T01:59:53Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: uploaded a new version of &amp;amp;quot;File:One new partial.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82359</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82359"/>
		<updated>2013-11-03T01:57:52Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82358</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82358"/>
		<updated>2013-11-03T01:56:55Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;div id=&amp;quot;tabs&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
 &amp;lt;li id=&amp;quot;tab1&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-11&amp;quot;&amp;gt;Submitted Work&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab2&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-12&amp;quot;&amp;gt;Reviewing&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab3&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-13&amp;quot;&amp;gt;Author Feedback&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab4&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-14&amp;quot;&amp;gt;TeamMate Review&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab5&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-15&amp;quot;&amp;gt;Total Score&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-11&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;p&amp;gt;&amp;lt;%= render :partial =&amp;gt; 'grades/submittedwork', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;    @participant.get_scores(@questions)} %&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-12&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/meta', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-13&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/author',:locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-14&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/teammate',:locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-15&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render 'grades/scores' %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;&lt;br /&gt;
        jQuery(document).ready(function () {&lt;br /&gt;
            jQuery(&amp;quot;#tabs&amp;quot;).tabs();&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82357</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82357"/>
		<updated>2013-11-03T01:56:02Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;div id=&amp;quot;tabs&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab1&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-11&amp;quot;&amp;gt;Submitted Work&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab2&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-12&amp;quot;&amp;gt;Reviewing&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab3&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-13&amp;quot;&amp;gt;Author Feedback&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab4&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-14&amp;quot;&amp;gt;TeamMate Review&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab5&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-15&amp;quot;&amp;gt;Total Score&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-11&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;p&amp;gt;&amp;lt;%= render :partial =&amp;gt; 'grades/submittedwork', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;    @participant.get_scores(@questions)} %&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-12&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/meta', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-13&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/author',:locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-14&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/teammate',:locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-15&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render 'grades/scores' %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;&lt;br /&gt;
        jQuery(document).ready(function () {&lt;br /&gt;
            jQuery(&amp;quot;#tabs&amp;quot;).tabs();&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82356</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82356"/>
		<updated>2013-11-03T01:54:55Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;div id=&amp;quot;tabs&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;ul&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab1&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-11&amp;quot;&amp;gt;Submitted Work&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab2&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-12&amp;quot;&amp;gt;Reviewing&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab3&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-13&amp;quot;&amp;gt;Author Feedback&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab4&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-14&amp;quot;&amp;gt;TeamMate Review&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li id=&amp;quot;tab5&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#tabs-15&amp;quot;&amp;gt;Total Score&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ul&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-11&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;p&amp;gt;&amp;lt;%= render :partial =&amp;gt; 'grades/submittedwork', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;    @participant.get_scores(@questions)} %&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-12&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/meta', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-13&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/author',:locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-14&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'grades/teammate',:locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt;  @participant.get_scores(@questions)} %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id=&amp;quot;tabs-15&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;%= render 'grades/scores' %&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;&lt;br /&gt;
        jQuery(document).ready(function () {&lt;br /&gt;
            jQuery(&amp;quot;#tabs&amp;quot;).tabs();&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot2.jpg&amp;diff=82355</id>
		<title>File:Screenshot2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot2.jpg&amp;diff=82355"/>
		<updated>2013-11-03T01:53:00Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: uploaded a new version of &amp;amp;quot;File:Screenshot2.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82354</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82354"/>
		<updated>2013-11-03T01:52:04Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Modified User Interface to view scores and reviews in tabs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot2.jpg&amp;diff=82353</id>
		<title>File:Screenshot2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot2.jpg&amp;diff=82353"/>
		<updated>2013-11-03T01:51:23Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled2_kj.jpg&amp;diff=82352</id>
		<title>File:Untitled2 kj.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled2_kj.jpg&amp;diff=82352"/>
		<updated>2013-11-03T01:37:57Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: uploaded a new version of &amp;amp;quot;File:Untitled2 kj.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82351</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82351"/>
		<updated>2013-11-03T01:35:04Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Initial User Interface to view scores */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design.&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:twoFinal805.png]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82350</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82350"/>
		<updated>2013-11-03T01:34:32Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled2_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled1_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:twoFinal805.png]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82349</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82349"/>
		<updated>2013-11-03T01:33:06Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled_kj2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled_kj.jpg]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:twoFinal805.png]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled2_kj.jpg&amp;diff=82348</id>
		<title>File:Untitled2 kj.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled2_kj.jpg&amp;diff=82348"/>
		<updated>2013-11-03T01:32:05Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled1_kj.jpg&amp;diff=82347</id>
		<title>File:Untitled1 kj.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled1_kj.jpg&amp;diff=82347"/>
		<updated>2013-11-03T01:31:48Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82346</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82346"/>
		<updated>2013-11-03T01:26:43Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:untitled_kj2.png]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled_kj.png]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:twoFinal805.png]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled_kj2.png&amp;diff=82345</id>
		<title>File:Untitled kj2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled_kj2.png&amp;diff=82345"/>
		<updated>2013-11-03T01:26:20Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82344</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=82344"/>
		<updated>2013-11-03T01:25:51Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:untitled_kj.png]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:twoFinal805.png]]&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
Before modification the code, all the partials for the score rendering were included in the view_my_scores.html.erb.This led to all the partials being rendered at the same time.&lt;br /&gt;
&lt;br /&gt;
 [[File:Submit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now refactored the code such that the view_my_scores.html.erb partial includes other partials.Each of these partials corresponds to a tab in the view-my-scores page.&lt;br /&gt;
 [[File:Newview_my_scores.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the figure we have separated the code based on the tab that the user clicks. Therefore, we have introduced one more layer of partials which will help facilitate the rendering of the data based on user action. Thus, only the necessary page will be rendered on the click of a tab.The corresponding partial function will have the appropriate call to the controller. This will get the code only to the tab which the user has clicked&lt;br /&gt;
 [[File:One_new_partial.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled_kj.png&amp;diff=82343</id>
		<title>File:Untitled kj.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Untitled_kj.png&amp;diff=82343"/>
		<updated>2013-11-03T01:24:42Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81961</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81961"/>
		<updated>2013-10-31T02:08:37Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Future Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code below included all the partials like _submissions.html.erb, _reviews.html.erb, _metareviews.html.erb in the same HTML page i.e. _participant.html.erb&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt;prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/oss_E804_spb e804] which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81957</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81957"/>
		<updated>2013-10-31T02:05:22Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code below included all the partials like _submissions.html.erb, _reviews.html.erb, _metareviews.html.erb in the same HTML page i.e. _participant.html.erb&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt;prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81956</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81956"/>
		<updated>2013-10-31T02:04:38Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[scr1:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code below included all the partials like _submissions.html.erb, _reviews.html.erb, _metareviews.html.erb in the same HTML page i.e. _participant.html.erb&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt;prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81955</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81955"/>
		<updated>2013-10-31T02:04:24Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[File:scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code below included all the partials like _submissions.html.erb, _reviews.html.erb, _metareviews.html.erb in the same HTML page i.e. _participant.html.erb&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt;prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Scr2.png&amp;diff=81954</id>
		<title>File:Scr2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Scr2.png&amp;diff=81954"/>
		<updated>2013-10-31T02:03:21Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: uploaded a new version of &amp;amp;quot;File:Scr2.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81950</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81950"/>
		<updated>2013-10-31T02:02:30Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
[[scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
[[scr1.png]]&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code below included all the partials like _submissions.html.erb, _reviews.html.erb, _metareviews.html.erb in the same HTML page i.e. _participant.html.erb&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt;prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Scr2.png&amp;diff=81949</id>
		<title>File:Scr2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Scr2.png&amp;diff=81949"/>
		<updated>2013-10-31T02:02:19Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Src1.png&amp;diff=81944</id>
		<title>File:Src1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Src1.png&amp;diff=81944"/>
		<updated>2013-10-31T02:00:22Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81936</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81936"/>
		<updated>2013-10-31T01:57:45Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Problem Inference and Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with reviews,metareviews,author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface design. &lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a  student to scroll all the way down to read a particular review.&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code below included all the partials like _submissions.html.erb, _reviews.html.erb, _metareviews.html.erb in the same HTML page i.e. _participant.html.erb&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt;prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81931</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81931"/>
		<updated>2013-10-31T01:57:15Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
===Problem Inference and Motivation===&lt;br /&gt;
*Currently the view_my_scores html.erb page displays all the scores in a tabular form with &lt;br /&gt;
reviews,metareviews,author feedback below each other. Everything is merged into one big html &lt;br /&gt;
page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design. &lt;br /&gt;
&lt;br /&gt;
*When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other which is too taxing for a student to scroll all the way down to read a particular review.&lt;br /&gt;
&lt;br /&gt;
*This bad User Interface design along with very slow view rendering process motivated us to design an elegant interface which is user friendly and well as fast. This prompted us to use JQuery tabs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt;prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81891</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81891"/>
		<updated>2013-10-31T01:49:32Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Testing the new User Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;  &amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;  &lt;br /&gt;
       &amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt; &lt;br /&gt;
        &amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber&amp;lt;ref name=&amp;quot;cucumber&amp;quot;&amp;gt;''Cucumber'' Retrieved from https://github.com/cucumber/cucumber-rails&amp;lt;/ref&amp;gt; is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81874</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81874"/>
		<updated>2013-10-31T01:44:34Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Future Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
:Score for &amp;lt;%= @assignment.name %&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
 &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;                      &lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',  :team =&amp;gt; false, :pscore =&amp;gt; @participant.get_scores(@questions)} %&amp;gt;                                                                                   &lt;br /&gt;
 &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
 &amp;lt;BR/&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_files&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/submissions', :locals =&amp;gt; {:participant =&amp;gt; participant} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_mreviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/metareviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:metareview]} %&amp;gt;                &amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
 &amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_feedback&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/author_feedbacks', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:feedback]} %&amp;gt;   &amp;lt;/TD&amp;gt;&lt;br /&gt;
 &amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR  class=&amp;quot;row&amp;quot; id=&amp;quot;&amp;lt;%= prefix %&amp;gt;_teammate_reviews&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/teammate_reviews', :locals =&amp;gt; {:prefix =&amp;gt; prefix, :participant =&amp;gt; participant, :rscore =&amp;gt; pscore[:teammate]} %&amp;gt;  &amp;lt;/TD&amp;gt;&lt;br /&gt;
  &amp;lt;/TR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page. Hence to make views faster, models and methods should be re-factored too.&lt;br /&gt;
 &lt;br /&gt;
* Merge this project with E804 which deals with an efficient way to query DB models to return scores,without UI changes. This will make the review rendering process fast.&lt;br /&gt;
* View_my_Score method in the controller saves the questionnaire in a hashmap. It needs re-factoring to make it optimal.&lt;br /&gt;
* Total score tab needs to be displayed either to the right or left or remaining tabs.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81842</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81842"/>
		<updated>2013-10-31T01:37:40Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81840</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81840"/>
		<updated>2013-10-31T01:37:21Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
Previously,the view_my_scores html.erb page displayed all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and thus makes the view rendering a slow process. Also it’s a very bad user interface &lt;br /&gt;
design.&lt;br /&gt;
&lt;br /&gt;
When a user clicks on show reviews/metareviews,etc the reviews gets rendered below each other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
The new user interface separates the code into various tabs for reporting the scores and also a tab format for displaying reviews.&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
==Testing the new User Interface==&lt;br /&gt;
Rails makes it super easy to write your tests. It starts by producing skeleton test code while you are creating your models and controllers. By simply running your Rails tests you can ensure your code adheres to the desired functionality even after some major code refactoring. Rails tests can also simulate browser requests and thus you can test your application's response without having to test it through your browser.&lt;br /&gt;
&lt;br /&gt;
===Testing with Cucumber===&lt;br /&gt;
Cucumber is a high-level testing framework. It is used commonly to perform various integration tests. We used Cucumber to test our new tabbed user interface. Cucumber is used extensively in Expertiza. It constitutes some of the main test cases. All cucumber test scenarios are under Features.&lt;br /&gt;
&lt;br /&gt;
===View My Score Test===&lt;br /&gt;
To test the improved user interface, we had to modify already existing test scenario with the following modifications.&lt;br /&gt;
&lt;br /&gt;
 Feature: View scores for an assignment&lt;br /&gt;
  In order to view resulting scores&lt;br /&gt;
  As a student&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my submitted work scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a work review with score of &amp;quot;85&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;66&amp;quot;&lt;br /&gt;
    And I have a work review with score of &amp;quot;99&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show reviews&amp;quot; link&lt;br /&gt;
  Then I should see the three reviews for my submitted work with corresponding scores&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my author feedback scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a feedback review with score of &amp;quot;93&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show author feedbacks&amp;quot; link&lt;br /&gt;
  Then I should see the author feedback review with corresponding score&lt;br /&gt;
 &lt;br /&gt;
 @wip&lt;br /&gt;
 Scenario: View my teammate review scores&lt;br /&gt;
  Given I am logged in as a student&lt;br /&gt;
    And I move to the &amp;quot;Assignments&amp;quot; page&lt;br /&gt;
    And I click the &amp;quot;test_Metareview&amp;quot; link&lt;br /&gt;
    And I click the &amp;quot;Your scores&amp;quot; link&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
    And I have a teammate review with score of &amp;quot;100&amp;quot;&lt;br /&gt;
  When I click the &amp;quot;show teammate reviews&amp;quot; link&lt;br /&gt;
  Then I should see the two teammate reviews with corresponding scores&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81759</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81759"/>
		<updated>2013-10-31T01:05:31Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
Classes: grades_controller.rb (241 lines), and probably other classes used by this &lt;br /&gt;
What it does: This class is responsible for displaying grades to students (via view_my_scores) and &lt;br /&gt;
instructors (via the view method). &lt;br /&gt;
&lt;br /&gt;
===What needs to be done:=== &lt;br /&gt;
* This code is very slow, due to many factors. Two of the most prominent are the fact that separate &lt;br /&gt;
db queries are used for each rubric that has been filled out by anyone associated with the &lt;br /&gt;
assignment; these queries are made sequentially while the HTML page is being written; and the &lt;br /&gt;
fact that HTML for the whole page is generated, largely by controller methods, before anything is &lt;br /&gt;
displayed. This project deals with the second of these concerns. &lt;br /&gt;
&lt;br /&gt;
* Move as much html as possible from the controllers into the views. Logic should be handled by &lt;br /&gt;
the controllers/models, and the views should simply access those variables set by the controller. &lt;br /&gt;
HTML should be in html.erb files, not written by controller files. &lt;br /&gt;
&lt;br /&gt;
* Rather than write HTML for displaying all of the reviews on a single page, only the summary &lt;br /&gt;
information for each student and team should be written. This should work more like the Review &lt;br /&gt;
Report that an instructor can view (see review_mapping_controller.rb). This shows each review &lt;br /&gt;
in a popup when the user clicks on a particular review. You don’t need to use a popup; the &lt;br /&gt;
review could be populated on the current page when a user clicks on “Show reviews”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81757</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81757"/>
		<updated>2013-10-31T01:02:17Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once. &lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial User Interface to view scores==&lt;br /&gt;
&lt;br /&gt;
==Modified User Interface to view scores and reviews in tabs==&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81754</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81754"/>
		<updated>2013-10-31T01:00:11Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial Design==&lt;br /&gt;
==Changes in the UI after the implementation==&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81753</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81753"/>
		<updated>2013-10-31T00:58:50Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza&amp;lt;ref name=&amp;quot;expertiza&amp;gt;''Expertiza'' Retrieved from http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt; is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial Design==&lt;br /&gt;
==Changes in the UI after the implementation==&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Appendix==	&lt;br /&gt;
Set-Up issues:&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81744</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81744"/>
		<updated>2013-10-31T00:54:35Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial Design==&lt;br /&gt;
==Changes in the UI after the implementation==&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Appendix==	&lt;br /&gt;
Set-Up issues:&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81735</id>
		<title>CSC/ECE 517 Fall 2013/oss E805 kkn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_E805_kkn&amp;diff=81735"/>
		<updated>2013-10-31T00:50:16Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: Created page with &amp;quot;== Introduction == Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. It is an open source project developed on Ruby on Rails platform. More information on Expertiza can be found [https://github.com/expertiza/expertiza here]. The source code can be forked and cloned for making modifications. &lt;br /&gt;
&lt;br /&gt;
This wiki provides an insight into our contributions to the Open Source Software project Expertiza with main focus on the UI changes for reporting scores. Reporting score functionality is handled by controllers/grades_controller.rb and rendered by views/grades/_view_my_score.html.erb. Improved User Interface using JQuery is our contribution to Expertiza. This new elegant UI uses tabs instead of tables which makes it look elegant and renders faster. Subtle code and design challenges, changes and the motivation to implement this design have been explained further.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
The view_my_scores html.erb page is being slow-rendered. The page displays all the scores in a tabular form with reviews, metareviews, author feedback below each other. Everything is merged into one big html page, and this makes the view rendering a slow process. Also, the user interface is not aesthetically pleasing. The challenge here is to make appropriate changes to the views so that the rendering time becomes less as well as to improve the over-all look and feel of the score report page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
We have implemented partial rendering for the HTML page. The tabs are created using JQuery. The advantage of using JQuery is that it enables a sleeker and cleaner interface on pages without requiring the page to be loaded all at once. The new view page is visually aesthetic as it separates the scoring tabs as well as the review tabs and each review is rendered only when the tab for that review is clicked on. Thereby this approach overcomes the previous issue of the entire page being rendered at once.&lt;br /&gt;
 The implementation of this design involved the separation of the code that ……..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Initial Design==&lt;br /&gt;
==Changes in the UI after the implementation==&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
In the current implementation of the model separate DB queries are made sequentially while the HTML page is being written. This increases the loading time of the page.The implementation would get a further performance boost  if the underlying DB queries are fired independent of the…. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Appendix==	&lt;br /&gt;
Set-Up issues:&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013&amp;diff=81654</id>
		<title>CSC/ECE 517 Fall 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013&amp;diff=81654"/>
		<updated>2013-10-31T00:07:28Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[ CSC/ECE 517 Fall 2012/ch1 1w23 ph ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w30 nn]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w21 w]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w01 aj]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w24 nv]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w29 rkld]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w25 aras]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w30 ps]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w19 rj]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w18 bs]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w17 pk]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w22 ss]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w12 vn]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w14 st]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w08 cc]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w10 ga ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w26 as ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w27 ma ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w13 aa ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w11 sv ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w07 d ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w20 gq ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w03 ss ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w28 nm ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w02 pp ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1  1w6 zs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1  1w04 y ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w05 st ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w09 hs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w32 av ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w48 x ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w43 av]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w46 ka]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w33 aa]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w35 sa ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w39 as ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w31 vm ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w43 sm ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w44 s ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w47 ka ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w34 fs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w40 ao ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss fmv ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss vna ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss paa ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss mapFeeds ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss ssp ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch2 0e808 nsv ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss aoa ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss cmh ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss ans ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss ssv]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E818 mra ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss SocialMediaFeeds ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E811 syn ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E804 spb ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E812 amp ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss S805 ahs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E820 gzs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E816 cyy ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss M801 as ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E814 vd ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E815 saa]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E810 aas ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss E805 kkn ]]&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79939</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w46 ka</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79939"/>
		<updated>2013-10-08T00:36:53Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''' Data Mining in Rails Application'''&lt;br /&gt;
&lt;br /&gt;
This wiki discusses the implementation of Data Mining tasks i.e automatic or semi-automatic analysis of large quantities of data to extract previously unknown interesting patterns such as groups of data records, unusual records and dependencies in Rails Application.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Data Mining in Rails Application ==&lt;br /&gt;
&lt;br /&gt;
Data mining &amp;lt;ref name=&amp;quot;mining&amp;gt; Usama Fayyad, Gregory Piatetsky-Shapiro and Padhraic Smyth. (2008, Dec 17). ''From Data Mining to Knowledge Discoveries in Databases.'' Retrieved from http://www.kdnuggets.com/gpspubs/aimag-kdd-overview-1996-Fayyad.pdf&amp;lt;/ref&amp;gt; (the analysis step of the &amp;quot;Knowledge Discovery in Databases&amp;quot; process, or KDD) is the computational process of discovering patterns in large data sets involving methods at the intersection of artificial intelligence, machine learning, statistics, and database systems. The overall goal of the data mining process is to extract information from a data set and transform it into an understandable structure for further use.&lt;br /&gt;
&lt;br /&gt;
Ruby on Rails, often simply Rails, is an open source web application framework which runs on the Ruby programming language. Data mining techniques like &amp;lt;code&amp;gt; [http://en.wikipedia.org/wiki/K-means_clustering K-means clustering] &amp;lt;/code&amp;gt; can be developed on ruby on rails by using various gems which ruby provides. &lt;br /&gt;
Thus it becomes easier for a data mining analyst to write mining code in a ruby on rails application.&lt;br /&gt;
&lt;br /&gt;
==Weka and Ruby==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/ Weka]&amp;lt;/code&amp;gt; is a collection of &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Machine_learning machine learning]&amp;lt;/code&amp;gt; algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from an embedded code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization.[http://www.ibm.com/developerworks/library/ba-data-mining-techniques/] It is also well-suited for developing new machine learning schemes. Weka is written in Java however it is possible to use Weka’s libraries inside Ruby.  To do this, we must install Java, &amp;lt;code&amp;gt;[http://rubygems.org/gems/rjb Rjb]&amp;lt;/code&amp;gt;, and of course obtain the Weka source code.  We use &amp;lt;code&amp;gt;[https://github.com/jruby/jruby/wiki/AboutJRuby JRuby]&amp;lt;/code&amp;gt; and this is illustrated as follows: &amp;lt;ref name=&amp;quot;wekaruby&amp;quot;&amp;gt;Peter Lane. (2009, Aug 15). ''Accessing Weka with JRuby.'' Retrieved from http://rubyforscientificresearch.blogspot.com/2009/08/accessing-weka-from-jruby.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Clustering Data using WEKA from JRuby===&lt;br /&gt;
&lt;br /&gt;
JRuby provides easy access to Java classes and methods, and WEKA is no exception. The following program builds a simple k-means cluster on a supplied input file, and then prints out the assigned cluster for each data instance. The 'include_class' statements are there to simplify references to classes in the API. When classifying each instance, we must watch for the exception thrown in case a classification cannot be made. Finally, notice that the filename is passed as a command-line parameter: the parameters after the name of the JRuby program are packaged up into ARGV in the usual ruby style.  Assuming weka.jar, jruby.jar, and your program are in the same folder, a sample Ruby example is shown bellow:&lt;br /&gt;
&lt;br /&gt;
  # Weka scripting from jruby&lt;br /&gt;
  require &amp;quot;java&amp;quot;&lt;br /&gt;
  require &amp;quot;weka&amp;quot;&lt;br /&gt;
  include_class &amp;quot;java.io.FileReader&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.clusterers.SimpleKMeans&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.core.Instances&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  # load data file&lt;br /&gt;
  file = FileReader.new ARGV[0]&lt;br /&gt;
  data = Instances.new file&lt;br /&gt;
  &lt;br /&gt;
  # create the model&lt;br /&gt;
  kmeans = SimpleKMeans.new&lt;br /&gt;
  kmeans.buildClusterer data&lt;br /&gt;
  &lt;br /&gt;
  # print out the built model&lt;br /&gt;
  print kmeans&lt;br /&gt;
  &lt;br /&gt;
  # Display the cluster for each instance&lt;br /&gt;
  data.numInstances.times do |i|&lt;br /&gt;
  cluster = &amp;quot;UNKNOWN&amp;quot;&lt;br /&gt;
   begin&lt;br /&gt;
    cluster = kmeans.clusterInstance(data.instance(i))&lt;br /&gt;
    rescue java.lang.Exception&lt;br /&gt;
   end&lt;br /&gt;
  puts &amp;quot;#{data.instance(i)},#{cluster}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We can see that the WEKA API makes it easy to pass in a data file. Data can be in a number of formats, including &amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[http://docs.python.org/2/library/csv.html CSV]&amp;lt;/code&amp;gt;. When run on the weather.arff example (in WEKA's 'data' folder), the output looks like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Number of iterations: 3&lt;br /&gt;
  Within cluster sum of squared errors: 16.237456311387238&lt;br /&gt;
  Missing values globally replaced with mean/mode&lt;br /&gt;
  &lt;br /&gt;
  Cluster centroids:&lt;br /&gt;
                             Cluster#&lt;br /&gt;
  Attribute      Full Data          0          1&lt;br /&gt;
                      (14)        (9)        (5)&lt;br /&gt;
  &lt;br /&gt;
  outlook            sunny      sunny   overcast&lt;br /&gt;
  temperature      73.5714    75.8889       69.4&lt;br /&gt;
  humidity         81.6429    84.1111       77.2&lt;br /&gt;
  windy              FALSE      FALSE       TRUE&lt;br /&gt;
  play                 yes        yes        yes&lt;br /&gt;
&lt;br /&gt;
===Advantages of using Weka from jRuby===&lt;br /&gt;
&lt;br /&gt;
One of the advantages of using a language like jruby to talk to WEKA is that we should have more control on how our data is constructed and passed to the machine-learning algorithms. A good start is how to construct our own set of instances, rather than reading them directly in from file. There are some quirks to WEKA's construction of a set of instances. In particular, each attribute must be defined through an instance of the Attribute class. This class gives a string name to the attribute and if the attribute is a nominal attribute, the class also holds a vector of the nominal values. Each instance can then be constructed and added to the growing set of instances.&lt;br /&gt;
&lt;br /&gt;
==Popular gems for Data Mining==&lt;br /&gt;
&lt;br /&gt;
Since data mining is a complex process of retrieving data from a huge set of databases, many gems are used to ease this procedure in a rails application. Some of the popular gems are RVol, Rbbt and RubyBand. They are explained below. &lt;br /&gt;
&lt;br /&gt;
===RVol===&lt;br /&gt;
&lt;br /&gt;
Gem for creating a database for data mining stock markets focusing on &amp;lt;code&amp;gt; [http://www.spindices.com/indices/equity/sp-500 SP500]&amp;lt;/code&amp;gt; data. Rvol enables investors to study market volatility from free data on the internet. RVol is the most popular gem for data mining applications developed in Rails.  The created database could be used for instance from &amp;lt;code&amp;gt;[https://www.stat.auckland.ac.nz/~ihaka/downloads/Interface98.pdf R] &amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt; [http://www.altiusdirectory.com/Computers/matlab-programming-language.php Matlab]&amp;lt;/code&amp;gt; or similar to do quantitative analysis. You could script new data mining functions extending the Rvol library, load the data into a statistics package, or use it with your own quantitative framework.  Usage: rvol -s will create the database. The database contains stocks (with industries), options, implied volatility and calculated standard deviations for the day. Earnings are downloaded and listed with implied volatilities for front and back month options. There are some reports, which can be generated after the database is downloaded by looking at rvol -p. There is a function to calculate correlations between stocks in the same industry groups (--correlationAll, --correlation10 (10 day correlation),this will take a long time and jruby is recommended for a better use of system resources. Rvol downloads option chains, calculates implied volatilities for them and has features to list top 10 type of lists for potential investment opportunities. 'Put' call ratios are calculated , total amount of 'puts' or 'calls' for a particular company etc are available. These can be used to measure the market sentiment. Different filters can be used to find stocks/options with high volatilities, stocks with high options volume for the day etc which are indicators of forthcoming events. &amp;lt;ref name=&amp;quot;rvol&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 18). ''The Ruby ToolBox: RVol.'' Retrieved from https://www.ruby-toolbox.com/projects/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of RVol====&lt;br /&gt;
&lt;br /&gt;
Since RVol is a Ruby Gem, we must install it by including it in the Gem file of our Rails application. Version 0.6.4 is the latest and the most stable version by Tonic. &lt;br /&gt;
&lt;br /&gt;
 gem install rvol -v 0.6.4&lt;br /&gt;
&lt;br /&gt;
====Example: Use of RVol to Generate stock market databases====&lt;br /&gt;
&lt;br /&gt;
RVol is commonly used to populate databases for Mining stock market data. A sample code snippet below shows the simple way to generate a test database from internet data. &amp;lt;ref name=&amp;quot;rvolEg&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 19). ''A ruby gem for downloading and processing options chains and financial data.'' Retrieved from https://github.com/tonik/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'Rvol'&lt;br /&gt;
 require 'test/unit'&lt;br /&gt;
 require 'dm-core'&lt;br /&gt;
 require 'dm-migrations'&lt;br /&gt;
 require 'model/stock'&lt;br /&gt;
 require 'model/chain'&lt;br /&gt;
 require 'model/earning'&lt;br /&gt;
 require 'model/stockcorrelation'&lt;br /&gt;
 &lt;br /&gt;
 #set the test db an in memory db&lt;br /&gt;
 DataMapper::Logger.new($stdout, :debug)&lt;br /&gt;
 &lt;br /&gt;
 puts File.dirname(__FILE__)&lt;br /&gt;
 &lt;br /&gt;
 DataMapper.setup(:default, &amp;quot;sqlite::memory:&amp;quot;)&lt;br /&gt;
 DataMapper.finalize&lt;br /&gt;
 DataMapper.auto_migrate!&lt;br /&gt;
 &lt;br /&gt;
 # GENERATE THE TEST DATABASE FROM INTERNET DATA&lt;br /&gt;
 &lt;br /&gt;
 puts 'GENERATING TEST DATABASE AND TESTING SCRAPERS'&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Rbbt===&lt;br /&gt;
&lt;br /&gt;
Rbbt stands for Ruby Bio-Text, it started as an API for &amp;lt;code&amp;gt; [http://people.ischool.berkeley.edu/~hearst/text-mining.html text mining] &amp;lt;/code&amp;gt; developed for &amp;lt;code&amp;gt; [http://sent.dacya.ucm.es/ SENT] &amp;lt;/code&amp;gt;, but its functionality has been used for other applications as well, such as &amp;lt;code&amp;gt; [http://marq.dacya.ucm.es/ MARQ] &amp;lt;/code&amp;gt;. Rbbt covers several functionalities, some will work right away, some require to install dependencies or download and process data from the internet. Since not all users are likely to need all the functionalities, the dependencies of this gem include only the very basic requirements. Dependencies may appear unexpectedly when using new parts of the API. &amp;lt;ref name=&amp;quot;rbbt&amp;quot;&amp;gt;Miguel Vazquez. (2013, June 10). ''Rbbt.'' Retrieved from http://rubydoc.info/gems/rbbt/frames&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Rbbt====&lt;br /&gt;
&lt;br /&gt;
Install the gem normally gem install rbbt. The gem includes a configuration tool rbbt_config. The first time you run it, it will ask you to configure some paths. After that you may use it to process the data for different tasks.&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Rbbt to translate identifiers====&lt;br /&gt;
&lt;br /&gt;
1. Do rbbt_config prepare identifiers to do deploy the configuration files and enter 'gene' data, this needs to be done just once.&lt;br /&gt;
&lt;br /&gt;
2. Now you may do rbbt_config install 'organisms' to process all the 'organisms', or rbbt_config install organisms such as 'yeast'.&lt;br /&gt;
&lt;br /&gt;
3. You may now use a script like this to translate 'gene' identifiers from 'yeast' feed from the standard input.&lt;br /&gt;
&lt;br /&gt;
 require 'rbbt/sources/organism'&lt;br /&gt;
 &lt;br /&gt;
 index = Organism.id_index('Sce', :native =&amp;gt; 'Enter Gene Id')&lt;br /&gt;
 &lt;br /&gt;
 STDIN.each_line{|l| puts &amp;quot;#{l.chomp} =&amp;gt; #{index[l.chomp]}&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
===Ruby Band===&lt;br /&gt;
&lt;br /&gt;
Ruby Band is a Ruby Gem that makes use of some selected Java software for data mining and machine learning applications available to the JRuby/Ruby users. Ruby Band features a comprehensive collection of data preprocessing and modeling techniques, and supports several standard data mining tasks, more specifically: data pre-processing (filtering), clustering, classification, regression, and &amp;lt;code&amp;gt; [http://jmlr.org/papers/v3/guyon03a.html feature selection] &amp;lt;/code&amp;gt;. &amp;lt;ref name=&amp;quot;rubyband&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 24). ''Data Mining in JRuby with Ruby Band.'' Retrieved from http://sciruby.com/blog/2013/09/24/gsoc-2013-data-mining-in-jruby-with-ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Ruby Band====&lt;br /&gt;
&lt;br /&gt;
Install the 'jbundle' gem and 'bundle' for JRuby before trying to install the 'ruby-band' gem. &lt;br /&gt;
&lt;br /&gt;
If you want to use 'ruby-band' APIs without installing the gem you need to run command 'rake -T' once before requiring the gem in your script (this is necessary for jbundler to download the '.jar' files and subsequently set the Java classpath). Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 gem install ruby-band&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Parsing====&lt;br /&gt;
&lt;br /&gt;
One central datatype of ruby-band is derived from the Weka counterpart (the class Weka.core.Instances). By instantiating this class, we obtain a matrix-like structure for storing an entire dataset. Ad-hoc methods were created to guarantee that 'Instances' class objects can be converted to other datatypes (e.g. Apache matrix) and back. There are currently many ways to import data into ruby-band. But the basic way is to Parse data from ARFF/CSV files. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can simply parse an external Weka ARFF/CSV file by doing:&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 dataset = Core::Parser.parse_CSV(my_file.csv)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Classification====&lt;br /&gt;
&lt;br /&gt;
Classification and regression algorithms in WEKA are called “classifiers” and are located below the Weka::Classifier:: module. Currently, ruby-band only supports batch-trainable classifiers: this means they get trained on the whole dataset at once. Below is a quick example of how to train a classifier on a dataset parsed from an '''&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt;'''(attribute relation file format). &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 &lt;br /&gt;
 # parse a dataset&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 &lt;br /&gt;
 # initialize and train a classifier&lt;br /&gt;
 classifier = Weka::Classifier::Lazy::KStar::Base.new do&lt;br /&gt;
   set_options '-M d'&lt;br /&gt;
   set_data dataset&lt;br /&gt;
   set_class_index 4&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 # cross-validate the trained classifier&lt;br /&gt;
 puts classifier.cross_validate(3)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Clustering====&lt;br /&gt;
&lt;br /&gt;
Clustering is an unsupervised Machine Learning technique of finding patterns in the data, i.e., these algorithms work without class attributes. Classifiers, on the other hand, are supervised and need a class attribute. This section, similar to the one about classifiers, covers the following topics:&lt;br /&gt;
* Building a clusterer - batch (incremental must still be implemented) learning.&lt;br /&gt;
* Evaluating a clusterer - how to evaluate a built clusterer.&lt;br /&gt;
* Clustering instances - determining what clusters unknown instances belong to. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data Mining with Ruby and Twitter==&lt;br /&gt;
&lt;br /&gt;
The following sections present a few scripts for collecting and presenting data available through the Twitter API. These scripts focus on simplicity, but you can extend and combine them to create new capabilities. &amp;lt;ref name=&amp;quot;TwitterData&amp;quot;&amp;gt;M. Tim Jones. (2011, Oct 11). ''Data Mining with Ruby and Twitter.'' Retrieved from http://www.ibm.com/developerworks/library/os-dataminingrubytwitter/os-dataminingrubytwitter-pdf.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Twitter User Information===&lt;br /&gt;
&lt;br /&gt;
A large amount of information is available about each Twitter user. This information is only accessible if the user isn't protected. Let's look at how you can extract a user's data and present it in a more convenient way. Listing below presents a simple Ruby script to retrieve a user's information (based on his or her screen name), and then emit some of the more useful elements. You use the 'to_s' Ruby method to convert the value to a string as needed. Note that you first ensure that the user isn't protected; otherwise, this data wouldn't be accessible.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 a_user = Twitter.user(screen_name)&lt;br /&gt;
 &lt;br /&gt;
 if a_user.protected != true&lt;br /&gt;
 &lt;br /&gt;
  puts &amp;quot;Username   : &amp;quot; + a_user.screen_name.to_s&lt;br /&gt;
  puts &amp;quot;Name       : &amp;quot; + a_user.name&lt;br /&gt;
  puts &amp;quot;Id         : &amp;quot; + a_user.id_str&lt;br /&gt;
  puts &amp;quot;Location   : &amp;quot; + a_user.location&lt;br /&gt;
  puts &amp;quot;User since : &amp;quot; + a_user.created_at.to_s&lt;br /&gt;
  puts &amp;quot;Bio        : &amp;quot; + a_user.description.to_s&lt;br /&gt;
  puts &amp;quot;Followers  : &amp;quot; + a_user.followers_count.to_s&lt;br /&gt;
  puts &amp;quot;Friends    : &amp;quot; + a_user.friends_count.to_s&lt;br /&gt;
  puts &amp;quot;Listed Cnt : &amp;quot; + a_user.listed_count.to_s&lt;br /&gt;
  puts &amp;quot;Tweet Cnt  : &amp;quot; + a_user.statuses_count.to_s&lt;br /&gt;
  puts &amp;quot;Geocoded   : &amp;quot; + a_user.geo_enabled.to_s&lt;br /&gt;
  puts &amp;quot;Language   : &amp;quot; + a_user.lang&lt;br /&gt;
  if (a_user.url != nil)&lt;br /&gt;
    puts &amp;quot;URL        : &amp;quot; + a_user.url.to_s&lt;br /&gt;
  end&lt;br /&gt;
  if (a_user.time_zone != nil)&lt;br /&gt;
    puts &amp;quot;Time Zone  : &amp;quot; + a_user.time_zone&lt;br /&gt;
  end&lt;br /&gt;
  puts &amp;quot;Verified   : &amp;quot; + a_user.verified.to_s&lt;br /&gt;
  puts&lt;br /&gt;
  &lt;br /&gt;
  tweet = Twitter.user_timeline(screen_name).first&lt;br /&gt;
  &lt;br /&gt;
  puts &amp;quot;Tweet time : &amp;quot; + tweet.created_at&lt;br /&gt;
  puts &amp;quot;Tweet ID   : &amp;quot; + tweet.id.to_s&lt;br /&gt;
  puts &amp;quot;Tweet text : &amp;quot; + tweet.text&lt;br /&gt;
  &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Twitter User Behavior===&lt;br /&gt;
&lt;br /&gt;
Twitter contains a large amount of data that you can mine to understand some elements of user behavior. Two simple examples are to analyze when a Twitter user tweets and from what application the user tweets. You can use the following two simple scripts to extract and visualize this information. Listing below presents a script that iterates the tweets from a particular user (using the user_timeline method), and then for each tweet, extracts the particular day on which the tweet originated. You use a simple hash again to accumulate your weekday counts, then generate a bar chart using Google Charts in a similar fashion to the previous time zone example. Note also the use of default for the hash, which specifies the value to return for undefined hashes.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 require &amp;quot;google_chart&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 dayhash = Hash.new&lt;br /&gt;
 &lt;br /&gt;
 # Initialize to avoid a nil error with GoogleCharts (undefined is zero)&lt;br /&gt;
 dayhash.default = 0&lt;br /&gt;
 &lt;br /&gt;
 timeline = Twitter.user_timeline(screen_name, :count =&amp;gt; 200 )&lt;br /&gt;
 timeline.each do |t|&lt;br /&gt;
   &lt;br /&gt;
  tweetday = t.created_at.to_s[0..2]&lt;br /&gt;
  &lt;br /&gt;
  if dayhash.has_key?(tweetday)&lt;br /&gt;
    dayhash[tweetday] = dayhash[tweetday] + 1&lt;br /&gt;
  else&lt;br /&gt;
    dayhash[tweetday] = 1&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
We need to retrieve a BarChart to display per day tweet activity. &lt;br /&gt;
  &lt;br /&gt;
 GoogleChart::BarChart.new('300x200', screen_name, :vertical, false) do |bc|&lt;br /&gt;
  bc.data &amp;quot;Sunday&amp;quot;, [dayhash[&amp;quot;Sun&amp;quot;]], '00000f'&lt;br /&gt;
  bc.data &amp;quot;Monday&amp;quot;, [dayhash[&amp;quot;Mon&amp;quot;]], '0000ff'&lt;br /&gt;
  bc.data &amp;quot;Tuesday&amp;quot;, [dayhash[&amp;quot;Tue&amp;quot;]], '00ff00'&lt;br /&gt;
  bc.data &amp;quot;Wednesday&amp;quot;, [dayhash[&amp;quot;Wed&amp;quot;]], '00ffff'&lt;br /&gt;
  bc.data &amp;quot;Thursday&amp;quot;, [dayhash[&amp;quot;Thu&amp;quot;]], 'ff0000'&lt;br /&gt;
  bc.data &amp;quot;Friday&amp;quot;, [dayhash[&amp;quot;Fri&amp;quot;]], 'ff00ff'&lt;br /&gt;
  bc.data &amp;quot;Saturday&amp;quot;, [dayhash[&amp;quot;Sat&amp;quot;]], 'ffff00'&lt;br /&gt;
  puts bc.to_url&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:img2333.jpg]]&lt;br /&gt;
&lt;br /&gt;
Running the above mining script provides the result of the execution of the tweet-days script in the above Listing for the developerWorks account. As shown, Wednesday tends to be the most active tweet day, with Saturday and Sunday the least active.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
# Rudi Cilibrasi(2008,Oct 4)''CompLearn: A compression-based data-mining toolkit.'' Retrieved from http://www.ruby-doc.org/gems/docs/c/complearn-0.6.2/doc/readme_txt.html &lt;br /&gt;
&lt;br /&gt;
# Seamus Abshere and Andy Rossmeissl (2012, May 14) Real time example of Data Mining Rails Example.[http://impact.brighterplanet.com/] Retrieved from http://www.rubydoc.info/gems/data_miner-ruby19/frames&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79936</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w46 ka</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79936"/>
		<updated>2013-10-08T00:35:39Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''' Data Mining in Rails Application'''&lt;br /&gt;
&lt;br /&gt;
This wiki discusses the implementation of Data Mining tasks i.e automatic or semi-automatic analysis of large quantities of data to extract previously unknown interesting patterns such as groups of data records, unusual records and dependencies in Rails Application.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Data Mining in Rails Application ==&lt;br /&gt;
&lt;br /&gt;
Data mining &amp;lt;ref name=&amp;quot;mining&amp;gt; Usama Fayyad, Gregory Piatetsky-Shapiro and Padhraic Smyth. (2008, Dec 17). ''From Data Mining to Knowledge Discoveries in Databases.'' Retrieved from http://www.kdnuggets.com/gpspubs/aimag-kdd-overview-1996-Fayyad.pdf&amp;lt;/ref&amp;gt; (the analysis step of the &amp;quot;Knowledge Discovery in Databases&amp;quot; process, or KDD) is the computational process of discovering patterns in large data sets involving methods at the intersection of artificial intelligence, machine learning, statistics, and database systems. The overall goal of the data mining process is to extract information from a data set and transform it into an understandable structure for further use.&lt;br /&gt;
&lt;br /&gt;
Ruby on Rails, often simply Rails, is an open source web application framework which runs on the Ruby programming language. Data mining techniques like &amp;lt;code&amp;gt; [http://en.wikipedia.org/wiki/K-means_clustering K-means clustering] &amp;lt;/code&amp;gt; can be developed on ruby on rails by using various gems which ruby provides. &lt;br /&gt;
Thus it becomes easier for a data mining analyst to write mining code in a ruby on rails application.&lt;br /&gt;
&lt;br /&gt;
==Weka and Ruby==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/ Weka]&amp;lt;/code&amp;gt; is a collection of &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Machine_learning machine learning]&amp;lt;/code&amp;gt; algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from an embedded code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization.[http://www.ibm.com/developerworks/library/ba-data-mining-techniques/] It is also well-suited for developing new machine learning schemes. Weka is written in Java however it is possible to use Weka’s libraries inside Ruby.  To do this, we must install Java, &amp;lt;code&amp;gt;[http://rubygems.org/gems/rjb Rjb]&amp;lt;/code&amp;gt;, and of course obtain the Weka source code.  We use &amp;lt;code&amp;gt;[https://github.com/jruby/jruby/wiki/AboutJRuby JRuby]&amp;lt;/code&amp;gt; and this is illustrated as follows: &amp;lt;ref name=&amp;quot;wekaruby&amp;quot;&amp;gt;Peter Lane. (2009, Aug 15). ''Accessing Weka with JRuby.'' Retrieved from http://rubyforscientificresearch.blogspot.com/2009/08/accessing-weka-from-jruby.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Clustering Data using WEKA from JRuby===&lt;br /&gt;
&lt;br /&gt;
JRuby provides easy access to Java classes and methods, and WEKA is no exception. The following program builds a simple k-means cluster on a supplied input file, and then prints out the assigned cluster for each data instance. The 'include_class' statements are there to simplify references to classes in the API. When classifying each instance, we must watch for the exception thrown in case a classification cannot be made. Finally, notice that the filename is passed as a command-line parameter: the parameters after the name of the JRuby program are packaged up into ARGV in the usual ruby style.  Assuming weka.jar, jruby.jar, and your program are in the same folder, a sample Ruby example is shown bellow:&lt;br /&gt;
&lt;br /&gt;
  # Weka scripting from jruby&lt;br /&gt;
  require &amp;quot;java&amp;quot;&lt;br /&gt;
  require &amp;quot;weka&amp;quot;&lt;br /&gt;
  include_class &amp;quot;java.io.FileReader&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.clusterers.SimpleKMeans&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.core.Instances&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  # load data file&lt;br /&gt;
  file = FileReader.new ARGV[0]&lt;br /&gt;
  data = Instances.new file&lt;br /&gt;
  &lt;br /&gt;
  # create the model&lt;br /&gt;
  kmeans = SimpleKMeans.new&lt;br /&gt;
  kmeans.buildClusterer data&lt;br /&gt;
  &lt;br /&gt;
  # print out the built model&lt;br /&gt;
  print kmeans&lt;br /&gt;
  &lt;br /&gt;
  # Display the cluster for each instance&lt;br /&gt;
  data.numInstances.times do |i|&lt;br /&gt;
  cluster = &amp;quot;UNKNOWN&amp;quot;&lt;br /&gt;
   begin&lt;br /&gt;
    cluster = kmeans.clusterInstance(data.instance(i))&lt;br /&gt;
    rescue java.lang.Exception&lt;br /&gt;
   end&lt;br /&gt;
  puts &amp;quot;#{data.instance(i)},#{cluster}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We can see that the WEKA API makes it easy to pass in a data file. Data can be in a number of formats, including &amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[http://docs.python.org/2/library/csv.html CSV]&amp;lt;/code&amp;gt;. When run on the weather.arff example (in WEKA's 'data' folder), the output looks like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Number of iterations: 3&lt;br /&gt;
  Within cluster sum of squared errors: 16.237456311387238&lt;br /&gt;
  Missing values globally replaced with mean/mode&lt;br /&gt;
  &lt;br /&gt;
  Cluster centroids:&lt;br /&gt;
                             Cluster#&lt;br /&gt;
  Attribute      Full Data          0          1&lt;br /&gt;
                      (14)        (9)        (5)&lt;br /&gt;
  &lt;br /&gt;
  outlook            sunny      sunny   overcast&lt;br /&gt;
  temperature      73.5714    75.8889       69.4&lt;br /&gt;
  humidity         81.6429    84.1111       77.2&lt;br /&gt;
  windy              FALSE      FALSE       TRUE&lt;br /&gt;
  play                 yes        yes        yes&lt;br /&gt;
&lt;br /&gt;
===Advantages of using Weka from jRuby===&lt;br /&gt;
&lt;br /&gt;
One of the advantages of using a language like jruby to talk to WEKA is that we should have more control on how our data is constructed and passed to the machine-learning algorithms. A good start is how to construct our own set of instances, rather than reading them directly in from file. There are some quirks to WEKA's construction of a set of instances. In particular, each attribute must be defined through an instance of the Attribute class. This class gives a string name to the attribute and if the attribute is a nominal attribute, the class also holds a vector of the nominal values. Each instance can then be constructed and added to the growing set of instances.&lt;br /&gt;
&lt;br /&gt;
==Popular gems for Data Mining==&lt;br /&gt;
&lt;br /&gt;
Since data mining is a complex process of retrieving data from a huge set of databases, many gems are used to ease this procedure in a rails application. Some of the popular gems are RVol, Rbbt and RubyBand. They are explained below. &lt;br /&gt;
&lt;br /&gt;
===RVol===&lt;br /&gt;
&lt;br /&gt;
Gem for creating a database for data mining stock markets focusing on &amp;lt;code&amp;gt; [http://www.spindices.com/indices/equity/sp-500 SP500]&amp;lt;/code&amp;gt; data. Rvol enables investors to study market volatility from free data on the internet. RVol is the most popular gem for data mining applications developed in Rails.  The created database could be used for instance from &amp;lt;code&amp;gt;[https://www.stat.auckland.ac.nz/~ihaka/downloads/Interface98.pdf R] &amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt; [http://www.altiusdirectory.com/Computers/matlab-programming-language.php Matlab]&amp;lt;/code&amp;gt; or similar to do quantitative analysis. You could script new data mining functions extending the Rvol library, load the data into a statistics package, or use it with your own quantitative framework.  Usage: rvol -s will create the database. The database contains stocks (with industries), options, implied volatility and calculated standard deviations for the day. Earnings are downloaded and listed with implied volatilities for front and back month options. There are some reports, which can be generated after the database is downloaded by looking at rvol -p. There is a function to calculate correlations between stocks in the same industry groups (--correlationAll, --correlation10 (10 day correlation),this will take a long time and jruby is recommended for a better use of system resources. Rvol downloads option chains, calculates implied volatilities for them and has features to list top 10 type of lists for potential investment opportunities. 'Put' call ratios are calculated , total amount of 'puts' or 'calls' for a particular company etc are available. These can be used to measure the market sentiment. Different filters can be used to find stocks/options with high volatilities, stocks with high options volume for the day etc which are indicators of forthcoming events. &amp;lt;ref name=&amp;quot;rvol&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 18). ''The Ruby ToolBox: RVol.'' Retrieved from https://www.ruby-toolbox.com/projects/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of RVol====&lt;br /&gt;
&lt;br /&gt;
Since RVol is a Ruby Gem, we must install it by including it in the Gem file of our Rails application. Version 0.6.4 is the latest and the most stable version by Tonic. &lt;br /&gt;
&lt;br /&gt;
 gem install rvol -v 0.6.4&lt;br /&gt;
&lt;br /&gt;
====Example: Use of RVol to Generate stock market databases====&lt;br /&gt;
&lt;br /&gt;
RVol is commonly used to populate databases for Mining stock market data. A sample code snippet below shows the simple way to generate a test database from internet data. &amp;lt;ref name=&amp;quot;rvolEg&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 19). ''A ruby gem for downloading and processing options chains and financial data.'' Retrieved from https://github.com/tonik/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'Rvol'&lt;br /&gt;
 require 'test/unit'&lt;br /&gt;
 require 'dm-core'&lt;br /&gt;
 require 'dm-migrations'&lt;br /&gt;
 require 'model/stock'&lt;br /&gt;
 require 'model/chain'&lt;br /&gt;
 require 'model/earning'&lt;br /&gt;
 require 'model/stockcorrelation'&lt;br /&gt;
 &lt;br /&gt;
 #set the test db an in memory db&lt;br /&gt;
 DataMapper::Logger.new($stdout, :debug)&lt;br /&gt;
 &lt;br /&gt;
 puts File.dirname(__FILE__)&lt;br /&gt;
 &lt;br /&gt;
 DataMapper.setup(:default, &amp;quot;sqlite::memory:&amp;quot;)&lt;br /&gt;
 DataMapper.finalize&lt;br /&gt;
 DataMapper.auto_migrate!&lt;br /&gt;
 &lt;br /&gt;
 # GENERATE THE TEST DATABASE FROM INTERNET DATA&lt;br /&gt;
 &lt;br /&gt;
 puts 'GENERATING TEST DATABASE AND TESTING SCRAPERS'&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Rbbt===&lt;br /&gt;
&lt;br /&gt;
Rbbt stands for Ruby Bio-Text, it started as an API for &amp;lt;code&amp;gt; [http://people.ischool.berkeley.edu/~hearst/text-mining.html text mining] &amp;lt;/code&amp;gt; developed for &amp;lt;code&amp;gt; [http://sent.dacya.ucm.es/ SENT] &amp;lt;/code&amp;gt;, but its functionality has been used for other applications as well, such as &amp;lt;code&amp;gt; [http://marq.dacya.ucm.es/ MARQ] &amp;lt;/code&amp;gt;. Rbbt covers several functionalities, some will work right away, some require to install dependencies or download and process data from the internet. Since not all users are likely to need all the functionalities, the dependencies of this gem include only the very basic requirements. Dependencies may appear unexpectedly when using new parts of the API. &amp;lt;ref name=&amp;quot;rbbt&amp;quot;&amp;gt;Miguel Vazquez. (2013, June 10). ''Rbbt.'' Retrieved from http://rubydoc.info/gems/rbbt/frames&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Rbbt====&lt;br /&gt;
&lt;br /&gt;
Install the gem normally gem install rbbt. The gem includes a configuration tool rbbt_config. The first time you run it, it will ask you to configure some paths. After that you may use it to process the data for different tasks.&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Rbbt to translate identifiers====&lt;br /&gt;
&lt;br /&gt;
1. Do rbbt_config prepare identifiers to do deploy the configuration files and enter 'gene' data, this needs to be done just once.&lt;br /&gt;
&lt;br /&gt;
2. Now you may do rbbt_config install 'organisms' to process all the 'organisms', or rbbt_config install organisms such as 'yeast'.&lt;br /&gt;
&lt;br /&gt;
3. You may now use a script like this to translate 'gene' identifiers from 'yeast' feed from the standard input.&lt;br /&gt;
&lt;br /&gt;
 require 'rbbt/sources/organism'&lt;br /&gt;
 &lt;br /&gt;
 index = Organism.id_index('Sce', :native =&amp;gt; 'Enter Gene Id')&lt;br /&gt;
 &lt;br /&gt;
 STDIN.each_line{|l| puts &amp;quot;#{l.chomp} =&amp;gt; #{index[l.chomp]}&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
===Ruby Band===&lt;br /&gt;
&lt;br /&gt;
Ruby Band is a Ruby Gem that makes use of some selected Java software for data mining and machine learning applications available to the JRuby/Ruby users. Ruby Band features a comprehensive collection of data preprocessing and modeling techniques, and supports several standard data mining tasks, more specifically: data pre-processing (filtering), clustering, classification, regression, and &amp;lt;code&amp;gt; [http://jmlr.org/papers/v3/guyon03a.html feature selection] &amp;lt;/code&amp;gt;. &amp;lt;ref name=&amp;quot;rubyband&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 24). ''Data Mining in JRuby with Ruby Band.'' Retrieved from http://sciruby.com/blog/2013/09/24/gsoc-2013-data-mining-in-jruby-with-ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Ruby Band====&lt;br /&gt;
&lt;br /&gt;
Install the 'jbundle' gem and 'bundle' for JRuby before trying to install the 'ruby-band' gem. &lt;br /&gt;
&lt;br /&gt;
If you want to use 'ruby-band' APIs without installing the gem you need to run command 'rake -T' once before requiring the gem in your script (this is necessary for jbundler to download the '.jar' files and subsequently set the Java classpath). Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 gem install ruby-band&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Parsing====&lt;br /&gt;
&lt;br /&gt;
One central datatype of ruby-band is derived from the Weka counterpart (the class Weka.core.Instances). By instantiating this class, we obtain a matrix-like structure for storing an entire dataset. Ad-hoc methods were created to guarantee that 'Instances' class objects can be converted to other datatypes (e.g. Apache matrix) and back. There are currently many ways to import data into ruby-band. But the basic way is to Parse data from ARFF/CSV files. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can simply parse an external Weka ARFF/CSV file by doing:&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 dataset = Core::Parser.parse_CSV(my_file.csv)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Classification====&lt;br /&gt;
&lt;br /&gt;
Classification and regression algorithms in WEKA are called “classifiers” and are located below the Weka::Classifier:: module. Currently, ruby-band only supports batch-trainable classifiers: this means they get trained on the whole dataset at once. Below is a quick example of how to train a classifier on a dataset parsed from an '''&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt;'''(attribute relation file format). &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 &lt;br /&gt;
 # parse a dataset&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 &lt;br /&gt;
 # initialize and train a classifier&lt;br /&gt;
 classifier = Weka::Classifier::Lazy::KStar::Base.new do&lt;br /&gt;
   set_options '-M d'&lt;br /&gt;
   set_data dataset&lt;br /&gt;
   set_class_index 4&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 # cross-validate the trained classifier&lt;br /&gt;
 puts classifier.cross_validate(3)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Clustering====&lt;br /&gt;
&lt;br /&gt;
Clustering is an unsupervised Machine Learning technique of finding patterns in the data, i.e., these algorithms work without class attributes. Classifiers, on the other hand, are supervised and need a class attribute. This section, similar to the one about classifiers, covers the following topics:&lt;br /&gt;
* Building a clusterer - batch (incremental must still be implemented) learning.&lt;br /&gt;
* Evaluating a clusterer - how to evaluate a built clusterer.&lt;br /&gt;
* Clustering instances - determining what clusters unknown instances belong to. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data Mining with Ruby and Twitter==&lt;br /&gt;
&lt;br /&gt;
The following sections present a few scripts for collecting and presenting data available through the Twitter API. These scripts focus on simplicity, but you can extend and combine them to create new capabilities. &amp;lt;ref name=&amp;quot;TwitterData&amp;quot;&amp;gt;M. Tim Jones. (2011, Oct 11). ''Data Mining with Ruby and Twitter.'' Retrieved from http://www.ibm.com/developerworks/library/os-dataminingrubytwitter/os-dataminingrubytwitter-pdf.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Twitter User Information===&lt;br /&gt;
&lt;br /&gt;
A large amount of information is available about each Twitter user. This information is only accessible if the user isn't protected. Let's look at how you can extract a user's data and present it in a more convenient way. Listing below presents a simple Ruby script to retrieve a user's information (based on his or her screen name), and then emit some of the more useful elements. You use the 'to_s' Ruby method to convert the value to a string as needed. Note that you first ensure that the user isn't protected; otherwise, this data wouldn't be accessible.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 a_user = Twitter.user(screen_name)&lt;br /&gt;
 &lt;br /&gt;
 if a_user.protected != true&lt;br /&gt;
 &lt;br /&gt;
  puts &amp;quot;Username   : &amp;quot; + a_user.screen_name.to_s&lt;br /&gt;
  puts &amp;quot;Name       : &amp;quot; + a_user.name&lt;br /&gt;
  puts &amp;quot;Id         : &amp;quot; + a_user.id_str&lt;br /&gt;
  puts &amp;quot;Location   : &amp;quot; + a_user.location&lt;br /&gt;
  puts &amp;quot;User since : &amp;quot; + a_user.created_at.to_s&lt;br /&gt;
  puts &amp;quot;Bio        : &amp;quot; + a_user.description.to_s&lt;br /&gt;
  puts &amp;quot;Followers  : &amp;quot; + a_user.followers_count.to_s&lt;br /&gt;
  puts &amp;quot;Friends    : &amp;quot; + a_user.friends_count.to_s&lt;br /&gt;
  puts &amp;quot;Listed Cnt : &amp;quot; + a_user.listed_count.to_s&lt;br /&gt;
  puts &amp;quot;Tweet Cnt  : &amp;quot; + a_user.statuses_count.to_s&lt;br /&gt;
  puts &amp;quot;Geocoded   : &amp;quot; + a_user.geo_enabled.to_s&lt;br /&gt;
  puts &amp;quot;Language   : &amp;quot; + a_user.lang&lt;br /&gt;
  if (a_user.url != nil)&lt;br /&gt;
    puts &amp;quot;URL        : &amp;quot; + a_user.url.to_s&lt;br /&gt;
  end&lt;br /&gt;
  if (a_user.time_zone != nil)&lt;br /&gt;
    puts &amp;quot;Time Zone  : &amp;quot; + a_user.time_zone&lt;br /&gt;
  end&lt;br /&gt;
  puts &amp;quot;Verified   : &amp;quot; + a_user.verified.to_s&lt;br /&gt;
  puts&lt;br /&gt;
  &lt;br /&gt;
  tweet = Twitter.user_timeline(screen_name).first&lt;br /&gt;
  &lt;br /&gt;
  puts &amp;quot;Tweet time : &amp;quot; + tweet.created_at&lt;br /&gt;
  puts &amp;quot;Tweet ID   : &amp;quot; + tweet.id.to_s&lt;br /&gt;
  puts &amp;quot;Tweet text : &amp;quot; + tweet.text&lt;br /&gt;
  &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Twitter User Behavior===&lt;br /&gt;
&lt;br /&gt;
Twitter contains a large amount of data that you can mine to understand some elements of user behavior. Two simple examples are to analyze when a Twitter user tweets and from what application the user tweets. You can use the following two simple scripts to extract and visualize this information. Listing below presents a script that iterates the tweets from a particular user (using the user_timeline method), and then for each tweet, extracts the particular day on which the tweet originated. You use a simple hash again to accumulate your weekday counts, then generate a bar chart using Google Charts in a similar fashion to the previous time zone example. Note also the use of default for the hash, which specifies the value to return for undefined hashes.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 require &amp;quot;google_chart&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 dayhash = Hash.new&lt;br /&gt;
 &lt;br /&gt;
 # Initialize to avoid a nil error with GoogleCharts (undefined is zero)&lt;br /&gt;
 dayhash.default = 0&lt;br /&gt;
 &lt;br /&gt;
 timeline = Twitter.user_timeline(screen_name, :count =&amp;gt; 200 )&lt;br /&gt;
 timeline.each do |t|&lt;br /&gt;
   &lt;br /&gt;
  tweetday = t.created_at.to_s[0..2]&lt;br /&gt;
  &lt;br /&gt;
  if dayhash.has_key?(tweetday)&lt;br /&gt;
    dayhash[tweetday] = dayhash[tweetday] + 1&lt;br /&gt;
  else&lt;br /&gt;
    dayhash[tweetday] = 1&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
We need to retrieve a BarChart to display per day tweet activity. &lt;br /&gt;
  &lt;br /&gt;
 GoogleChart::BarChart.new('300x200', screen_name, :vertical, false) do |bc|&lt;br /&gt;
  bc.data &amp;quot;Sunday&amp;quot;, [dayhash[&amp;quot;Sun&amp;quot;]], '00000f'&lt;br /&gt;
  bc.data &amp;quot;Monday&amp;quot;, [dayhash[&amp;quot;Mon&amp;quot;]], '0000ff'&lt;br /&gt;
  bc.data &amp;quot;Tuesday&amp;quot;, [dayhash[&amp;quot;Tue&amp;quot;]], '00ff00'&lt;br /&gt;
  bc.data &amp;quot;Wednesday&amp;quot;, [dayhash[&amp;quot;Wed&amp;quot;]], '00ffff'&lt;br /&gt;
  bc.data &amp;quot;Thursday&amp;quot;, [dayhash[&amp;quot;Thu&amp;quot;]], 'ff0000'&lt;br /&gt;
  bc.data &amp;quot;Friday&amp;quot;, [dayhash[&amp;quot;Fri&amp;quot;]], 'ff00ff'&lt;br /&gt;
  bc.data &amp;quot;Saturday&amp;quot;, [dayhash[&amp;quot;Sat&amp;quot;]], 'ffff00'&lt;br /&gt;
  puts bc.to_url&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:img2333.jpg]]&lt;br /&gt;
&lt;br /&gt;
Running the above mining script provides the result of the execution of the tweet-days script in the above Listing for the developerWorks account. As shown, Wednesday tends to be the most active tweet day, with Saturday and Sunday the least active.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
# Rudi Cilibrasi(2008,Oct 4)''CompLearn: A compression-based data-mining toolkit.'' Retrieved from http://www.ruby-doc.org/gems/docs/c/complearn-0.6.2/doc/readme_txt.html &lt;br /&gt;
&lt;br /&gt;
# Seamus Abshere and Andy Rossmeissl (2012, May 14) Real time example of Data Mining Rails Example.[http://impact.brighterplanet.com/] Retrieved from http://www.rubydoc.info/gems/data_miner-ruby19/frames&lt;br /&gt;
&lt;br /&gt;
==Terminology==&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79935</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w46 ka</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79935"/>
		<updated>2013-10-08T00:35:22Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''' Data Mining in Rails Application'''&lt;br /&gt;
This wiki discusses the implementation of Data Mining tasks i.e automatic or semi-automatic analysis of large quantities of data to extract previously unknown interesting patterns such as groups of data records, unusual records and dependencies in Rails Application.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Data Mining in Rails Application ==&lt;br /&gt;
&lt;br /&gt;
Data mining &amp;lt;ref name=&amp;quot;mining&amp;gt; Usama Fayyad, Gregory Piatetsky-Shapiro and Padhraic Smyth. (2008, Dec 17). ''From Data Mining to Knowledge Discoveries in Databases.'' Retrieved from http://www.kdnuggets.com/gpspubs/aimag-kdd-overview-1996-Fayyad.pdf&amp;lt;/ref&amp;gt; (the analysis step of the &amp;quot;Knowledge Discovery in Databases&amp;quot; process, or KDD) is the computational process of discovering patterns in large data sets involving methods at the intersection of artificial intelligence, machine learning, statistics, and database systems. The overall goal of the data mining process is to extract information from a data set and transform it into an understandable structure for further use.&lt;br /&gt;
&lt;br /&gt;
Ruby on Rails, often simply Rails, is an open source web application framework which runs on the Ruby programming language. Data mining techniques like &amp;lt;code&amp;gt; [http://en.wikipedia.org/wiki/K-means_clustering K-means clustering] &amp;lt;/code&amp;gt; can be developed on ruby on rails by using various gems which ruby provides. &lt;br /&gt;
Thus it becomes easier for a data mining analyst to write mining code in a ruby on rails application.&lt;br /&gt;
&lt;br /&gt;
==Weka and Ruby==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/ Weka]&amp;lt;/code&amp;gt; is a collection of &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Machine_learning machine learning]&amp;lt;/code&amp;gt; algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from an embedded code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization.[http://www.ibm.com/developerworks/library/ba-data-mining-techniques/] It is also well-suited for developing new machine learning schemes. Weka is written in Java however it is possible to use Weka’s libraries inside Ruby.  To do this, we must install Java, &amp;lt;code&amp;gt;[http://rubygems.org/gems/rjb Rjb]&amp;lt;/code&amp;gt;, and of course obtain the Weka source code.  We use &amp;lt;code&amp;gt;[https://github.com/jruby/jruby/wiki/AboutJRuby JRuby]&amp;lt;/code&amp;gt; and this is illustrated as follows: &amp;lt;ref name=&amp;quot;wekaruby&amp;quot;&amp;gt;Peter Lane. (2009, Aug 15). ''Accessing Weka with JRuby.'' Retrieved from http://rubyforscientificresearch.blogspot.com/2009/08/accessing-weka-from-jruby.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Clustering Data using WEKA from JRuby===&lt;br /&gt;
&lt;br /&gt;
JRuby provides easy access to Java classes and methods, and WEKA is no exception. The following program builds a simple k-means cluster on a supplied input file, and then prints out the assigned cluster for each data instance. The 'include_class' statements are there to simplify references to classes in the API. When classifying each instance, we must watch for the exception thrown in case a classification cannot be made. Finally, notice that the filename is passed as a command-line parameter: the parameters after the name of the JRuby program are packaged up into ARGV in the usual ruby style.  Assuming weka.jar, jruby.jar, and your program are in the same folder, a sample Ruby example is shown bellow:&lt;br /&gt;
&lt;br /&gt;
  # Weka scripting from jruby&lt;br /&gt;
  require &amp;quot;java&amp;quot;&lt;br /&gt;
  require &amp;quot;weka&amp;quot;&lt;br /&gt;
  include_class &amp;quot;java.io.FileReader&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.clusterers.SimpleKMeans&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.core.Instances&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  # load data file&lt;br /&gt;
  file = FileReader.new ARGV[0]&lt;br /&gt;
  data = Instances.new file&lt;br /&gt;
  &lt;br /&gt;
  # create the model&lt;br /&gt;
  kmeans = SimpleKMeans.new&lt;br /&gt;
  kmeans.buildClusterer data&lt;br /&gt;
  &lt;br /&gt;
  # print out the built model&lt;br /&gt;
  print kmeans&lt;br /&gt;
  &lt;br /&gt;
  # Display the cluster for each instance&lt;br /&gt;
  data.numInstances.times do |i|&lt;br /&gt;
  cluster = &amp;quot;UNKNOWN&amp;quot;&lt;br /&gt;
   begin&lt;br /&gt;
    cluster = kmeans.clusterInstance(data.instance(i))&lt;br /&gt;
    rescue java.lang.Exception&lt;br /&gt;
   end&lt;br /&gt;
  puts &amp;quot;#{data.instance(i)},#{cluster}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We can see that the WEKA API makes it easy to pass in a data file. Data can be in a number of formats, including &amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[http://docs.python.org/2/library/csv.html CSV]&amp;lt;/code&amp;gt;. When run on the weather.arff example (in WEKA's 'data' folder), the output looks like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Number of iterations: 3&lt;br /&gt;
  Within cluster sum of squared errors: 16.237456311387238&lt;br /&gt;
  Missing values globally replaced with mean/mode&lt;br /&gt;
  &lt;br /&gt;
  Cluster centroids:&lt;br /&gt;
                             Cluster#&lt;br /&gt;
  Attribute      Full Data          0          1&lt;br /&gt;
                      (14)        (9)        (5)&lt;br /&gt;
  &lt;br /&gt;
  outlook            sunny      sunny   overcast&lt;br /&gt;
  temperature      73.5714    75.8889       69.4&lt;br /&gt;
  humidity         81.6429    84.1111       77.2&lt;br /&gt;
  windy              FALSE      FALSE       TRUE&lt;br /&gt;
  play                 yes        yes        yes&lt;br /&gt;
&lt;br /&gt;
===Advantages of using Weka from jRuby===&lt;br /&gt;
&lt;br /&gt;
One of the advantages of using a language like jruby to talk to WEKA is that we should have more control on how our data is constructed and passed to the machine-learning algorithms. A good start is how to construct our own set of instances, rather than reading them directly in from file. There are some quirks to WEKA's construction of a set of instances. In particular, each attribute must be defined through an instance of the Attribute class. This class gives a string name to the attribute and if the attribute is a nominal attribute, the class also holds a vector of the nominal values. Each instance can then be constructed and added to the growing set of instances.&lt;br /&gt;
&lt;br /&gt;
==Popular gems for Data Mining==&lt;br /&gt;
&lt;br /&gt;
Since data mining is a complex process of retrieving data from a huge set of databases, many gems are used to ease this procedure in a rails application. Some of the popular gems are RVol, Rbbt and RubyBand. They are explained below. &lt;br /&gt;
&lt;br /&gt;
===RVol===&lt;br /&gt;
&lt;br /&gt;
Gem for creating a database for data mining stock markets focusing on &amp;lt;code&amp;gt; [http://www.spindices.com/indices/equity/sp-500 SP500]&amp;lt;/code&amp;gt; data. Rvol enables investors to study market volatility from free data on the internet. RVol is the most popular gem for data mining applications developed in Rails.  The created database could be used for instance from &amp;lt;code&amp;gt;[https://www.stat.auckland.ac.nz/~ihaka/downloads/Interface98.pdf R] &amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt; [http://www.altiusdirectory.com/Computers/matlab-programming-language.php Matlab]&amp;lt;/code&amp;gt; or similar to do quantitative analysis. You could script new data mining functions extending the Rvol library, load the data into a statistics package, or use it with your own quantitative framework.  Usage: rvol -s will create the database. The database contains stocks (with industries), options, implied volatility and calculated standard deviations for the day. Earnings are downloaded and listed with implied volatilities for front and back month options. There are some reports, which can be generated after the database is downloaded by looking at rvol -p. There is a function to calculate correlations between stocks in the same industry groups (--correlationAll, --correlation10 (10 day correlation),this will take a long time and jruby is recommended for a better use of system resources. Rvol downloads option chains, calculates implied volatilities for them and has features to list top 10 type of lists for potential investment opportunities. 'Put' call ratios are calculated , total amount of 'puts' or 'calls' for a particular company etc are available. These can be used to measure the market sentiment. Different filters can be used to find stocks/options with high volatilities, stocks with high options volume for the day etc which are indicators of forthcoming events. &amp;lt;ref name=&amp;quot;rvol&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 18). ''The Ruby ToolBox: RVol.'' Retrieved from https://www.ruby-toolbox.com/projects/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of RVol====&lt;br /&gt;
&lt;br /&gt;
Since RVol is a Ruby Gem, we must install it by including it in the Gem file of our Rails application. Version 0.6.4 is the latest and the most stable version by Tonic. &lt;br /&gt;
&lt;br /&gt;
 gem install rvol -v 0.6.4&lt;br /&gt;
&lt;br /&gt;
====Example: Use of RVol to Generate stock market databases====&lt;br /&gt;
&lt;br /&gt;
RVol is commonly used to populate databases for Mining stock market data. A sample code snippet below shows the simple way to generate a test database from internet data. &amp;lt;ref name=&amp;quot;rvolEg&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 19). ''A ruby gem for downloading and processing options chains and financial data.'' Retrieved from https://github.com/tonik/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'Rvol'&lt;br /&gt;
 require 'test/unit'&lt;br /&gt;
 require 'dm-core'&lt;br /&gt;
 require 'dm-migrations'&lt;br /&gt;
 require 'model/stock'&lt;br /&gt;
 require 'model/chain'&lt;br /&gt;
 require 'model/earning'&lt;br /&gt;
 require 'model/stockcorrelation'&lt;br /&gt;
 &lt;br /&gt;
 #set the test db an in memory db&lt;br /&gt;
 DataMapper::Logger.new($stdout, :debug)&lt;br /&gt;
 &lt;br /&gt;
 puts File.dirname(__FILE__)&lt;br /&gt;
 &lt;br /&gt;
 DataMapper.setup(:default, &amp;quot;sqlite::memory:&amp;quot;)&lt;br /&gt;
 DataMapper.finalize&lt;br /&gt;
 DataMapper.auto_migrate!&lt;br /&gt;
 &lt;br /&gt;
 # GENERATE THE TEST DATABASE FROM INTERNET DATA&lt;br /&gt;
 &lt;br /&gt;
 puts 'GENERATING TEST DATABASE AND TESTING SCRAPERS'&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Rbbt===&lt;br /&gt;
&lt;br /&gt;
Rbbt stands for Ruby Bio-Text, it started as an API for &amp;lt;code&amp;gt; [http://people.ischool.berkeley.edu/~hearst/text-mining.html text mining] &amp;lt;/code&amp;gt; developed for &amp;lt;code&amp;gt; [http://sent.dacya.ucm.es/ SENT] &amp;lt;/code&amp;gt;, but its functionality has been used for other applications as well, such as &amp;lt;code&amp;gt; [http://marq.dacya.ucm.es/ MARQ] &amp;lt;/code&amp;gt;. Rbbt covers several functionalities, some will work right away, some require to install dependencies or download and process data from the internet. Since not all users are likely to need all the functionalities, the dependencies of this gem include only the very basic requirements. Dependencies may appear unexpectedly when using new parts of the API. &amp;lt;ref name=&amp;quot;rbbt&amp;quot;&amp;gt;Miguel Vazquez. (2013, June 10). ''Rbbt.'' Retrieved from http://rubydoc.info/gems/rbbt/frames&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Rbbt====&lt;br /&gt;
&lt;br /&gt;
Install the gem normally gem install rbbt. The gem includes a configuration tool rbbt_config. The first time you run it, it will ask you to configure some paths. After that you may use it to process the data for different tasks.&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Rbbt to translate identifiers====&lt;br /&gt;
&lt;br /&gt;
1. Do rbbt_config prepare identifiers to do deploy the configuration files and enter 'gene' data, this needs to be done just once.&lt;br /&gt;
&lt;br /&gt;
2. Now you may do rbbt_config install 'organisms' to process all the 'organisms', or rbbt_config install organisms such as 'yeast'.&lt;br /&gt;
&lt;br /&gt;
3. You may now use a script like this to translate 'gene' identifiers from 'yeast' feed from the standard input.&lt;br /&gt;
&lt;br /&gt;
 require 'rbbt/sources/organism'&lt;br /&gt;
 &lt;br /&gt;
 index = Organism.id_index('Sce', :native =&amp;gt; 'Enter Gene Id')&lt;br /&gt;
 &lt;br /&gt;
 STDIN.each_line{|l| puts &amp;quot;#{l.chomp} =&amp;gt; #{index[l.chomp]}&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
===Ruby Band===&lt;br /&gt;
&lt;br /&gt;
Ruby Band is a Ruby Gem that makes use of some selected Java software for data mining and machine learning applications available to the JRuby/Ruby users. Ruby Band features a comprehensive collection of data preprocessing and modeling techniques, and supports several standard data mining tasks, more specifically: data pre-processing (filtering), clustering, classification, regression, and &amp;lt;code&amp;gt; [http://jmlr.org/papers/v3/guyon03a.html feature selection] &amp;lt;/code&amp;gt;. &amp;lt;ref name=&amp;quot;rubyband&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 24). ''Data Mining in JRuby with Ruby Band.'' Retrieved from http://sciruby.com/blog/2013/09/24/gsoc-2013-data-mining-in-jruby-with-ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Ruby Band====&lt;br /&gt;
&lt;br /&gt;
Install the 'jbundle' gem and 'bundle' for JRuby before trying to install the 'ruby-band' gem. &lt;br /&gt;
&lt;br /&gt;
If you want to use 'ruby-band' APIs without installing the gem you need to run command 'rake -T' once before requiring the gem in your script (this is necessary for jbundler to download the '.jar' files and subsequently set the Java classpath). Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 gem install ruby-band&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Parsing====&lt;br /&gt;
&lt;br /&gt;
One central datatype of ruby-band is derived from the Weka counterpart (the class Weka.core.Instances). By instantiating this class, we obtain a matrix-like structure for storing an entire dataset. Ad-hoc methods were created to guarantee that 'Instances' class objects can be converted to other datatypes (e.g. Apache matrix) and back. There are currently many ways to import data into ruby-band. But the basic way is to Parse data from ARFF/CSV files. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can simply parse an external Weka ARFF/CSV file by doing:&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 dataset = Core::Parser.parse_CSV(my_file.csv)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Classification====&lt;br /&gt;
&lt;br /&gt;
Classification and regression algorithms in WEKA are called “classifiers” and are located below the Weka::Classifier:: module. Currently, ruby-band only supports batch-trainable classifiers: this means they get trained on the whole dataset at once. Below is a quick example of how to train a classifier on a dataset parsed from an '''&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt;'''(attribute relation file format). &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 &lt;br /&gt;
 # parse a dataset&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 &lt;br /&gt;
 # initialize and train a classifier&lt;br /&gt;
 classifier = Weka::Classifier::Lazy::KStar::Base.new do&lt;br /&gt;
   set_options '-M d'&lt;br /&gt;
   set_data dataset&lt;br /&gt;
   set_class_index 4&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 # cross-validate the trained classifier&lt;br /&gt;
 puts classifier.cross_validate(3)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Clustering====&lt;br /&gt;
&lt;br /&gt;
Clustering is an unsupervised Machine Learning technique of finding patterns in the data, i.e., these algorithms work without class attributes. Classifiers, on the other hand, are supervised and need a class attribute. This section, similar to the one about classifiers, covers the following topics:&lt;br /&gt;
* Building a clusterer - batch (incremental must still be implemented) learning.&lt;br /&gt;
* Evaluating a clusterer - how to evaluate a built clusterer.&lt;br /&gt;
* Clustering instances - determining what clusters unknown instances belong to. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data Mining with Ruby and Twitter==&lt;br /&gt;
&lt;br /&gt;
The following sections present a few scripts for collecting and presenting data available through the Twitter API. These scripts focus on simplicity, but you can extend and combine them to create new capabilities. &amp;lt;ref name=&amp;quot;TwitterData&amp;quot;&amp;gt;M. Tim Jones. (2011, Oct 11). ''Data Mining with Ruby and Twitter.'' Retrieved from http://www.ibm.com/developerworks/library/os-dataminingrubytwitter/os-dataminingrubytwitter-pdf.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Twitter User Information===&lt;br /&gt;
&lt;br /&gt;
A large amount of information is available about each Twitter user. This information is only accessible if the user isn't protected. Let's look at how you can extract a user's data and present it in a more convenient way. Listing below presents a simple Ruby script to retrieve a user's information (based on his or her screen name), and then emit some of the more useful elements. You use the 'to_s' Ruby method to convert the value to a string as needed. Note that you first ensure that the user isn't protected; otherwise, this data wouldn't be accessible.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 a_user = Twitter.user(screen_name)&lt;br /&gt;
 &lt;br /&gt;
 if a_user.protected != true&lt;br /&gt;
 &lt;br /&gt;
  puts &amp;quot;Username   : &amp;quot; + a_user.screen_name.to_s&lt;br /&gt;
  puts &amp;quot;Name       : &amp;quot; + a_user.name&lt;br /&gt;
  puts &amp;quot;Id         : &amp;quot; + a_user.id_str&lt;br /&gt;
  puts &amp;quot;Location   : &amp;quot; + a_user.location&lt;br /&gt;
  puts &amp;quot;User since : &amp;quot; + a_user.created_at.to_s&lt;br /&gt;
  puts &amp;quot;Bio        : &amp;quot; + a_user.description.to_s&lt;br /&gt;
  puts &amp;quot;Followers  : &amp;quot; + a_user.followers_count.to_s&lt;br /&gt;
  puts &amp;quot;Friends    : &amp;quot; + a_user.friends_count.to_s&lt;br /&gt;
  puts &amp;quot;Listed Cnt : &amp;quot; + a_user.listed_count.to_s&lt;br /&gt;
  puts &amp;quot;Tweet Cnt  : &amp;quot; + a_user.statuses_count.to_s&lt;br /&gt;
  puts &amp;quot;Geocoded   : &amp;quot; + a_user.geo_enabled.to_s&lt;br /&gt;
  puts &amp;quot;Language   : &amp;quot; + a_user.lang&lt;br /&gt;
  if (a_user.url != nil)&lt;br /&gt;
    puts &amp;quot;URL        : &amp;quot; + a_user.url.to_s&lt;br /&gt;
  end&lt;br /&gt;
  if (a_user.time_zone != nil)&lt;br /&gt;
    puts &amp;quot;Time Zone  : &amp;quot; + a_user.time_zone&lt;br /&gt;
  end&lt;br /&gt;
  puts &amp;quot;Verified   : &amp;quot; + a_user.verified.to_s&lt;br /&gt;
  puts&lt;br /&gt;
  &lt;br /&gt;
  tweet = Twitter.user_timeline(screen_name).first&lt;br /&gt;
  &lt;br /&gt;
  puts &amp;quot;Tweet time : &amp;quot; + tweet.created_at&lt;br /&gt;
  puts &amp;quot;Tweet ID   : &amp;quot; + tweet.id.to_s&lt;br /&gt;
  puts &amp;quot;Tweet text : &amp;quot; + tweet.text&lt;br /&gt;
  &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Twitter User Behavior===&lt;br /&gt;
&lt;br /&gt;
Twitter contains a large amount of data that you can mine to understand some elements of user behavior. Two simple examples are to analyze when a Twitter user tweets and from what application the user tweets. You can use the following two simple scripts to extract and visualize this information. Listing below presents a script that iterates the tweets from a particular user (using the user_timeline method), and then for each tweet, extracts the particular day on which the tweet originated. You use a simple hash again to accumulate your weekday counts, then generate a bar chart using Google Charts in a similar fashion to the previous time zone example. Note also the use of default for the hash, which specifies the value to return for undefined hashes.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 require &amp;quot;google_chart&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 dayhash = Hash.new&lt;br /&gt;
 &lt;br /&gt;
 # Initialize to avoid a nil error with GoogleCharts (undefined is zero)&lt;br /&gt;
 dayhash.default = 0&lt;br /&gt;
 &lt;br /&gt;
 timeline = Twitter.user_timeline(screen_name, :count =&amp;gt; 200 )&lt;br /&gt;
 timeline.each do |t|&lt;br /&gt;
   &lt;br /&gt;
  tweetday = t.created_at.to_s[0..2]&lt;br /&gt;
  &lt;br /&gt;
  if dayhash.has_key?(tweetday)&lt;br /&gt;
    dayhash[tweetday] = dayhash[tweetday] + 1&lt;br /&gt;
  else&lt;br /&gt;
    dayhash[tweetday] = 1&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
We need to retrieve a BarChart to display per day tweet activity. &lt;br /&gt;
  &lt;br /&gt;
 GoogleChart::BarChart.new('300x200', screen_name, :vertical, false) do |bc|&lt;br /&gt;
  bc.data &amp;quot;Sunday&amp;quot;, [dayhash[&amp;quot;Sun&amp;quot;]], '00000f'&lt;br /&gt;
  bc.data &amp;quot;Monday&amp;quot;, [dayhash[&amp;quot;Mon&amp;quot;]], '0000ff'&lt;br /&gt;
  bc.data &amp;quot;Tuesday&amp;quot;, [dayhash[&amp;quot;Tue&amp;quot;]], '00ff00'&lt;br /&gt;
  bc.data &amp;quot;Wednesday&amp;quot;, [dayhash[&amp;quot;Wed&amp;quot;]], '00ffff'&lt;br /&gt;
  bc.data &amp;quot;Thursday&amp;quot;, [dayhash[&amp;quot;Thu&amp;quot;]], 'ff0000'&lt;br /&gt;
  bc.data &amp;quot;Friday&amp;quot;, [dayhash[&amp;quot;Fri&amp;quot;]], 'ff00ff'&lt;br /&gt;
  bc.data &amp;quot;Saturday&amp;quot;, [dayhash[&amp;quot;Sat&amp;quot;]], 'ffff00'&lt;br /&gt;
  puts bc.to_url&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:img2333.jpg]]&lt;br /&gt;
&lt;br /&gt;
Running the above mining script provides the result of the execution of the tweet-days script in the above Listing for the developerWorks account. As shown, Wednesday tends to be the most active tweet day, with Saturday and Sunday the least active.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
# Rudi Cilibrasi(2008,Oct 4)''CompLearn: A compression-based data-mining toolkit.'' Retrieved from http://www.ruby-doc.org/gems/docs/c/complearn-0.6.2/doc/readme_txt.html &lt;br /&gt;
&lt;br /&gt;
# Seamus Abshere and Andy Rossmeissl (2012, May 14) Real time example of Data Mining Rails Example.[http://impact.brighterplanet.com/] Retrieved from http://www.rubydoc.info/gems/data_miner-ruby19/frames&lt;br /&gt;
&lt;br /&gt;
==Terminology==&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79933</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w46 ka</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w46_ka&amp;diff=79933"/>
		<updated>2013-10-08T00:31:49Z</updated>

		<summary type="html">&lt;p&gt;Knjhaver: /* Data Mining in Rails Application */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction to Data Mining in Rails Application ==&lt;br /&gt;
&lt;br /&gt;
Data mining &amp;lt;ref name=&amp;quot;mining&amp;gt; Usama Fayyad, Gregory Piatetsky-Shapiro and Padhraic Smyth. (2008, Dec 17). ''From Data Mining to Knowledge Discoveries in Databases.'' Retrieved from http://www.kdnuggets.com/gpspubs/aimag-kdd-overview-1996-Fayyad.pdf&amp;lt;/ref&amp;gt; (the analysis step of the &amp;quot;Knowledge Discovery in Databases&amp;quot; process, or KDD) is the computational process of discovering patterns in large data sets involving methods at the intersection of artificial intelligence, machine learning, statistics, and database systems. The overall goal of the data mining process is to extract information from a data set and transform it into an understandable structure for further use.&lt;br /&gt;
&lt;br /&gt;
Ruby on Rails, often simply Rails, is an open source web application framework which runs on the Ruby programming language. Data mining techniques like &amp;lt;code&amp;gt; [http://en.wikipedia.org/wiki/K-means_clustering K-means clustering] &amp;lt;/code&amp;gt; can be developed on ruby on rails by using various gems which ruby provides. &lt;br /&gt;
Thus it becomes easier for a data mining analyst to write mining code in a ruby on rails application.&lt;br /&gt;
&lt;br /&gt;
==Weka and Ruby==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/ Weka]&amp;lt;/code&amp;gt; is a collection of &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Machine_learning machine learning]&amp;lt;/code&amp;gt; algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from an embedded code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization.[http://www.ibm.com/developerworks/library/ba-data-mining-techniques/] It is also well-suited for developing new machine learning schemes. Weka is written in Java however it is possible to use Weka’s libraries inside Ruby.  To do this, we must install Java, &amp;lt;code&amp;gt;[http://rubygems.org/gems/rjb Rjb]&amp;lt;/code&amp;gt;, and of course obtain the Weka source code.  We use &amp;lt;code&amp;gt;[https://github.com/jruby/jruby/wiki/AboutJRuby JRuby]&amp;lt;/code&amp;gt; and this is illustrated as follows: &amp;lt;ref name=&amp;quot;wekaruby&amp;quot;&amp;gt;Peter Lane. (2009, Aug 15). ''Accessing Weka with JRuby.'' Retrieved from http://rubyforscientificresearch.blogspot.com/2009/08/accessing-weka-from-jruby.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Clustering Data using WEKA from JRuby===&lt;br /&gt;
&lt;br /&gt;
JRuby provides easy access to Java classes and methods, and WEKA is no exception. The following program builds a simple k-means cluster on a supplied input file, and then prints out the assigned cluster for each data instance. The 'include_class' statements are there to simplify references to classes in the API. When classifying each instance, we must watch for the exception thrown in case a classification cannot be made. Finally, notice that the filename is passed as a command-line parameter: the parameters after the name of the JRuby program are packaged up into ARGV in the usual ruby style.  Assuming weka.jar, jruby.jar, and your program are in the same folder, a sample Ruby example is shown bellow:&lt;br /&gt;
&lt;br /&gt;
  # Weka scripting from jruby&lt;br /&gt;
  require &amp;quot;java&amp;quot;&lt;br /&gt;
  require &amp;quot;weka&amp;quot;&lt;br /&gt;
  include_class &amp;quot;java.io.FileReader&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.clusterers.SimpleKMeans&amp;quot;&lt;br /&gt;
  include_class &amp;quot;weka.core.Instances&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  # load data file&lt;br /&gt;
  file = FileReader.new ARGV[0]&lt;br /&gt;
  data = Instances.new file&lt;br /&gt;
  &lt;br /&gt;
  # create the model&lt;br /&gt;
  kmeans = SimpleKMeans.new&lt;br /&gt;
  kmeans.buildClusterer data&lt;br /&gt;
  &lt;br /&gt;
  # print out the built model&lt;br /&gt;
  print kmeans&lt;br /&gt;
  &lt;br /&gt;
  # Display the cluster for each instance&lt;br /&gt;
  data.numInstances.times do |i|&lt;br /&gt;
  cluster = &amp;quot;UNKNOWN&amp;quot;&lt;br /&gt;
   begin&lt;br /&gt;
    cluster = kmeans.clusterInstance(data.instance(i))&lt;br /&gt;
    rescue java.lang.Exception&lt;br /&gt;
   end&lt;br /&gt;
  puts &amp;quot;#{data.instance(i)},#{cluster}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We can see that the WEKA API makes it easy to pass in a data file. Data can be in a number of formats, including &amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[http://docs.python.org/2/library/csv.html CSV]&amp;lt;/code&amp;gt;. When run on the weather.arff example (in WEKA's 'data' folder), the output looks like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Number of iterations: 3&lt;br /&gt;
  Within cluster sum of squared errors: 16.237456311387238&lt;br /&gt;
  Missing values globally replaced with mean/mode&lt;br /&gt;
  &lt;br /&gt;
  Cluster centroids:&lt;br /&gt;
                             Cluster#&lt;br /&gt;
  Attribute      Full Data          0          1&lt;br /&gt;
                      (14)        (9)        (5)&lt;br /&gt;
  &lt;br /&gt;
  outlook            sunny      sunny   overcast&lt;br /&gt;
  temperature      73.5714    75.8889       69.4&lt;br /&gt;
  humidity         81.6429    84.1111       77.2&lt;br /&gt;
  windy              FALSE      FALSE       TRUE&lt;br /&gt;
  play                 yes        yes        yes&lt;br /&gt;
&lt;br /&gt;
===Advantages of using Weka from jRuby===&lt;br /&gt;
&lt;br /&gt;
One of the advantages of using a language like jruby to talk to WEKA is that we should have more control on how our data is constructed and passed to the machine-learning algorithms. A good start is how to construct our own set of instances, rather than reading them directly in from file. There are some quirks to WEKA's construction of a set of instances. In particular, each attribute must be defined through an instance of the Attribute class. This class gives a string name to the attribute and if the attribute is a nominal attribute, the class also holds a vector of the nominal values. Each instance can then be constructed and added to the growing set of instances.&lt;br /&gt;
&lt;br /&gt;
==Popular gems for Data Mining==&lt;br /&gt;
&lt;br /&gt;
Since data mining is a complex process of retrieving data from a huge set of databases, many gems are used to ease this procedure in a rails application. Some of the popular gems are RVol, Rbbt and RubyBand. They are explained below. &lt;br /&gt;
&lt;br /&gt;
===RVol===&lt;br /&gt;
&lt;br /&gt;
Gem for creating a database for data mining stock markets focusing on &amp;lt;code&amp;gt; [http://www.spindices.com/indices/equity/sp-500 SP500]&amp;lt;/code&amp;gt; data. Rvol enables investors to study market volatility from free data on the internet. RVol is the most popular gem for data mining applications developed in Rails.  The created database could be used for instance from &amp;lt;code&amp;gt;[https://www.stat.auckland.ac.nz/~ihaka/downloads/Interface98.pdf R] &amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt; [http://www.altiusdirectory.com/Computers/matlab-programming-language.php Matlab]&amp;lt;/code&amp;gt; or similar to do quantitative analysis. You could script new data mining functions extending the Rvol library, load the data into a statistics package, or use it with your own quantitative framework.  Usage: rvol -s will create the database. The database contains stocks (with industries), options, implied volatility and calculated standard deviations for the day. Earnings are downloaded and listed with implied volatilities for front and back month options. There are some reports, which can be generated after the database is downloaded by looking at rvol -p. There is a function to calculate correlations between stocks in the same industry groups (--correlationAll, --correlation10 (10 day correlation),this will take a long time and jruby is recommended for a better use of system resources. Rvol downloads option chains, calculates implied volatilities for them and has features to list top 10 type of lists for potential investment opportunities. 'Put' call ratios are calculated , total amount of 'puts' or 'calls' for a particular company etc are available. These can be used to measure the market sentiment. Different filters can be used to find stocks/options with high volatilities, stocks with high options volume for the day etc which are indicators of forthcoming events. &amp;lt;ref name=&amp;quot;rvol&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 18). ''The Ruby ToolBox: RVol.'' Retrieved from https://www.ruby-toolbox.com/projects/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of RVol====&lt;br /&gt;
&lt;br /&gt;
Since RVol is a Ruby Gem, we must install it by including it in the Gem file of our Rails application. Version 0.6.4 is the latest and the most stable version by Tonic. &lt;br /&gt;
&lt;br /&gt;
 gem install rvol -v 0.6.4&lt;br /&gt;
&lt;br /&gt;
====Example: Use of RVol to Generate stock market databases====&lt;br /&gt;
&lt;br /&gt;
RVol is commonly used to populate databases for Mining stock market data. A sample code snippet below shows the simple way to generate a test database from internet data. &amp;lt;ref name=&amp;quot;rvolEg&amp;quot;&amp;gt;Toni Karhu. (2012, Aug 19). ''A ruby gem for downloading and processing options chains and financial data.'' Retrieved from https://github.com/tonik/rvol&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'Rvol'&lt;br /&gt;
 require 'test/unit'&lt;br /&gt;
 require 'dm-core'&lt;br /&gt;
 require 'dm-migrations'&lt;br /&gt;
 require 'model/stock'&lt;br /&gt;
 require 'model/chain'&lt;br /&gt;
 require 'model/earning'&lt;br /&gt;
 require 'model/stockcorrelation'&lt;br /&gt;
 &lt;br /&gt;
 #set the test db an in memory db&lt;br /&gt;
 DataMapper::Logger.new($stdout, :debug)&lt;br /&gt;
 &lt;br /&gt;
 puts File.dirname(__FILE__)&lt;br /&gt;
 &lt;br /&gt;
 DataMapper.setup(:default, &amp;quot;sqlite::memory:&amp;quot;)&lt;br /&gt;
 DataMapper.finalize&lt;br /&gt;
 DataMapper.auto_migrate!&lt;br /&gt;
 &lt;br /&gt;
 # GENERATE THE TEST DATABASE FROM INTERNET DATA&lt;br /&gt;
 &lt;br /&gt;
 puts 'GENERATING TEST DATABASE AND TESTING SCRAPERS'&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Rbbt===&lt;br /&gt;
&lt;br /&gt;
Rbbt stands for Ruby Bio-Text, it started as an API for &amp;lt;code&amp;gt; [http://people.ischool.berkeley.edu/~hearst/text-mining.html text mining] &amp;lt;/code&amp;gt; developed for &amp;lt;code&amp;gt; [http://sent.dacya.ucm.es/ SENT] &amp;lt;/code&amp;gt;, but its functionality has been used for other applications as well, such as &amp;lt;code&amp;gt; [http://marq.dacya.ucm.es/ MARQ] &amp;lt;/code&amp;gt;. Rbbt covers several functionalities, some will work right away, some require to install dependencies or download and process data from the internet. Since not all users are likely to need all the functionalities, the dependencies of this gem include only the very basic requirements. Dependencies may appear unexpectedly when using new parts of the API. &amp;lt;ref name=&amp;quot;rbbt&amp;quot;&amp;gt;Miguel Vazquez. (2013, June 10). ''Rbbt.'' Retrieved from http://rubydoc.info/gems/rbbt/frames&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Rbbt====&lt;br /&gt;
&lt;br /&gt;
Install the gem normally gem install rbbt. The gem includes a configuration tool rbbt_config. The first time you run it, it will ask you to configure some paths. After that you may use it to process the data for different tasks.&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Rbbt to translate identifiers====&lt;br /&gt;
&lt;br /&gt;
1. Do rbbt_config prepare identifiers to do deploy the configuration files and enter 'gene' data, this needs to be done just once.&lt;br /&gt;
&lt;br /&gt;
2. Now you may do rbbt_config install 'organisms' to process all the 'organisms', or rbbt_config install organisms such as 'yeast'.&lt;br /&gt;
&lt;br /&gt;
3. You may now use a script like this to translate 'gene' identifiers from 'yeast' feed from the standard input.&lt;br /&gt;
&lt;br /&gt;
 require 'rbbt/sources/organism'&lt;br /&gt;
 &lt;br /&gt;
 index = Organism.id_index('Sce', :native =&amp;gt; 'Enter Gene Id')&lt;br /&gt;
 &lt;br /&gt;
 STDIN.each_line{|l| puts &amp;quot;#{l.chomp} =&amp;gt; #{index[l.chomp]}&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
===Ruby Band===&lt;br /&gt;
&lt;br /&gt;
Ruby Band is a Ruby Gem that makes use of some selected Java software for data mining and machine learning applications available to the JRuby/Ruby users. Ruby Band features a comprehensive collection of data preprocessing and modeling techniques, and supports several standard data mining tasks, more specifically: data pre-processing (filtering), clustering, classification, regression, and &amp;lt;code&amp;gt; [http://jmlr.org/papers/v3/guyon03a.html feature selection] &amp;lt;/code&amp;gt;. &amp;lt;ref name=&amp;quot;rubyband&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 24). ''Data Mining in JRuby with Ruby Band.'' Retrieved from http://sciruby.com/blog/2013/09/24/gsoc-2013-data-mining-in-jruby-with-ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Installation of Ruby Band====&lt;br /&gt;
&lt;br /&gt;
Install the 'jbundle' gem and 'bundle' for JRuby before trying to install the 'ruby-band' gem. &lt;br /&gt;
&lt;br /&gt;
If you want to use 'ruby-band' APIs without installing the gem you need to run command 'rake -T' once before requiring the gem in your script (this is necessary for jbundler to download the '.jar' files and subsequently set the Java classpath). Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 gem install ruby-band&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Parsing====&lt;br /&gt;
&lt;br /&gt;
One central datatype of ruby-band is derived from the Weka counterpart (the class Weka.core.Instances). By instantiating this class, we obtain a matrix-like structure for storing an entire dataset. Ad-hoc methods were created to guarantee that 'Instances' class objects can be converted to other datatypes (e.g. Apache matrix) and back. There are currently many ways to import data into ruby-band. But the basic way is to Parse data from ARFF/CSV files. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can simply parse an external Weka ARFF/CSV file by doing:&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 dataset = Core::Parser.parse_CSV(my_file.csv)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Classification====&lt;br /&gt;
&lt;br /&gt;
Classification and regression algorithms in WEKA are called “classifiers” and are located below the Weka::Classifier:: module. Currently, ruby-band only supports batch-trainable classifiers: this means they get trained on the whole dataset at once. Below is a quick example of how to train a classifier on a dataset parsed from an '''&amp;lt;code&amp;gt;[http://www.cs.waikato.ac.nz/ml/weka/arff.html ARFF]&amp;lt;/code&amp;gt;'''(attribute relation file format). &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require 'ruby-band'&lt;br /&gt;
 &lt;br /&gt;
 # parse a dataset&lt;br /&gt;
 dataset = Core::Parser.parse_ARFF(my_file.arff)&lt;br /&gt;
 &lt;br /&gt;
 # initialize and train a classifier&lt;br /&gt;
 classifier = Weka::Classifier::Lazy::KStar::Base.new do&lt;br /&gt;
   set_options '-M d'&lt;br /&gt;
   set_data dataset&lt;br /&gt;
   set_class_index 4&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 # cross-validate the trained classifier&lt;br /&gt;
 puts classifier.cross_validate(3)&lt;br /&gt;
&lt;br /&gt;
====Example: Use of Ruby Band for Data Clustering====&lt;br /&gt;
&lt;br /&gt;
Clustering is an unsupervised Machine Learning technique of finding patterns in the data, i.e., these algorithms work without class attributes. Classifiers, on the other hand, are supervised and need a class attribute. This section, similar to the one about classifiers, covers the following topics:&lt;br /&gt;
* Building a clusterer - batch (incremental must still be implemented) learning.&lt;br /&gt;
* Evaluating a clusterer - how to evaluate a built clusterer.&lt;br /&gt;
* Clustering instances - determining what clusters unknown instances belong to. &amp;lt;ref name=&amp;quot;rubybandGit&amp;quot;&amp;gt;Alberto Arrigoni. (2013, Sept 23). ''Ruby-Band Examples.'' Retrieved from https://github.com/arrigonialberto86/ruby-band&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data Mining with Ruby and Twitter==&lt;br /&gt;
&lt;br /&gt;
The following sections present a few scripts for collecting and presenting data available through the Twitter API. These scripts focus on simplicity, but you can extend and combine them to create new capabilities. &amp;lt;ref name=&amp;quot;TwitterData&amp;quot;&amp;gt;M. Tim Jones. (2011, Oct 11). ''Data Mining with Ruby and Twitter.'' Retrieved from http://www.ibm.com/developerworks/library/os-dataminingrubytwitter/os-dataminingrubytwitter-pdf.pdf&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Twitter User Information===&lt;br /&gt;
&lt;br /&gt;
A large amount of information is available about each Twitter user. This information is only accessible if the user isn't protected. Let's look at how you can extract a user's data and present it in a more convenient way. Listing below presents a simple Ruby script to retrieve a user's information (based on his or her screen name), and then emit some of the more useful elements. You use the 'to_s' Ruby method to convert the value to a string as needed. Note that you first ensure that the user isn't protected; otherwise, this data wouldn't be accessible.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 a_user = Twitter.user(screen_name)&lt;br /&gt;
 &lt;br /&gt;
 if a_user.protected != true&lt;br /&gt;
 &lt;br /&gt;
  puts &amp;quot;Username   : &amp;quot; + a_user.screen_name.to_s&lt;br /&gt;
  puts &amp;quot;Name       : &amp;quot; + a_user.name&lt;br /&gt;
  puts &amp;quot;Id         : &amp;quot; + a_user.id_str&lt;br /&gt;
  puts &amp;quot;Location   : &amp;quot; + a_user.location&lt;br /&gt;
  puts &amp;quot;User since : &amp;quot; + a_user.created_at.to_s&lt;br /&gt;
  puts &amp;quot;Bio        : &amp;quot; + a_user.description.to_s&lt;br /&gt;
  puts &amp;quot;Followers  : &amp;quot; + a_user.followers_count.to_s&lt;br /&gt;
  puts &amp;quot;Friends    : &amp;quot; + a_user.friends_count.to_s&lt;br /&gt;
  puts &amp;quot;Listed Cnt : &amp;quot; + a_user.listed_count.to_s&lt;br /&gt;
  puts &amp;quot;Tweet Cnt  : &amp;quot; + a_user.statuses_count.to_s&lt;br /&gt;
  puts &amp;quot;Geocoded   : &amp;quot; + a_user.geo_enabled.to_s&lt;br /&gt;
  puts &amp;quot;Language   : &amp;quot; + a_user.lang&lt;br /&gt;
  if (a_user.url != nil)&lt;br /&gt;
    puts &amp;quot;URL        : &amp;quot; + a_user.url.to_s&lt;br /&gt;
  end&lt;br /&gt;
  if (a_user.time_zone != nil)&lt;br /&gt;
    puts &amp;quot;Time Zone  : &amp;quot; + a_user.time_zone&lt;br /&gt;
  end&lt;br /&gt;
  puts &amp;quot;Verified   : &amp;quot; + a_user.verified.to_s&lt;br /&gt;
  puts&lt;br /&gt;
  &lt;br /&gt;
  tweet = Twitter.user_timeline(screen_name).first&lt;br /&gt;
  &lt;br /&gt;
  puts &amp;quot;Tweet time : &amp;quot; + tweet.created_at&lt;br /&gt;
  puts &amp;quot;Tweet ID   : &amp;quot; + tweet.id.to_s&lt;br /&gt;
  puts &amp;quot;Tweet text : &amp;quot; + tweet.text&lt;br /&gt;
  &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===Twitter User Behavior===&lt;br /&gt;
&lt;br /&gt;
Twitter contains a large amount of data that you can mine to understand some elements of user behavior. Two simple examples are to analyze when a Twitter user tweets and from what application the user tweets. You can use the following two simple scripts to extract and visualize this information. Listing below presents a script that iterates the tweets from a particular user (using the user_timeline method), and then for each tweet, extracts the particular day on which the tweet originated. You use a simple hash again to accumulate your weekday counts, then generate a bar chart using Google Charts in a similar fashion to the previous time zone example. Note also the use of default for the hash, which specifies the value to return for undefined hashes.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env ruby&lt;br /&gt;
 require &amp;quot;rubygems&amp;quot;&lt;br /&gt;
 require &amp;quot;twitter&amp;quot;&lt;br /&gt;
 require &amp;quot;google_chart&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 screen_name = String.new ARGV[0]&lt;br /&gt;
 &lt;br /&gt;
 dayhash = Hash.new&lt;br /&gt;
 &lt;br /&gt;
 # Initialize to avoid a nil error with GoogleCharts (undefined is zero)&lt;br /&gt;
 dayhash.default = 0&lt;br /&gt;
 &lt;br /&gt;
 timeline = Twitter.user_timeline(screen_name, :count =&amp;gt; 200 )&lt;br /&gt;
 timeline.each do |t|&lt;br /&gt;
   &lt;br /&gt;
  tweetday = t.created_at.to_s[0..2]&lt;br /&gt;
  &lt;br /&gt;
  if dayhash.has_key?(tweetday)&lt;br /&gt;
    dayhash[tweetday] = dayhash[tweetday] + 1&lt;br /&gt;
  else&lt;br /&gt;
    dayhash[tweetday] = 1&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
We need to retrieve a BarChart to display per day tweet activity. &lt;br /&gt;
  &lt;br /&gt;
 GoogleChart::BarChart.new('300x200', screen_name, :vertical, false) do |bc|&lt;br /&gt;
  bc.data &amp;quot;Sunday&amp;quot;, [dayhash[&amp;quot;Sun&amp;quot;]], '00000f'&lt;br /&gt;
  bc.data &amp;quot;Monday&amp;quot;, [dayhash[&amp;quot;Mon&amp;quot;]], '0000ff'&lt;br /&gt;
  bc.data &amp;quot;Tuesday&amp;quot;, [dayhash[&amp;quot;Tue&amp;quot;]], '00ff00'&lt;br /&gt;
  bc.data &amp;quot;Wednesday&amp;quot;, [dayhash[&amp;quot;Wed&amp;quot;]], '00ffff'&lt;br /&gt;
  bc.data &amp;quot;Thursday&amp;quot;, [dayhash[&amp;quot;Thu&amp;quot;]], 'ff0000'&lt;br /&gt;
  bc.data &amp;quot;Friday&amp;quot;, [dayhash[&amp;quot;Fri&amp;quot;]], 'ff00ff'&lt;br /&gt;
  bc.data &amp;quot;Saturday&amp;quot;, [dayhash[&amp;quot;Sat&amp;quot;]], 'ffff00'&lt;br /&gt;
  puts bc.to_url&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:img2333.jpg]]&lt;br /&gt;
&lt;br /&gt;
Running the above mining script provides the result of the execution of the tweet-days script in the above Listing for the developerWorks account. As shown, Wednesday tends to be the most active tweet day, with Saturday and Sunday the least active.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
# Rudi Cilibrasi(2008,Oct 4)''CompLearn: A compression-based data-mining toolkit.'' Retrieved from http://www.ruby-doc.org/gems/docs/c/complearn-0.6.2/doc/readme_txt.html &lt;br /&gt;
&lt;br /&gt;
# Seamus Abshere and Andy Rossmeissl (2012, May 14) Real time example of Data Mining Rails Example.[http://impact.brighterplanet.com/] Retrieved from http://www.rubydoc.info/gems/data_miner-ruby19/frames&lt;br /&gt;
&lt;br /&gt;
==Terminology==&lt;/div&gt;</summary>
		<author><name>Knjhaver</name></author>
	</entry>
</feed>