<?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=Kpokhar</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=Kpokhar"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Kpokhar"/>
	<updated>2026-10-06T13:51:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1685:_UI_changes_for_review_and_score_reports&amp;diff=106588</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=106588"/>
		<updated>2016-12-06T05:50:37Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-4(Buttons to toggle questions/score/answers) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Update2.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-3(Create a tabbed view for stats, reviews and heatmap)====&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: Taskk44.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: Updated4.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional if Task 2 is complete)====&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>Kpokhar</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=106587</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=106587"/>
		<updated>2016-12-06T05:49:22Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-4(Buttons to toggle questions/score/answers) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Update2.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-3(Create a tabbed view for stats, reviews and heatmap)====&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: Taskk44.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: Updated4.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional if Task 2 is complete)====&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>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Taskk44.jpg&amp;diff=106586</id>
		<title>File:Taskk44.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Taskk44.jpg&amp;diff=106586"/>
		<updated>2016-12-06T05:48:58Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</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=106585</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=106585"/>
		<updated>2016-12-06T05:47:28Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-2 (Button to show/hide all the reviews) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Update2.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-3(Create a tabbed view for stats, reviews and heatmap)====&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: Tskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: Updated4.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional if Task 2 is complete)====&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>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Update2.png&amp;diff=106584</id>
		<title>File:Update2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Update2.png&amp;diff=106584"/>
		<updated>2016-12-06T05:46:54Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P11.jpg&amp;diff=106583</id>
		<title>File:P11.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P11.jpg&amp;diff=106583"/>
		<updated>2016-12-06T05:44:58Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Updated2.png&amp;diff=106582</id>
		<title>File:Updated2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Updated2.png&amp;diff=106582"/>
		<updated>2016-12-06T05:43:02Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</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=106581</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=106581"/>
		<updated>2016-12-06T05:42:14Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-4(Buttons to toggle questions/score/answers) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-3(Create a tabbed view for stats, reviews and heatmap)====&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: Tskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: Updated4.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional if Task 2 is complete)====&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>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Updated4.png&amp;diff=106580</id>
		<title>File:Updated4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Updated4.png&amp;diff=106580"/>
		<updated>2016-12-06T05:41:48Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Update4.png&amp;diff=106579</id>
		<title>File:Update4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Update4.png&amp;diff=106579"/>
		<updated>2016-12-06T05:39:21Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Tskk4.jpg&amp;diff=106578</id>
		<title>File:Tskk4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Tskk4.jpg&amp;diff=106578"/>
		<updated>2016-12-06T05:38:20Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</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=106573</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=106573"/>
		<updated>2016-12-06T03:56:43Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-6 (Optional) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-3(Create a tabbed view for stats, reviews and heatmap)====&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: Taskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: Taskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional if Task 2 is complete)====&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>Kpokhar</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=106572</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=106572"/>
		<updated>2016-12-06T03:55:37Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-3 */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-3(Create a tabbed view for stats, reviews and heatmap)====&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: Taskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: Taskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</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=106571</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=106571"/>
		<updated>2016-12-06T03:26:37Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-4(Buttons to toggle questions/score/answers) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: Taskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: Taskk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Taskk4.jpg&amp;diff=106570</id>
		<title>File:Taskk4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Taskk4.jpg&amp;diff=106570"/>
		<updated>2016-12-06T03:26:13Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</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=106569</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=106569"/>
		<updated>2016-12-06T03:23:46Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-4(Buttons to toggle questions/score/answers) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: Task4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: Task4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Task4.jpg&amp;diff=106568</id>
		<title>File:Task4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Task4.jpg&amp;diff=106568"/>
		<updated>2016-12-06T03:22:51Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</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=106567</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=106567"/>
		<updated>2016-12-06T03:16:30Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-4 */ - Implementation Update&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
