<?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=Arcox2</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=Arcox2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Arcox2"/>
	<updated>2026-06-04T03:24:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106389</id>
		<title>CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106389"/>
		<updated>2016-12-03T04:55:06Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1 (Update review report view in Instructor's view)====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:review-report-changed.png]]&lt;br /&gt;
&lt;br /&gt;
Implementation:&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. In this view, we populate table by iterating over each question under each round. While same approach was used previously but here we replace each row by a predefined format used for rendering question similar to student view.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below, here in each row we invoke view_completed_question method defined in Criterion.rb for scored questions which insert the html code to render question,score,comments.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot; ,:class =&amp;gt; &amp;quot;table table-bordered&amp;quot;}&lt;br /&gt;
        - counter = 0&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          - counter += 1&lt;br /&gt;
          - row_class = counter.even? ? &amp;quot;info&amp;quot; : &amp;quot;warning&amp;quot;&lt;br /&gt;
          - question = Question.find(s.question_id)&lt;br /&gt;
          %tr{:class =&amp;gt; row_class}&lt;br /&gt;
            %td&lt;br /&gt;
              = question.becomes(Criterion).view_completed_question(counter,s,instance_variable_get('@max_score_round_' + round.to_s))&lt;br /&gt;
        %tr&lt;br /&gt;
          %td{:style =&amp;gt; &amp;quot;font-weight:bold&amp;quot;}&lt;br /&gt;
            = 'Reviewer Score (Σ weighted score/Σ weighted available score) = '+ instance_variable_get('@sum_round_' + round.to_s).to_s |&lt;br /&gt;
            \/ #{instance_variable_get('@total_possible_round_' + round.to_s)} (#{instance_variable_get('@total_percentage_round_' + round.to_s)}%)&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-2====&lt;br /&gt;