[[File: P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&lt;br /&gt;
[[File: P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</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=106566</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=106566"/>
		<updated>2016-12-06T02:38:02Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-2 (Button to show/hide all the reviews) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</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=106565</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=106565"/>
		<updated>2016-12-06T02:37:02Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-2 (button to show/hide all the reviews) */&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 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews for a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</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=106564</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=106564"/>
		<updated>2016-12-06T02:36:47Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-2 (Added button to show/hide all the reviews) */&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 (button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews for a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</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=106563</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=106563"/>
		<updated>2016-12-06T02:36:14Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Task-2 */ -- Implementation Update&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 (Added button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:P1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews for a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional)====&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>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P1.jpg&amp;diff=106562</id>
		<title>File:P1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P1.jpg&amp;diff=106562"/>
		<updated>2016-12-06T02:15:08Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=106000</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=106000"/>
		<updated>2016-11-17T02:51:21Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Testing via UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
'''NOTE: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure. '''&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:If student ID is not provided, the system will randomly select an student ID from all the students in the database, and impersonate the selected student view. This is useful when the instructor doesn't remember the specific student ID. &lt;br /&gt;
:Required changes in 1 file :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/master/app/controllers/impersonate_controller.rb Impersonate_controller.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if params[:user][:name]==&amp;quot;&amp;quot;                     &lt;br /&gt;
	  students = User.all.where(role_id: Role.student)&lt;br /&gt;
	  user = students[rand(students.length)] &lt;br /&gt;
	  until original_user.can_impersonate? user&lt;br /&gt;
	    user = students[rand(students.length)]&lt;br /&gt;
	  end&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2N.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk3N.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4N.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Why These Changes?==&lt;br /&gt;
* Requirement: Add a “student view” button for instructors.&lt;br /&gt;
:As we were required to add a button , it makes more sense to add a similar button used across the application. Thus we choose class=&amp;quot;btn btn-primary&amp;quot; for buttons and :class =&amp;gt; 'form-control input-sm' for textboxes. &lt;br /&gt;
&lt;br /&gt;
* Requirement: Introduce a revert button to go back to instructor:&lt;br /&gt;
:After an instructor enters a student ID of a student and enters student view, there should be a way to go back to instructors . Thus we have introduced a revert button. Also if the instructor wants to go to a different student’s view he should be able to do so as well. Making these two tasks possible with single textbox and button was better instead of an extra button to go back to instructors view. Now to go back to instructors view, instructor has to leave the textbox blank and click “revert”, if the instructor wants to go to a different student’s view he just need to enter the new student’s id and click on “revert”.&lt;br /&gt;
&lt;br /&gt;
* Requirement: View on specific date:&lt;br /&gt;
:We decided to include a date box which on clicked on the date field a data picker pops up. We have added this picker as it makes sense to just click on which date instead of typing the whole date.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;br /&gt;
==Screencast==&lt;br /&gt;
Screencast [https://youtu.be/WrJm6csM3mo link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk4N.jpg&amp;diff=105999</id>
		<title>File:Svk4N.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk4N.jpg&amp;diff=105999"/>
		<updated>2016-11-17T02:50:37Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk3N.jpg&amp;diff=105998</id>
		<title>File:Svk3N.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk3N.jpg&amp;diff=105998"/>
		<updated>2016-11-17T02:50:20Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2N.jpg&amp;diff=105997</id>
		<title>File:Sv2N.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2N.jpg&amp;diff=105997"/>
		<updated>2016-11-17T02:48:03Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: uploaded a new version of &amp;amp;quot;File:Sv2N.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2N.jpg&amp;diff=105996</id>
		<title>File:Sv2N.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2N.jpg&amp;diff=105996"/>
		<updated>2016-11-17T02:47:33Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: uploaded a new version of &amp;amp;quot;File:Sv2N.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2N.jpg&amp;diff=105995</id>
		<title>File:Sv2N.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2N.jpg&amp;diff=105995"/>
		<updated>2016-11-17T02:47:19Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk1N.jpg&amp;diff=105993</id>
		<title>File:Svk1N.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk1N.jpg&amp;diff=105993"/>
		<updated>2016-11-17T02:45:15Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105991</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105991"/>
		<updated>2016-11-17T02:40:54Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Working */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
'''NOTE: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure. '''&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:If student ID is not provided, the system will randomly select an student ID from all the students in the database, and impersonate the selected student view. This is useful when the instructor doesn't remember the specific student ID. &lt;br /&gt;
:Required changes in 1 file :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/master/app/controllers/impersonate_controller.rb Impersonate_controller.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if params[:user][:name]==&amp;quot;&amp;quot;                     &lt;br /&gt;
	  students = User.all.where(role_id: Role.student)&lt;br /&gt;
	  user = students[rand(students.length)] &lt;br /&gt;
	  until original_user.can_impersonate? user&lt;br /&gt;
	    user = students[rand(students.length)]&lt;br /&gt;
	  end&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
[[File:Svk3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Why These Changes?==&lt;br /&gt;
* Requirement: Add a “student view” button for instructors.&lt;br /&gt;
:As we were required to add a button , it makes more sense to add a similar button used across the application. Thus we choose class=&amp;quot;btn btn-primary&amp;quot; for buttons and :class =&amp;gt; 'form-control input-sm' for textboxes. &lt;br /&gt;
&lt;br /&gt;
* Requirement: Introduce a revert button to go back to instructor:&lt;br /&gt;
:After an instructor enters a student ID of a student and enters student view, there should be a way to go back to instructors . Thus we have introduced a revert button. Also if the instructor wants to go to a different student’s view he should be able to do so as well. Making these two tasks possible with single textbox and button was better instead of an extra button to go back to instructors view. Now to go back to instructors view, instructor has to leave the textbox blank and click “revert”, if the instructor wants to go to a different student’s view he just need to enter the new student’s id and click on “revert”.&lt;br /&gt;
&lt;br /&gt;
* Requirement: View on specific date:&lt;br /&gt;
:We decided to include a date box which on clicked on the date field a data picker pops up. We have added this picker as it makes sense to just click on which date instead of typing the whole date.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;br /&gt;
==Screencast==&lt;br /&gt;
Screencast [https://youtu.be/WrJm6csM3mo link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeKN6.jpg&amp;diff=105990</id>
		<title>File:HomeKN6.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeKN6.jpg&amp;diff=105990"/>
		<updated>2016-11-17T02:40:29Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeKN3.jpg&amp;diff=105989</id>
		<title>File:HomeKN3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeKN3.jpg&amp;diff=105989"/>
		<updated>2016-11-17T02:40:14Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeKN4.jpg&amp;diff=105988</id>
		<title>File:HomeKN4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeKN4.jpg&amp;diff=105988"/>
		<updated>2016-11-17T02:36:42Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeK4N.jpg&amp;diff=105987</id>
		<title>File:HomeK4N.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:HomeK4N.jpg&amp;diff=105987"/>
		<updated>2016-11-17T02:30:30Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104537</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104537"/>
		<updated>2016-11-04T22:49:10Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Testing via UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
[[File:Svk3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104536</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104536"/>
		<updated>2016-11-04T22:48:27Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Testing via UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
[[File:Svk3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk4.jpg&amp;diff=104535</id>
		<title>File:Svk4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk4.jpg&amp;diff=104535"/>
		<updated>2016-11-04T22:47:22Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk3.jpg&amp;diff=104534</id>
		<title>File:Svk3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk3.jpg&amp;diff=104534"/>
		<updated>2016-11-04T22:46:58Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2.jpg&amp;diff=104533</id>
		<title>File:Sv2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sv2.jpg&amp;diff=104533"/>
		<updated>2016-11-04T22:46:32Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk1.jpg&amp;diff=104532</id>
		<title>File:Svk1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Svk1.jpg&amp;diff=104532"/>
		<updated>2016-11-04T22:45:30Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104531</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104531"/>
		<updated>2016-11-04T22:40:24Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Testing via UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104530</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104530"/>
		<updated>2016-11-04T22:37:46Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create and assignment.&lt;br /&gt;
 Create assignment. I have created one with name ''Test_Changes'' with submission deadline Nov 09 and review Deadline Nov 14.&lt;br /&gt;
 Add all the student in course for this assignment&lt;br /&gt;
*Switch to student view.&lt;br /&gt;
*Go to future date and view the assignment list.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104529</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104529"/>
		<updated>2016-11-04T22:36:15Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Testing via UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create and assignment.&lt;br /&gt;
: Create assignment with name ''Test_Changes'' with submission deadline Nov 09 and review Deadline Nov 14.&lt;br /&gt;
*Switch to student view.&lt;br /&gt;
*Go to future date and view the assignment list.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104528</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104528"/>
		<updated>2016-11-04T22:29:50Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create and assignment.&lt;br /&gt;
*Switch to student view.&lt;br /&gt;
*Go to future date and view the assignment list.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104526</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104526"/>
		<updated>2016-11-04T22:27:54Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
:The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104519</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104519"/>
		<updated>2016-11-04T22:19:21Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button&lt;br /&gt;
is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
'''''/app/views/shared/_navigation.html'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
class User &amp;lt; ActiveRecord::Base&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104518</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104518"/>
		<updated>2016-11-04T22:19:06Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Project Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors. &lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button&lt;br /&gt;
is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
'''''/app/views/shared/_navigation.html'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
class User &amp;lt; ActiveRecord::Base&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104515</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104515"/>
		<updated>2016-11-04T22:14:54Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Working */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors. &lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&amp;lt;br&amp;gt; The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the '''Revert''' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button&lt;br /&gt;
is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
'''''/app/views/shared/_navigation.html'''''&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104514</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=104514"/>
		<updated>2016-11-04T22:14:14Z</updated>

		<summary type="html">&lt;p&gt;Kpokhar: /* Working */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors. &lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&amp;lt;br&amp;gt; The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press ''Student View'' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to revert back to instructor view you just have to leave the text box empty and press the ''revert'' button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and press ''revert''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button&lt;br /&gt;
is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
'''''/app/views/shared/_navigation.html'''''&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&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;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Kpokhar</name></author>
	</entry>
</feed>