* Add button/link to hide and expand all the reviews.&lt;br /&gt;
&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:show-hide.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-3====&lt;br /&gt;
* Create a tabbed view for each review view type : Statistic, Reviews and Alternate Views tabs.&lt;br /&gt;
&lt;br /&gt;
Initially I weighed using TabsOnRails or Tabulous gems to create the tabs for this project but after doing some research these gems did not allow me to create tabs dynamically so Jquery UI was used to create the tabs. This was a plus since we did not need to install a new gem to the project. The review report will need to be modified to have the addition of the Statistic, Reviews and Alternate Views tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabStats.png]]&lt;br /&gt;
&lt;br /&gt;
And the Reviews tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabReviews.png]]&lt;br /&gt;
&lt;br /&gt;
The Alternate View tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabAlt.png]]&lt;br /&gt;
&lt;br /&gt;
=====Task 3 Implementation=====&lt;br /&gt;
&lt;br /&gt;
To create the tabs on the view_my_scores view we used the following Jquery code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;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&amp;gt;&amp;lt;a href=&amp;quot;#tabs-1&amp;quot;&amp;gt;Stats&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-2&amp;quot;&amp;gt;Reviews&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-3&amp;quot;&amp;gt;Alternate View&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-1&amp;quot;&amp;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_charts', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&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',&lt;br /&gt;
                                                               :team =&amp;gt; false,&lt;br /&gt;
                                                               :participant_id =&amp;gt; ptid = @participant.id,&lt;br /&gt;
                                                               :index =&amp;gt; 0,&lt;br /&gt;
                                                               :team_size =&amp;gt; 1,&lt;br /&gt;
                                                               :pscore =&amp;gt; @pscore} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
    &amp;lt;% case @assignment.reputation_algorithm %&amp;gt;&lt;br /&gt;
    &amp;lt;% when 'Hamer' %&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;Reputation&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p id = &amp;quot;reputation_score&amp;quot; class = &amp;lt;%= get_css_style_for_hamer_reputation(@participant.Hamer)%&amp;gt; style = &amp;quot;width:60px;&amp;quot;&amp;gt;&amp;lt;%= @participant.Hamer %&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;% when 'Lauw' %&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;Reputation&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p id = &amp;quot;reputation_score&amp;quot; class = &amp;lt;%= get_css_style_for_lauw_reputation(@participant.Lauw)%&amp;gt; style = &amp;quot;width:60px;&amp;quot;&amp;gt;&amp;lt;%= @participant.Lauw %&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;tabs-2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;TABLE&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; @pscore[: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;/TABLE&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;tabs-3&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;%= render &amp;quot;view_team&amp;quot;, :id =&amp;gt; params[:id] %&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    $(function() {&lt;br /&gt;
        $( &amp;quot;#tabs&amp;quot; ).tabs();&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Stats tab was easy since we just took what was already in that view and moved it to only be displayed under the first tab. &lt;br /&gt;
&lt;br /&gt;
The Review tab was created by pulling up the rendering of the review partial out of the participant partial. This just needed to point the local variables to variables that were in this View. &lt;br /&gt;
&lt;br /&gt;
The Alternate View tab was a bit tricky since it was it's on view (view_team). So what was done was creating a partial named _view_team and moving all of the code that was in that view the partial and rendering the partial in the view_team view. This allowed us to access this view from the view_team and view_my_score views simultaneously while using the same code base.&lt;br /&gt;
&lt;br /&gt;
We were going to add the sub tabs for the Reviewers but after implementing the &amp;quot;show all reviews&amp;quot; buttons those tabs became tricky and the page got really cluttered. So we decided that we could just keep the existing scores Review layout with the changes of toggling whether to hide or show the reviews.   &lt;br /&gt;
&lt;br /&gt;
=====Task 3 Testing=====&lt;br /&gt;
&lt;br /&gt;
To test this feature go to the view_my_scores page for the student where you should see the 3 tabs. &lt;br /&gt;
Make sure that each tab gives you a similar view as described above. &lt;br /&gt;
&lt;br /&gt;
====Task-4====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
&lt;br /&gt;
This task is fairly easy we are supposed to make feedback response more readable or more focused for user to read. As instructor suggested this can be done by graying out the question or we can change the background of the response text.&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Optionally)====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
This functionality will help user to readily access the required content within the reviews.&amp;lt;br /&amp;gt;&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:SearchFunctionality.png]]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
** Click on any item in team reviewed tab, to see reviews.&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:TabAlt.png&amp;diff=106386</id>
		<title>File:TabAlt.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:TabAlt.png&amp;diff=106386"/>
		<updated>2016-12-03T04:47:11Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:TabReviews.png&amp;diff=106384</id>
		<title>File:TabReviews.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:TabReviews.png&amp;diff=106384"/>
		<updated>2016-12-03T04:46:50Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:TabStats.png&amp;diff=106383</id>
		<title>File:TabStats.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:TabStats.png&amp;diff=106383"/>
		<updated>2016-12-03T04:45:55Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106381</id>
		<title>CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106381"/>
		<updated>2016-12-03T04:45:18Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1 (Update review report view in Instructor's view)====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:review-report-changed.png]]&lt;br /&gt;
&lt;br /&gt;
Implementation:&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. In this view, we populate table by iterating over each question under each round. While same approach was used previously but here we replace each row by a predefined format used for rendering question similar to student view.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below, here in each row we invoke view_completed_question method defined in Criterion.rb for scored questions which insert the html code to render question,score,comments.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot; ,:class =&amp;gt; &amp;quot;table table-bordered&amp;quot;}&lt;br /&gt;
        - counter = 0&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          - counter += 1&lt;br /&gt;
          - row_class = counter.even? ? &amp;quot;info&amp;quot; : &amp;quot;warning&amp;quot;&lt;br /&gt;
          - question = Question.find(s.question_id)&lt;br /&gt;
          %tr{:class =&amp;gt; row_class}&lt;br /&gt;
            %td&lt;br /&gt;
              = question.becomes(Criterion).view_completed_question(counter,s,instance_variable_get('@max_score_round_' + round.to_s))&lt;br /&gt;
        %tr&lt;br /&gt;
          %td{:style =&amp;gt; &amp;quot;font-weight:bold&amp;quot;}&lt;br /&gt;
            = 'Reviewer Score (Σ weighted score/Σ weighted available score) = '+ instance_variable_get('@sum_round_' + round.to_s).to_s |&lt;br /&gt;
            \/ #{instance_variable_get('@total_possible_round_' + round.to_s)} (#{instance_variable_get('@total_percentage_round_' + round.to_s)}%)&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-2====&lt;br /&gt;
* Add button/link to hide and expand all the reviews.&lt;br /&gt;
&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:show-hide.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-3====&lt;br /&gt;
* Create a tabbed view for each review view type : Heat map, Overall statistics, Individual reviews&lt;br /&gt;
&lt;br /&gt;
Initially I weighed using TabsOnRails or Tabulous gems to create the tabs for this project but after doing some research these gems did not allow me to create tabs dynamically so Jquery UI was used to create the tabs. This was a plus since we did not need to install a new gem to the project. The review report will need to be modified to have the addition of the Statistics, Heatmap, and GridView tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabStats.png]]&lt;br /&gt;
&lt;br /&gt;
And the grid view tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabReviews.png]]&lt;br /&gt;
&lt;br /&gt;
The heatmap tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabAlt.png]]&lt;br /&gt;
&lt;br /&gt;
=====Task 3 Implementation=====&lt;br /&gt;
&lt;br /&gt;
To create the tabs on the view_my_scores view we used the following Jquery code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;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&amp;gt;&amp;lt;a href=&amp;quot;#tabs-1&amp;quot;&amp;gt;Stats&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-2&amp;quot;&amp;gt;Reviews&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-3&amp;quot;&amp;gt;Alternate View&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-1&amp;quot;&amp;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_charts', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&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',&lt;br /&gt;
                                                               :team =&amp;gt; false,&lt;br /&gt;
                                                               :participant_id =&amp;gt; ptid = @participant.id,&lt;br /&gt;
                                                               :index =&amp;gt; 0,&lt;br /&gt;
                                                               :team_size =&amp;gt; 1,&lt;br /&gt;
                                                               :pscore =&amp;gt; @pscore} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
    &amp;lt;% case @assignment.reputation_algorithm %&amp;gt;&lt;br /&gt;
    &amp;lt;% when 'Hamer' %&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;Reputation&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p id = &amp;quot;reputation_score&amp;quot; class = &amp;lt;%= get_css_style_for_hamer_reputation(@participant.Hamer)%&amp;gt; style = &amp;quot;width:60px;&amp;quot;&amp;gt;&amp;lt;%= @participant.Hamer %&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;% when 'Lauw' %&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;Reputation&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p id = &amp;quot;reputation_score&amp;quot; class = &amp;lt;%= get_css_style_for_lauw_reputation(@participant.Lauw)%&amp;gt; style = &amp;quot;width:60px;&amp;quot;&amp;gt;&amp;lt;%= @participant.Lauw %&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;tabs-2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;TABLE&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; @pscore[: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;/TABLE&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;tabs-3&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;%= render &amp;quot;view_team&amp;quot;, :id =&amp;gt; params[:id] %&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    $(function() {&lt;br /&gt;
        $( &amp;quot;#tabs&amp;quot; ).tabs();&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Stats tab was easy since we just took what was already in that view and moved it to only be displayed under the first tab. &lt;br /&gt;
&lt;br /&gt;
The Review tab was created by pulling up the rendering of the review partial out of the participant partial. This just needed to point the local variables to variables that were in this View. &lt;br /&gt;
&lt;br /&gt;
The Alternate View tab was a bit tricky since it was it's on view (view_team). So what was done was creating a partial named _view_team and moving all of the code that was in that view the partial and rendering the partial in the view_team view. This allowed us to access this view from the view_team and view_my_score views simultaneously while using the same code base.&lt;br /&gt;
&lt;br /&gt;
We were going to add the sub tabs for the Reviewers but after implementing the &amp;quot;show all reviews&amp;quot; buttons those tabs became tricky and the page got really cluttered. So we decided that we could just keep the existing scores Review layout with the changes of toggling whether to hide or show the reviews.   &lt;br /&gt;
&lt;br /&gt;
=====Task 3 Testing=====&lt;br /&gt;
&lt;br /&gt;
To test this feature go to the view_my_scores page for the student where you should see the 3 tabs. &lt;br /&gt;
Make sure that each tab gives you a similar view as described above. &lt;br /&gt;
&lt;br /&gt;
====Task-4====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
&lt;br /&gt;
This task is fairly easy we are supposed to make feedback response more readable or more focused for user to read. As instructor suggested this can be done by graying out the question or we can change the background of the response text.&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Optionally)====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
This functionality will help user to readily access the required content within the reviews.&amp;lt;br /&amp;gt;&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:SearchFunctionality.png]]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
** Click on any item in team reviewed tab, to see reviews.&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106374</id>
		<title>CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106374"/>
		<updated>2016-12-03T04:20:35Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1 (Update review report view in Instructor's view)====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:review-report-changed.png]]&lt;br /&gt;
&lt;br /&gt;
Implementation:&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. In this view, we populate table by iterating over each question under each round. While same approach was used previously but here we replace each row by a predefined format used for rendering question similar to student view.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below, here in each row we invoke view_completed_question method defined in Criterion.rb for scored questions which insert the html code to render question,score,comments.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot; ,:class =&amp;gt; &amp;quot;table table-bordered&amp;quot;}&lt;br /&gt;
        - counter = 0&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          - counter += 1&lt;br /&gt;
          - row_class = counter.even? ? &amp;quot;info&amp;quot; : &amp;quot;warning&amp;quot;&lt;br /&gt;
          - question = Question.find(s.question_id)&lt;br /&gt;
          %tr{:class =&amp;gt; row_class}&lt;br /&gt;
            %td&lt;br /&gt;
              = question.becomes(Criterion).view_completed_question(counter,s,instance_variable_get('@max_score_round_' + round.to_s))&lt;br /&gt;
        %tr&lt;br /&gt;
          %td{:style =&amp;gt; &amp;quot;font-weight:bold&amp;quot;}&lt;br /&gt;
            = 'Reviewer Score (Σ weighted score/Σ weighted available score) = '+ instance_variable_get('@sum_round_' + round.to_s).to_s |&lt;br /&gt;
            \/ #{instance_variable_get('@total_possible_round_' + round.to_s)} (#{instance_variable_get('@total_percentage_round_' + round.to_s)}%)&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-2====&lt;br /&gt;
* Add button/link to hide and expand all the reviews.&lt;br /&gt;
&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:show-hide.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-3====&lt;br /&gt;
* Create a tabbed view for each review view type : Heat map, Overall statistics, Individual reviews&lt;br /&gt;
&lt;br /&gt;
This task will require the use of TabsOnRails to create the tabs needed. The review report will need to be modified to have the addition of the Statistics, Heatmap, and GridView tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:Overview20.png]]&lt;br /&gt;
&lt;br /&gt;
The heatmap tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:heatmap.png]]&lt;br /&gt;
&lt;br /&gt;
And the grid view tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:gridview2.png]]&lt;br /&gt;
&lt;br /&gt;
Note: for this view we can move the [Max points: 5] to the statistics page since this will be the same for every question. We can also add &amp;quot;view score&amp;quot;, view question&amp;quot; and &amp;quot;view comments&amp;quot; in place of the show review link to see what we want to see per question. This will be modified in the response model. &lt;br /&gt;
&lt;br /&gt;
To handle being able to switch between reviews you could add sub tabs underneath the main 3 tabs for each of the reviewers (The student would see a tab with the reviewers number while the instructor will see tabs with the reviewers name). &lt;br /&gt;
&lt;br /&gt;
=====Task 3 Testing=====&lt;br /&gt;
&lt;br /&gt;
To test this feature go to the view_my_scores page for the student where you should see the 3 tabs. &lt;br /&gt;
Make sure that each tab gives you a similar view as described above. &lt;br /&gt;
&lt;br /&gt;
====Task-4====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
&lt;br /&gt;
This task is fairly easy we are supposed to make feedback response more readable or more focused for user to read. As instructor suggested this can be done by graying out the question or we can change the background of the response text.&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Optionally)====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
This functionality will help user to readily access the required content within the reviews.&amp;lt;br /&amp;gt;&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:SearchFunctionality.png]]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
** Click on any item in team reviewed tab, to see reviews.&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106359</id>
		<title>CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106359"/>
		<updated>2016-12-03T03:18:28Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:review-report-changed.png]]&lt;br /&gt;
&lt;br /&gt;
Implementation:&lt;br /&gt;
&lt;br /&gt;
====Task-2====&lt;br /&gt;
* Add button/link to hide and expand all the reviews.&lt;br /&gt;
&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:show-hide.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-3====&lt;br /&gt;
* Create a tabbed view for each review view type : Heat map, Overall statistics, Individual reviews&lt;br /&gt;
&lt;br /&gt;
This task will require the use of TabsOnRails to create the tabs needed. The review report will need to be modified to have the addition of the Statistics, Heatmap, and GridView tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:Overview20.png]]&lt;br /&gt;
&lt;br /&gt;
The heatmap tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:heatmap.png]]&lt;br /&gt;
&lt;br /&gt;
And the grid view tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:gridview2.png]]&lt;br /&gt;
&lt;br /&gt;
Note: for this view we can move the [Max points: 5] to the statistics page since this will be the same for every question. We can also add &amp;quot;view score&amp;quot;, view question&amp;quot; and &amp;quot;view comments&amp;quot; in place of the show review link to see what we want to see per question. This will be modified in the response model. &lt;br /&gt;
&lt;br /&gt;
To handle being able to switch between reviews you could add sub tabs underneath the main 3 tabs for each of the reviewers (The student would see a tab with the reviewers number while the instructor will see tabs with the reviewers name). &lt;br /&gt;
&lt;br /&gt;
=====Task 3 Testing=====&lt;br /&gt;
&lt;br /&gt;
To test this feature go to the view_my_scores page for the student where you should see the 3 tabs. &lt;br /&gt;
Make sure that each tab gives you a similar view as described above. &lt;br /&gt;
&lt;br /&gt;
To test the tabs for each reviewer's review: &lt;br /&gt;
Make sure that you only see that reviewer's review when their tab is selected. &lt;br /&gt;
Make sure that when you select another reviewer's tab that the review you are seeing changes. &lt;br /&gt;
Make sure reviewers tabs only appears when the Individual reviewers tab is selected. &lt;br /&gt;
====Task-4====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
&lt;br /&gt;
This task is fairly easy we are supposed to make feedback response more readable or more focused for user to read. As instructor suggested this can be done by graying out the question or we can change the background of the response text.&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Optionally)====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
This functionality will help user to readily access the required content within the reviews.&amp;lt;br /&amp;gt;&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:SearchFunctionality.png]]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
** Click on any item in team reviewed tab, to see reviews.&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=105817</id>
		<title>CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=105817"/>
		<updated>2016-11-15T01:51:02Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the summary report and review report both follow different UI and have different code. To make the UI consistent we have decided to choose the UI design of review report as base and modify the UI design for summary report. This will allow us to use the same code for both reports thereby following DRY principle.&lt;br /&gt;
[[File:summary.png]] [[File:review-report.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-2====&lt;br /&gt;
* Add button/link to hide and expand all the reviews.&lt;br /&gt;
&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:show-hide.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-3====&lt;br /&gt;
* Create a tabbed view for each review view type : Heat map, Overall statistics, Individual reviews&lt;br /&gt;
&lt;br /&gt;
This task will require the use of TabsOnRails to create the tabs needed. The review report will need to be modified to have the addition of the Statistics, Heatmap, and GridView tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:Overview20.png]]&lt;br /&gt;
&lt;br /&gt;
The heatmap tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:heatmap.png]]&lt;br /&gt;
&lt;br /&gt;
And the grid view tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:gridview2.png]]&lt;br /&gt;
&lt;br /&gt;
Note: for this view we can move the [Max points: 5] to the statistics page since this will be the same for every question. We can also add &amp;quot;view score&amp;quot;, view question&amp;quot; and &amp;quot;view comments&amp;quot; in place of the show review link to see what we want to see per question. This will be modified in the response model. &lt;br /&gt;
&lt;br /&gt;
To handle being able to switch between reviews you could add sub tabs underneath the main 3 tabs for each of the reviewers (The student would see a tab with the reviewers number while the instructor will see tabs with the reviewers name). &lt;br /&gt;
&lt;br /&gt;
=====Test=====&lt;br /&gt;
&lt;br /&gt;
To test this feature go to the view_my_scores page for the student where you should see the 3 tabs. &lt;br /&gt;
Make sure that each tab gives you a similar view as described above. &lt;br /&gt;
&lt;br /&gt;
To test the tabs for each reviewer's review: &lt;br /&gt;
Make sure that you only see that reviewer's review when their tab is selected. &lt;br /&gt;
Make sure that when you select another reviewer's tab that the review you are seeing changes. &lt;br /&gt;
Make sure reviewers tabs only appears when the Individual reviewers tab is selected. &lt;br /&gt;
====Task-4====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
&lt;br /&gt;
This task is fairly easy we are supposed to make feedback response more readable or more focused for user to read. As instructor suggested this can be done by graying out the question or we can change the background of the response text.&lt;br /&gt;
&lt;br /&gt;
====Task-5====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
This functionality will help user to readily access the required content within the reviews.&amp;lt;br /&amp;gt;&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:SearchFunctionality.png]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview2.png&amp;diff=105794</id>
		<title>File:Gridview2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview2.png&amp;diff=105794"/>
		<updated>2016-11-15T01:18:22Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: updated grid view&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;updated grid view&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=105790</id>
		<title>CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=105790"/>
		<updated>2016-11-15T01:17:09Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the summary report and review report both follow different UI and have different code. To make the UI consistent we have decided to choose the UI design of review report as base and modify the UI design for summary report. This will allow us to use the same code for both reports thereby following DRY principle.&lt;br /&gt;
[[File:summary.png]] [[File:review-report.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-2====&lt;br /&gt;
* Add button/link to hide and expand all the reviews.&lt;br /&gt;
&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:show-hide.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-3====&lt;br /&gt;
* Create a tabbed view for each review view type : Heat map, Overall statistics, Individual reviews&lt;br /&gt;
&lt;br /&gt;
This task will require the use of TabsOnRails to create the tabs needed. The review report will need to be modified to have the addition of the Statistics, Heatmap, and GridView tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:Overview20.png]]&lt;br /&gt;
&lt;br /&gt;
The heatmap tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:heatmap.png]]&lt;br /&gt;
&lt;br /&gt;
And the grid view tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:gridview2.png]]&lt;br /&gt;
&lt;br /&gt;
To handle being able to switch between reviews you could add sub tabs underneath the main 3 tabs for each of the reviewers (The student would see a tab with the reviewers number while the instructor will see tabs with the reviewers name). &lt;br /&gt;
&lt;br /&gt;
====Task-4====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
&lt;br /&gt;
This task is fairly easy we are supposed to make feedback response more readable or more focused for user to read. As instructor suggested this can be done by graying out the question or we can change the background of the response text.&lt;br /&gt;
&lt;br /&gt;
====Task-5====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
This functionality will help user to readily access the required content within the reviews.&amp;lt;br /&amp;gt;&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:SearchFunctionality.png]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105789</id>
		<title>File:Gridview.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105789"/>
		<updated>2016-11-15T01:15:42Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: uploaded a new version of &amp;amp;quot;File:Gridview.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105784</id>
		<title>File:Gridview.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105784"/>
		<updated>2016-11-15T01:13:58Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: uploaded a new version of &amp;amp;quot;File:Gridview.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105781</id>
		<title>File:Gridview.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105781"/>
		<updated>2016-11-15T01:11:53Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: uploaded a new version of &amp;amp;quot;File:Gridview.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105254</id>
		<title>File:Gridview.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Gridview.png&amp;diff=105254"/>
		<updated>2016-11-10T03:12:34Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Heatmap.png&amp;diff=105252</id>
		<title>File:Heatmap.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Heatmap.png&amp;diff=105252"/>
		<updated>2016-11-10T03:12:15Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: uploaded a new version of &amp;amp;quot;File:Heatmap.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Overview20.png&amp;diff=105250</id>
		<title>File:Overview20.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Overview20.png&amp;diff=105250"/>
		<updated>2016-11-10T03:11:34Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: uploaded a new version of &amp;amp;quot;File:Overview20.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Heatmap.png&amp;diff=105243</id>
		<title>File:Heatmap.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Heatmap.png&amp;diff=105243"/>
		<updated>2016-11-10T03:07:20Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Overview20.png&amp;diff=105237</id>
		<title>File:Overview20.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Overview20.png&amp;diff=105237"/>
		<updated>2016-11-10T03:03:48Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=105235</id>
		<title>CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=105235"/>
		<updated>2016-11-10T03:03:01Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the summary report and review report both follow different UI and have different code. To make the UI consistent we have decided to choose the UI design of review report as base and modify the UI design for summary report. This will allow us to use the same code for both reports thereby following DRY principle.&lt;br /&gt;
[[File:summary.png]] [[File:review-report.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-2====&lt;br /&gt;
* Add button/link to hide and expand all the reviews.&lt;br /&gt;
&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:show-hide.png]]&lt;br /&gt;
&lt;br /&gt;
====Task-3====&lt;br /&gt;
* Create a tabbed view for each review view type : Heat map, Overall statistics, Individual reviews&lt;br /&gt;
&lt;br /&gt;
This task will require the use of TabsOnRails to create the tabs needed. The review report will need to be modified to have the addition of the Statistics, Heatmap, and GridView tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:Overview20.png]]&lt;br /&gt;
&lt;br /&gt;
The heatmap tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:heatmap.png]]&lt;br /&gt;
&lt;br /&gt;
And the grid view tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:gridview.png]]&lt;br /&gt;
&lt;br /&gt;
To handle being able to switch between reviews you could add sub tabs underneath the main 3 tabs for each of the reviewers (The student would see a tab with the reviewers number while the instructor will see tabs with the reviewers name). &lt;br /&gt;
&lt;br /&gt;
====Task-4====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
&lt;br /&gt;
This task is fairly easy we are supposed to make feedback response more readable or more focused for user to read. As instructor suggested this can be done by graying out the question or we can change the background of the response text.&lt;br /&gt;
&lt;br /&gt;
====Task-5====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=104598</id>
		<title>CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=104598"/>
		<updated>2016-11-05T02:32:25Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page give a description of the changes made for the leaderboard.rb of Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
==Expertiza Background ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, codes, websites, etc). Instructors add and edit assignments to Expertiza. Students can be assigned in teams based on their selection of the topics. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
Currently in this web application the leaderboard page does not work. As the guide of the director, we need to do the refactor and test only in this project, and the next step is to make the page work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The task of the project is to refactor leaderboard.rb and write unit tests for it. As the name of the methods are not in a standard style, we use snake_case for method names. There are also some useless assignments to several variables. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* Refactor the leaderboard.rb&lt;br /&gt;
* Create a RSpec file in /spec/models/ foler which contains unit test for leaderboard.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Thoughts ==&lt;br /&gt;
What we need to do is to deal with problems listed by the code climate. And we also need to write a new test file to test the functionality of leaderboard.rb. However, the leaderboard itself has some problems and IDE will report some problems when we want to run it. So we need to know which method in this file is broken first and just test others instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools==&lt;br /&gt;
As for this project, we use the code climate plugin to test if our code is good enough. This plugin will obviously help us with the refactor part because it can show which part of the original codes have some problems. We also search through the internet and get to know how to write the Rspec files. We also ended up using the 'rspec/collection_matchers' class of rspec which allows us to match the number of items in a collection for an object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactor ==&lt;br /&gt;
We will list each kind of problems we solved below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use snake_case for method names. ===&lt;br /&gt;
As we all know the snake_case means we need to name the methods and variables in which elements are separated with one underscore character and no spaces. Each element's initial letter is usually lowercased within the compound and the first letter is either upper or lower case.&lt;br /&gt;
For example, we changed this method.&lt;br /&gt;
&lt;br /&gt;
  def self.getIndependantAssignments(user_id)&lt;br /&gt;
    assignmentIds = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
Both variable names and method names are not in a good manner. We changed it to the version below.&lt;br /&gt;
&lt;br /&gt;
  def self.get_independant_assignments(user_id)&lt;br /&gt;
    assignment_ids = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Useless assignment to variable.===&lt;br /&gt;
We deleted those variables since we only wanted what was being assigned to them. &lt;br /&gt;
&lt;br /&gt;
Before: &lt;br /&gt;
&lt;br /&gt;
  noCourseAssignments = Assignment.where(id: assignmentIds, course_id: nil)&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
  Assignment.where(id: assignmentIds, course_id: nil)&lt;br /&gt;
&lt;br /&gt;
=== Prefer `each` over `for`. ===&lt;br /&gt;
We know that 'each' function is more in ruby style for loops. So we would like to change all our 'for' to 'each'.&lt;br /&gt;
  for scoreEntry in scores&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
We changed this loop to:&lt;br /&gt;
  scores.each do |scoreEntry|&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
And the problem would be fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Avoid more than 3 levels of block nesting.===&lt;br /&gt;
  if qTypeHash.fetch(questionnaireType, {}).fetch(courseId, nil).nil?&lt;br /&gt;
     if qTypeHash.fetch(questionnaireType, nil).nil?&lt;br /&gt;
        ...&lt;br /&gt;
     end&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
This is the third and fourth level of the block nesting. We need to merge them together.&lt;br /&gt;
&lt;br /&gt;
  if q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  elseif  q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; !q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
Then the 4-levels loop has been changed to 3-levels one.&lt;br /&gt;
&lt;br /&gt;
=== `end` at 148, 1 is not aligned with `def` at 129, 2.''' ===&lt;br /&gt;
A space is needed to be added in the line of 148.&lt;br /&gt;
&lt;br /&gt;
== Rspec Test ==&lt;br /&gt;
The Leaderboard Class did not have any unit tests associated with it coming into this project so we have to create unit tests from scratch. Upon analysis of this class, we noticed that Leaderboard did not hold any variables and was only made up of static methods. So the first round of unit tests that were created made sure that each method could be called from the Leaderboard class with the correct number of arguments. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;Leaderboard responds to get_assignment_mapping&amp;quot; do&lt;br /&gt;
    expect(Leaderboard).to respond_to(:get_assignment_mapping).with(3).argument&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Next we needed to go through the methods and create tests for them. But in order to do this we had to make objects that this class depended on since this class takes the values from other classes to output arrays and hashes. Factories were used to create these objects with a few variables being overridden &lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    @student1 = create(:student, name: &amp;quot;Student1&amp;quot;, fullname: &amp;quot;Student1 Test&amp;quot;, email: &amp;quot;student1@mail.com&amp;quot; )&lt;br /&gt;
    @student2 = create(:student, name: &amp;quot;Student2&amp;quot;, fullname: &amp;quot;Student2 Test&amp;quot;, email: &amp;quot;student2@mail.com&amp;quot; )&lt;br /&gt;
    @instructor = create(:instructor)&lt;br /&gt;
    @course = create(:course)&lt;br /&gt;
    @assignment = create(:assignment, name: &amp;quot;Assign1&amp;quot;, course: nil)&lt;br /&gt;
    @assignment2 = create(:assignment, name: &amp;quot;Assign2&amp;quot;)&lt;br /&gt;
    @participant = create(:participant, parent_id: @assignment.id, user_id: @student1.id)&lt;br /&gt;
    @participant2 = create(:participant, parent_id: @assignment2.id, user_id: @student2.id)&lt;br /&gt;
    @questionnaire=create(:questionnaire)&lt;br /&gt;
    @assignment_questionnaire1 =create(:assignment_questionnaire, user_id: @student1.id, assignment: @assignment)&lt;br /&gt;
    @assignment_questionnaire2 =create(:assignment_questionnaire, user_id: @student2.id, assignment: @assignment2)&lt;br /&gt;
    @assignment_team = create(:assignment_team, name: &amp;quot;TestTeam&amp;quot;, parent_id: @assignment2.id)&lt;br /&gt;
    @team_user = create(:team_user, team_id: @assignment_team.id, user_id: @student2.id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We tested the methods by seeing whether if we got the right amount of elements in our arrays/hashes like the following. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;getAssignmentsInCourses should return an assignment&amp;quot; do&lt;br /&gt;
    expect(Leaderboard.get_assignments_in_courses(1)).to have(1).items&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We also tested whether the code could handle invalid arguments like such. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;leaderboard_heading should return No Entry with invalid input&amp;quot; do    &lt;br /&gt;
    expect(Leaderboard.leaderboard_heading(&amp;quot;Invalid&amp;quot;)).to eq(&amp;quot;No Entry&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We did face situations where methods were being called that were not defined anywhere so we had to use stubs to imitate their expected behavior. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;leaderboard_heading should return name&amp;quot; do&lt;br /&gt;
    allow(Leaderboard).to receive(:find_by_qtype).and_return(@questionnaire).with(@questionnaire.id)&lt;br /&gt;
    expect(Leaderboard.leaderboard_heading(@questionnaire.id)).to eq(&amp;quot;Test questionaire&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Additional ==&lt;br /&gt;
To explain our work in a further step, we did a video on Youtube to show the broken leaderboard page, why we did work in this way and our work for the unit tests and the refactor part.&lt;br /&gt;
&lt;br /&gt;
There are still some problems we need to figure out.  &lt;br /&gt;
For the code revising part, there are some methods with this problem: Assignment Branch Condition size for get_participants_score is too high.&lt;br /&gt;
&lt;br /&gt;
I think we cannot make too many functions in one method so that we need to make some of these be executed outside of this method.&lt;br /&gt;
Also, some of the code lines are too long so that it is not clear enough.&lt;br /&gt;
&lt;br /&gt;
During the rspec testing we noticed that the methods get_participant_entries_in_assignment_list and find_by_qtype were being called but where not created in the program. To cover these tests we had to use stubs for these methods for the expected outputs. &lt;br /&gt;
&lt;br /&gt;
There was also no declaration of ScoreCache anywhere in the program which caused other methods to fail. Trying to stub this was a problem since we were not sure of how it was laid out. &lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
1. https://en.wikipedia.org/wiki/Snake_case&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=104597</id>
		<title>CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=104597"/>
		<updated>2016-11-05T02:31:03Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page give a description of the changes made for the leaderboard.rb of Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
==Expertiza Background ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, codes, websites, etc). Instructors add and edit assignments to Expertiza. Students can be assigned in teams based on their selection of the topics. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
Currently in this web application the leaderboard page does not work. As the guide of the director, we need to do the refactor and test only in this project, and the next step is to make the page work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The task of the project is to refactor leaderboard.rb and write unit tests for it. As the name of the methods are not in a standard style, we use snake_case for method names. There are also some useless assignments to several variables. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* Refactor the leaderboard.rb&lt;br /&gt;
* Create a RSpec file in /spec/models/ foler which contains unit test for leaderboard.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Thoughts ==&lt;br /&gt;
What we need to do is to deal with problems listed by the code climate. And we also need to write a new test file to test the functionality of leaderboard.rb. However, the leaderboard itself has some problems and IDE will report some problems when we want to run it. So we need to know which method in this file is broken first and just test others instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools==&lt;br /&gt;
As for this project, we use the code climate plugin to test if our code is good enough. This plugin will obviously help us with the refactor part because it can show which part of the original codes have some problems. We also search through the internet and get to know how to write the Rspec files. We also ended up using the 'rspec/collection_matchers' class of rspec which allows us to match the number of items in a collection for an object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactor ==&lt;br /&gt;
We will list each kind of problems we solved below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use snake_case for method names. ===&lt;br /&gt;
As we all know the snake_case means we need to name the methods and variables in which elements are separated with one underscore character and no spaces. Each element's initial letter is usually lowercased within the compound and the first letter is either upper or lower case.&lt;br /&gt;
For example, we changed this method.&lt;br /&gt;
&lt;br /&gt;
  def self.getIndependantAssignments(user_id)&lt;br /&gt;
    assignmentIds = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
Both variable names and method names are not in a good manner. We changed it to the version below.&lt;br /&gt;
&lt;br /&gt;
  def self.get_independant_assignments(user_id)&lt;br /&gt;
    assignment_ids = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Useless assignment to variable.===&lt;br /&gt;
We deleted those variables since we only wanted what was being assigned to them. &lt;br /&gt;
&lt;br /&gt;
Before: &lt;br /&gt;
&lt;br /&gt;
  noCourseAssignments = Assignment.where(id: assignmentIds, course_id: nil)&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
  Assignment.where(id: assignmentIds, course_id: nil)&lt;br /&gt;
&lt;br /&gt;
=== Prefer `each` over `for`. ===&lt;br /&gt;
We know that 'each' function is more in ruby style for loops. So we would like to change all our 'for' to 'each'.&lt;br /&gt;
  for scoreEntry in scores&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
We changed this loop to:&lt;br /&gt;
  scores.each do |scoreEntry|&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
And the problem would be fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Avoid more than 3 levels of block nesting.===&lt;br /&gt;
  if qTypeHash.fetch(questionnaireType, {}).fetch(courseId, nil).nil?&lt;br /&gt;
     if qTypeHash.fetch(questionnaireType, nil).nil?&lt;br /&gt;
        ...&lt;br /&gt;
     end&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
This is the third and fourth level of the block nesting. We need to merge them together.&lt;br /&gt;
&lt;br /&gt;
  if q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  elseif  q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; !q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
Then the 4-levels loop has been changed to 3-levels one.&lt;br /&gt;
&lt;br /&gt;
=== `end` at 148, 1 is not aligned with `def` at 129, 2.''' ===&lt;br /&gt;
A space is needed to be added in the line of 148.&lt;br /&gt;
&lt;br /&gt;
== Rspec Test ==&lt;br /&gt;
The Leaderboard Class did not have any unit tests associated with it coming into this project so we have to create unit tests from scratch. Upon analysis of this class, we noticed that Leaderboard did not hold any variables and was only made up of static methods. So the first round of unit tests that were created made sure that each method could be called from the Leaderboard class with the correct number of arguments. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;Leaderboard responds to get_assignment_mapping&amp;quot; do&lt;br /&gt;
    expect(Leaderboard).to respond_to(:get_assignment_mapping).with(3).argument&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Next we needed to go through the methods and create tests for them. But in order to do this we had to make objects that this class depended on since this class takes the values from other classes to output arrays and hashes. Factories were used to create these objects with a few variables being overridden &lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    @student1 = create(:student, name: &amp;quot;Student1&amp;quot;, fullname: &amp;quot;Student1 Test&amp;quot;, email: &amp;quot;student1@mail.com&amp;quot; )&lt;br /&gt;
    @student2 = create(:student, name: &amp;quot;Student2&amp;quot;, fullname: &amp;quot;Student2 Test&amp;quot;, email: &amp;quot;student2@mail.com&amp;quot; )&lt;br /&gt;
    @instructor = create(:instructor)&lt;br /&gt;
    @course = create(:course)&lt;br /&gt;
    @assignment = create(:assignment, name: &amp;quot;Assign1&amp;quot;, course: nil)&lt;br /&gt;
    @assignment2 = create(:assignment, name: &amp;quot;Assign2&amp;quot;)&lt;br /&gt;
    @participant = create(:participant, parent_id: @assignment.id, user_id: @student1.id)&lt;br /&gt;
    @participant2 = create(:participant, parent_id: @assignment2.id, user_id: @student2.id)&lt;br /&gt;
    @questionnaire=create(:questionnaire)&lt;br /&gt;
    @assignment_questionnaire1 =create(:assignment_questionnaire, user_id: @student1.id, assignment: @assignment)&lt;br /&gt;
    @assignment_questionnaire2 =create(:assignment_questionnaire, user_id: @student2.id, assignment: @assignment2)&lt;br /&gt;
    @assignment_team = create(:assignment_team, name: &amp;quot;TestTeam&amp;quot;, parent_id: @assignment2.id)&lt;br /&gt;
    @team_user = create(:team_user, team_id: @assignment_team.id, user_id: @student2.id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We tested the methods by seeing whether if we got the right amount of elements in our arrays/hashes like the following. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;getAssignmentsInCourses should return an assignment&amp;quot; do&lt;br /&gt;
    expect(Leaderboard.get_assignments_in_courses(1)).to have(1).items&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We also tested whether the code could handle invalid arguments like such. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;leaderboard_heading should return No Entry with invalid input&amp;quot; do    &lt;br /&gt;
    expect(Leaderboard.leaderboard_heading(&amp;quot;Invalid&amp;quot;)).to eq(&amp;quot;No Entry&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We did face situations where methods were being called that were not defined anywhere so we had to use stubs to imitate their expected behavior. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;leaderboard_heading should return name&amp;quot; do&lt;br /&gt;
    allow(Leaderboard).to receive(:find_by_qtype).and_return(@questionnaire).with(@questionnaire.id)&lt;br /&gt;
    expect(Leaderboard.leaderboard_heading(@questionnaire.id)).to eq(&amp;quot;Test questionaire&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Additional ==&lt;br /&gt;
To explain our work in a further step, we did a video on Youtube to show the broken leaderboard page, why we did work in this way and our work for the unit tests and the refactor part.&lt;br /&gt;
&lt;br /&gt;
There are still some problems we need to figure out.  &lt;br /&gt;
For the code revising part, there are some methods with this problem: Assignment Branch Condition size for get_participants_score is too high.&lt;br /&gt;
&lt;br /&gt;
I think we cannot make too many functions in one method so that we need to make some of these be executed outside of this method.&lt;br /&gt;
Also, some of the code lines are too long so that it is not clear enough.&lt;br /&gt;
&lt;br /&gt;
During the rspec testing we noticed that the methods get_participant_entries_in_assignment_list and find_by_qtype were being called but where not created in the program. To cover these tests we had to use stubs for these methods for the expected outputs. &lt;br /&gt;
&lt;br /&gt;
There was also no declaration of ScoreCache anywhere in the program which caused other methods to fail.&lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
1. https://en.wikipedia.org/wiki/Snake_case&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=103619</id>
		<title>CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=103619"/>
		<updated>2016-10-29T01:54:00Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page give a description of the changes made for the leaderboard.rb of Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
==Expertiza Background ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, codes, websites, etc). Instructors add and edit assignments to Expertiza. And students can be assigned in teams based on their selection of the topics. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
Currently in this web application the leaderboard page does not work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The task of the project is to refactor leaderboard.rb and write unit tests for it. As the name of the methods are not in a standard style, we use snake_case for method names. There are also some useless assignments to several variables. The rate of leaderboard.rb is D, which is needed to be improved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* Refactor the leaderboard.rb&lt;br /&gt;
* Create a RSpec file in /spec/models/ foler which contains unit test for leaderboard.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Thoughts ==&lt;br /&gt;
What we need to do is to deal with problems listed by the code climate. And we also need to write a new test file to test the functionality of leaderboard.rb. However, the leaderboard itself has some problems and IDE will report some problems when we want to run it. So we need to know which method in this file is broken first and just test others instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools==&lt;br /&gt;
As for this project, we use the code climate plugin to test if our code is good enough. This plugin will obviously help us with the refactor part because it can show which part of the original codes have some problems. We also search through the internet and get to know how to write the Rspec files. We also ended up using the 'rspec/collection_matchers' class of rspec which allows us to match the number of items in a collection for an object. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactor ==&lt;br /&gt;
We will list each kind of problems we solved below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use snake_case for method names. ===&lt;br /&gt;
As we all know the snake_case means we need to name the methods and variables in this way. &lt;br /&gt;
For example, we changed this method.&lt;br /&gt;
&lt;br /&gt;
  def self.getIndependantAssignments(user_id)&lt;br /&gt;
    assignmentIds = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
Both variable names and method names are not in a good manner. We changed it to the version below.&lt;br /&gt;
&lt;br /&gt;
  def self.get_independant_assignments(user_id)&lt;br /&gt;
    assignment_ids = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Useless assignment to variable.===&lt;br /&gt;
We just commented these useless variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Prefer `each` over `for`. ===&lt;br /&gt;
We know that 'each' function is more in ruby style for loops. So we would like to change all our 'for' to 'each'.&lt;br /&gt;
  for scoreEntry in scores&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
We changed this loop to:&lt;br /&gt;
  scores.each do |scoreEntry|&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
And the problem would be fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Avoid more than 3 levels of block nesting.===&lt;br /&gt;
  if qTypeHash.fetch(questionnaireType, {}).fetch(courseId, nil).nil?&lt;br /&gt;
     if qTypeHash.fetch(questionnaireType, nil).nil?&lt;br /&gt;
        ...&lt;br /&gt;
     end&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
This is the third and fourth level of the block nesting. We need to merge them together.&lt;br /&gt;
&lt;br /&gt;
  if q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  elseif  q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; !q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
Then the 4-levels loop has been changed to 3-levels one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== `end` at 148, 1 is not aligned with `def` at 129, 2.''' ===&lt;br /&gt;
We just need to add a space in 148 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rspec Test ==&lt;br /&gt;
The Leaderboard Class did not have any unit tests associated with it coming into this project so we have to create unit tests from scratch. Upon analysis of this class, we noticed that Leaderboard did not hold any variables and was only made up of static methods. So the first round of unit tests that were created made sure that each method could be called from the Leaderboard class with the correct number of arguments. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;Leaderboard responds to get_assignment_mapping&amp;quot; do&lt;br /&gt;
    expect(Leaderboard).to respond_to(:get_assignment_mapping).with(3).argument&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Next we needed to go through the methods and create tests for them. But in order to do this we had to make objects that this class depended on since this class takes the values from other classes to output arrays and hashes. Factories were used to create these objects with a few variables being overridden &lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    @student1 = create(:student, name: &amp;quot;Student1&amp;quot;, fullname: &amp;quot;Student1 Test&amp;quot;, email: &amp;quot;student1@mail.com&amp;quot; )&lt;br /&gt;
    @student2 = create(:student, name: &amp;quot;Student2&amp;quot;, fullname: &amp;quot;Student2 Test&amp;quot;, email: &amp;quot;student2@mail.com&amp;quot; )&lt;br /&gt;
    @instructor = create(:instructor)&lt;br /&gt;
    @course = create(:course)&lt;br /&gt;
    @assignment = create(:assignment, name: &amp;quot;Assign1&amp;quot;, course: nil)&lt;br /&gt;
    @assignment2 = create(:assignment, name: &amp;quot;Assign2&amp;quot;)&lt;br /&gt;
    @participant = create(:participant, parent_id: @assignment.id, user_id: @student1.id)&lt;br /&gt;
    @participant2 = create(:participant, parent_id: @assignment2.id, user_id: @student2.id)&lt;br /&gt;
    @questionnaire=create(:questionnaire)&lt;br /&gt;
    @assignment_questionnaire1 =create(:assignment_questionnaire, user_id: @student1.id, assignment: @assignment)&lt;br /&gt;
    @assignment_questionnaire2 =create(:assignment_questionnaire, user_id: @student2.id, assignment: @assignment2)&lt;br /&gt;
    @assignment_team = create(:assignment_team, name: &amp;quot;TestTeam&amp;quot;, parent_id: @assignment2.id)&lt;br /&gt;
    @team_user = create(:team_user, team_id: @assignment_team.id, user_id: @student2.id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We tested the methods by seeing whether if we got the right amount of elements in our arrays/hashes like the following. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;getAssignmentsInCourses should return an assignment&amp;quot; do&lt;br /&gt;
    expect(Leaderboard.get_assignments_in_courses(1)).to have(1).items&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We also tested whether the code could handle invalid arguments like such. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;leaderboard_heading should return No Entry with invalid input&amp;quot; do    &lt;br /&gt;
    expect(Leaderboard.leaderboard_heading(&amp;quot;Invalid&amp;quot;)).to eq(&amp;quot;No Entry&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Additional ==&lt;br /&gt;
There are still some problems we need to figure out.  &lt;br /&gt;
For the code revising part, there are some methods with this problem: Assignment Branch Condition size for get_participants_score is too high.&lt;br /&gt;
&lt;br /&gt;
I think we cannot make too many functions in one method so that we need to make some of these be executed outside of this method.&lt;br /&gt;
Also, some of the code lines are too long so that it is not clear enough.&lt;br /&gt;
&lt;br /&gt;
During the rspec testing we noticed that the methods get_participant_entries_in_assignment_list and find_by_qtype were being called but where not created in the program. &lt;br /&gt;
&lt;br /&gt;
There was also no declaration of ScoreCache anywhere in the program which caused other methods to fail.&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=103147</id>
		<title>CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1674.Refactor_leaderboard.rb_and_write_unit_tests&amp;diff=103147"/>
		<updated>2016-10-28T22:06:02Z</updated>

		<summary type="html">&lt;p&gt;Arcox2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page give a description of the changes made for the leaderboard.rb of Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
==Expertiza Background ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, codes, websites, etc). Instructors add and edit assignments to Expertiza. And students can be assigned in teams based on their selection of the topics. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The task of the project is to refactor leaderboard.rb and write unit tests for it. As the name of the methods are not in a standard style, we use snake_case for method names. There are also some useless assignments to several variables. The rate of leaderboard.rb is D, which is needed to be improved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* Refactor the leaderboard.rb&lt;br /&gt;
* Create a RSpec file in /spec/models/ foler which contains unit test for leaderboard.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Thoughts ==&lt;br /&gt;
What we need to do is to deal with problems listed by the code climate. And we also need to write a new test file to test the functionality of leaderboard.rb. However, the leaderboard itself has some problems and IDE will report some problems when we want to run it. So we need to know which method in this file is broken first and just test others instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools==&lt;br /&gt;
As for this project, we use the code climate plugin to test if our code is good enough. This plugin will obviously help us with the refactor part because it can show which part of the original codes have some problems. We also search through the internet and get to know how to write the Rspec files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactor ==&lt;br /&gt;
We will list each kind of problems we solved below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use snake_case for method names. ===&lt;br /&gt;
As we all know the snake_case means we need to name the methods and variables in this way. &lt;br /&gt;
For example, we changed this method.&lt;br /&gt;
&lt;br /&gt;
  def self.getIndependantAssignments(user_id)&lt;br /&gt;
    assignmentIds = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
Both variable names and method names are not in a good manner. We changed it to the version below.&lt;br /&gt;
&lt;br /&gt;
  def self.get_independant_assignments(user_id)&lt;br /&gt;
    assignment_ids = AssignmentParticipant.where(user_id: user_id).pluck(:parent_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Useless assignment to variable.===&lt;br /&gt;
We just commented these useless variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Prefer `each` over `for`. ===&lt;br /&gt;
We know that 'each' function is more in ruby style for loops. So we would like to change all our 'for' to 'each'.&lt;br /&gt;
  for scoreEntry in scores&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
We changed this loop to:&lt;br /&gt;
  scores.each do |scoreEntry|&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
And the problem would be fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Avoid more than 3 levels of block nesting.===&lt;br /&gt;
  if qTypeHash.fetch(questionnaireType, {}).fetch(courseId, nil).nil?&lt;br /&gt;
     if qTypeHash.fetch(questionnaireType, nil).nil?&lt;br /&gt;
        ...&lt;br /&gt;
     end&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
This is the third and fourth level of the block nesting. We need to merge them together.&lt;br /&gt;
&lt;br /&gt;
  if q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  elseif  q_type_hash.fetch(questionnaire_type, {}).fetch(course_id, nil).nil? &amp;amp;&amp;amp; !q_type_hash.fetch(questionnaire_type, nil).nil?&lt;br /&gt;
     ...&lt;br /&gt;
  end&lt;br /&gt;
Then the 4-levels loop has been changed to 3-levels one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== `end` at 148, 1 is not aligned with `def` at 129, 2.''' ===&lt;br /&gt;
We just need to add a space in 148 line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rspec Test ==&lt;br /&gt;
The Leaderboard Class did not have any unit tests associated with it coming into this project so we have to create unit tests from scratch. Upon analysis of this class, we noticed that Leaderboard did not hold any variables and was only made up of static methods. So the first round of unit tests that were created made sure that each method could be called from the Leaderboard class with the correct number of arguments. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;Leaderboard responds to get_assignment_mapping&amp;quot; do&lt;br /&gt;
    expect(Leaderboard).to respond_to(:get_assignment_mapping).with(3).argument&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Next we needed to go through the methods and create tests for them. But in order to do this we had to make objects that this class depended on since this class takes the values from other classes to output arrays and hashes. Factories were used to create these objects with a few variables being overridden &lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    @student1 = create(:student, name: &amp;quot;Student1&amp;quot;, fullname: &amp;quot;Student1 Test&amp;quot;, email: &amp;quot;student1@mail.com&amp;quot; )&lt;br /&gt;
    @student2 = create(:student, name: &amp;quot;Student2&amp;quot;, fullname: &amp;quot;Student2 Test&amp;quot;, email: &amp;quot;student2@mail.com&amp;quot; )&lt;br /&gt;
    @instructor = create(:instructor)&lt;br /&gt;
    @course = create(:course)&lt;br /&gt;
    @assignment = create(:assignment, name: &amp;quot;Assign1&amp;quot;, course: nil)&lt;br /&gt;
    @assignment2 = create(:assignment, name: &amp;quot;Assign2&amp;quot;)&lt;br /&gt;
    @participant = create(:participant, parent_id: @assignment.id, user_id: @student1.id)&lt;br /&gt;
    @participant2 = create(:participant, parent_id: @assignment2.id, user_id: @student2.id)&lt;br /&gt;
    @questionnaire=create(:questionnaire)&lt;br /&gt;
    @assignment_questionnaire1 =create(:assignment_questionnaire, user_id: @student1.id, assignment: @assignment)&lt;br /&gt;
    @assignment_questionnaire2 =create(:assignment_questionnaire, user_id: @student2.id, assignment: @assignment2)&lt;br /&gt;
    @assignment_team = create(:assignment_team, name: &amp;quot;TestTeam&amp;quot;, parent_id: @assignment2.id)&lt;br /&gt;
    @team_user = create(:team_user, team_id: @assignment_team.id, user_id: @student2.id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We tested the methods by seeing whether if we got the right amount of elements in our arrays/hashes like the following. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;getAssignmentsInCourses should return an assignment&amp;quot; do&lt;br /&gt;
    expect(Leaderboard.get_assignments_in_courses(1)).to have(1).items&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
We also tested whether the code could handle invalid arguments like such. &lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;leaderboard_heading should return No Entry with invalid input&amp;quot; do    &lt;br /&gt;
    expect(Leaderboard.leaderboard_heading(&amp;quot;Invalid&amp;quot;)).to eq(&amp;quot;No Entry&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Additional ==&lt;br /&gt;
There are still some problems we need to figure out.  &lt;br /&gt;
For the code revising part, there are some methods with this problem: Assignment Branch Condition size for get_participants_score is too high.&lt;br /&gt;
&lt;br /&gt;
I think we cannot make too many functions in one method so that we need to make some of these be executed outside of this method.&lt;br /&gt;
Also, some of the code lines are too long so that it is not clear enough.&lt;br /&gt;
&lt;br /&gt;
During the rspec testing we noticed that the methods get_participant_entries_in_assignment_list and find_by_qtype were being called but where not created in the program. &lt;br /&gt;
&lt;br /&gt;
There was also no declaration of ScoreCache anywhere in the program which caused other methods to fail.&lt;/div&gt;</summary>
		<author><name>Arcox2</name></author>
	</entry>
</feed>