<?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=Ntripat</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=Ntripat"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Ntripat"/>
	<updated>2026-05-12T08:04:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121114</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121114"/>
		<updated>2018-12-07T01:55:33Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* Files Involved */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_criteria_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 &lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 &lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 &lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
  newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== app/views/grades/_team_charts.html.erb ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
      google.charts.setOnLoadCallback(drawBasic);&lt;br /&gt;
       var chart;&lt;br /&gt;
      var chartOptions;&lt;br /&gt;
       var chartData = [];					//Stores all data for the chart to display&lt;br /&gt;
      var currentRound = 0;				//Stores the current displayed round&lt;br /&gt;
      var criteriaSelected = [];	//Stores selected criteria to display&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
         for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
          var criteriaNum = Math.floor(Math.random() * 5 + 5);&lt;br /&gt;
           var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
            round.push(Math.floor(Math.random() * 101));&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
 function drawBasic() {	//Initializes all google chart information&lt;br /&gt;
        generateData();&lt;br /&gt;
         chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Average Scores',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
            fontName: 'arial',	//Fonts to be changed to Helvetica when implemented&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
          },&lt;br /&gt;
          legend: 'none',&lt;br /&gt;
          bar: {&lt;br /&gt;
            groupWidth: 'default'&lt;br /&gt;
          },&lt;br /&gt;
          hAxis: {&lt;br /&gt;
            title: 'Criterion',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false,&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0.5&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          vAxis: {&lt;br /&gt;
            title: 'Average Score',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0,&lt;br /&gt;
              max: 100&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        };&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds();&lt;br /&gt;
      }&lt;br /&gt;
      function updateChart(roundNum) {	//Updates the chart with a new round number&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      }&lt;br /&gt;
    function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
        var data = loadData();&lt;br /&gt;
        chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
       function loadData() {	//Pulls data from the page and renders the chart with it&lt;br /&gt;
        var data = new google.visualization.DataTable();&lt;br /&gt;
        data.addColumn('number', 'Criterion');&lt;br /&gt;
        data.addColumn('number', 'Average Score');&lt;br /&gt;
        data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
        data.addColumn({type: 'number', role: 'annotation'});&lt;br /&gt;
         var rowCount = 1;&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) {&lt;br /&gt;
          if (criteriaSelected[currentRound][i]) {&lt;br /&gt;
            data.addRow([rowCount++, chartData[currentRound][i], '#a90201', i+1]);&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
         return data;&lt;br /&gt;
       }&lt;br /&gt;
       function loadRounds() {	//Creates the Rounds in the dropdown menu&lt;br /&gt;
        var rounds = document.getElementById(&amp;quot;chartRounds&amp;quot;);&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData.length; i++) {&lt;br /&gt;
          var option = document.createElement('option');&lt;br /&gt;
          option.value = i;&lt;br /&gt;
          option.text = &amp;quot;Round &amp;quot; + (i+1);&lt;br /&gt;
          rounds.add(option);&lt;br /&gt;
        }&lt;br /&gt;
        rounds.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
      function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
        var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
        while (form.firstChild)&lt;br /&gt;
          form.removeChild(form.firstChild);&lt;br /&gt;
         chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
          var checkbox = document.createElement('input');&lt;br /&gt;
          checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
          checkbox.name = &amp;quot;name&amp;quot;;&lt;br /&gt;
          checkbox.value = &amp;quot;value&amp;quot;;&lt;br /&gt;
          checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
          checkbox.onclick = function() {&lt;br /&gt;
            checkboxUpdate(i);&lt;br /&gt;
          }&lt;br /&gt;
           var label = document.createElement('label')&lt;br /&gt;
          label.htmlFor = checkbox.id;&lt;br /&gt;
          label.appendChild(document.createTextNode(&amp;quot;Criteria &amp;quot; + (i+1)));&lt;br /&gt;
           form.appendChild(checkbox);&lt;br /&gt;
          form.appendChild(label);&lt;br /&gt;
          form.appendChild(document.createElement(&amp;quot;BR&amp;quot;));&lt;br /&gt;
          checkbox.checked = criteriaSelected[currentRound][i];&lt;br /&gt;
        });&lt;br /&gt;
      }&lt;br /&gt;
       function checkboxUpdate(checkid) {	//Update function to change the displayed criteria&lt;br /&gt;
        var check = document.getElementById(&amp;quot;checkboxoption&amp;quot; + checkid);&lt;br /&gt;
        criteriaSelected[currentRound][checkid] = check.checked;&lt;br /&gt;
        renderChart();&lt;br /&gt;
      }&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 function checkboxUpdate(checkid) {&lt;br /&gt;
 &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
 &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;br /&gt;
&lt;br /&gt;
== spec/controllers/grades_controller_spec.rb ==&lt;br /&gt;
    context 'when current assignment does not vary rubric by round' do&lt;br /&gt;
      it 'calculates scores and renders grades#view page' do&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, used_in_round: 2).and_return([])&lt;br /&gt;
        # added AssignmentQuestionnaire 'allow' below to handle chart functionality added in E1859&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, questionnaire_id: 1).and_return([assignment_questionnaire])&lt;br /&gt;
        allow(ReviewResponseMap).to receive(:get_assessments_for).with(team).and_return([review_response])&lt;br /&gt;
        params = {id: 1}&lt;br /&gt;
        get :view, params&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121113</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121113"/>
		<updated>2018-12-07T01:51:25Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/views/grades/_team_charts.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 &lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 &lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 &lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
  newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== app/views/grades/_team_charts.html.erb ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
      google.charts.setOnLoadCallback(drawBasic);&lt;br /&gt;
       var chart;&lt;br /&gt;
      var chartOptions;&lt;br /&gt;
       var chartData = [];					//Stores all data for the chart to display&lt;br /&gt;
      var currentRound = 0;				//Stores the current displayed round&lt;br /&gt;
      var criteriaSelected = [];	//Stores selected criteria to display&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
         for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
          var criteriaNum = Math.floor(Math.random() * 5 + 5);&lt;br /&gt;
           var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
            round.push(Math.floor(Math.random() * 101));&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
 function drawBasic() {	//Initializes all google chart information&lt;br /&gt;
        generateData();&lt;br /&gt;
         chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Average Scores',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
            fontName: 'arial',	//Fonts to be changed to Helvetica when implemented&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
          },&lt;br /&gt;
          legend: 'none',&lt;br /&gt;
          bar: {&lt;br /&gt;
            groupWidth: 'default'&lt;br /&gt;
          },&lt;br /&gt;
          hAxis: {&lt;br /&gt;
            title: 'Criterion',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false,&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0.5&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          vAxis: {&lt;br /&gt;
            title: 'Average Score',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0,&lt;br /&gt;
              max: 100&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        };&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds();&lt;br /&gt;
      }&lt;br /&gt;
      function updateChart(roundNum) {	//Updates the chart with a new round number&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      }&lt;br /&gt;
    function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
        var data = loadData();&lt;br /&gt;
        chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
       function loadData() {	//Pulls data from the page and renders the chart with it&lt;br /&gt;
        var data = new google.visualization.DataTable();&lt;br /&gt;
        data.addColumn('number', 'Criterion');&lt;br /&gt;
        data.addColumn('number', 'Average Score');&lt;br /&gt;
        data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
        data.addColumn({type: 'number', role: 'annotation'});&lt;br /&gt;
         var rowCount = 1;&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) {&lt;br /&gt;
          if (criteriaSelected[currentRound][i]) {&lt;br /&gt;
            data.addRow([rowCount++, chartData[currentRound][i], '#a90201', i+1]);&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
         return data;&lt;br /&gt;
       }&lt;br /&gt;
       function loadRounds() {	//Creates the Rounds in the dropdown menu&lt;br /&gt;
        var rounds = document.getElementById(&amp;quot;chartRounds&amp;quot;);&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData.length; i++) {&lt;br /&gt;
          var option = document.createElement('option');&lt;br /&gt;
          option.value = i;&lt;br /&gt;
          option.text = &amp;quot;Round &amp;quot; + (i+1);&lt;br /&gt;
          rounds.add(option);&lt;br /&gt;
        }&lt;br /&gt;
        rounds.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
      function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
        var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
        while (form.firstChild)&lt;br /&gt;
          form.removeChild(form.firstChild);&lt;br /&gt;
         chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
          var checkbox = document.createElement('input');&lt;br /&gt;
          checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
          checkbox.name = &amp;quot;name&amp;quot;;&lt;br /&gt;
          checkbox.value = &amp;quot;value&amp;quot;;&lt;br /&gt;
          checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
          checkbox.onclick = function() {&lt;br /&gt;
            checkboxUpdate(i);&lt;br /&gt;
          }&lt;br /&gt;
           var label = document.createElement('label')&lt;br /&gt;
          label.htmlFor = checkbox.id;&lt;br /&gt;
          label.appendChild(document.createTextNode(&amp;quot;Criteria &amp;quot; + (i+1)));&lt;br /&gt;
           form.appendChild(checkbox);&lt;br /&gt;
          form.appendChild(label);&lt;br /&gt;
          form.appendChild(document.createElement(&amp;quot;BR&amp;quot;));&lt;br /&gt;
          checkbox.checked = criteriaSelected[currentRound][i];&lt;br /&gt;
        });&lt;br /&gt;
      }&lt;br /&gt;
       function checkboxUpdate(checkid) {	//Update function to change the displayed criteria&lt;br /&gt;
        var check = document.getElementById(&amp;quot;checkboxoption&amp;quot; + checkid);&lt;br /&gt;
        criteriaSelected[currentRound][checkid] = check.checked;&lt;br /&gt;
        renderChart();&lt;br /&gt;
      }&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 function checkboxUpdate(checkid) {&lt;br /&gt;
 &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
 &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;br /&gt;
&lt;br /&gt;
== spec/controllers/grades_controller_spec.rb ==&lt;br /&gt;
    context 'when current assignment does not vary rubric by round' do&lt;br /&gt;
      it 'calculates scores and renders grades#view page' do&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, used_in_round: 2).and_return([])&lt;br /&gt;
        # added AssignmentQuestionnaire 'allow' below to handle chart functionality added in E1859&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, questionnaire_id: 1).and_return([assignment_questionnaire])&lt;br /&gt;
        allow(ReviewResponseMap).to receive(:get_assessments_for).with(team).and_return([review_response])&lt;br /&gt;
        params = {id: 1}&lt;br /&gt;
        get :view, params&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121112</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121112"/>
		<updated>2018-12-07T01:50:42Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/views/grades/_team_charts.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 &lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 &lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 &lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
  newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== app/views/grades/_team_charts.html.erb ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
      google.charts.setOnLoadCallback(drawBasic);&lt;br /&gt;
       var chart;&lt;br /&gt;
      var chartOptions;&lt;br /&gt;
       var chartData = [];					//Stores all data for the chart to display&lt;br /&gt;
      var currentRound = 0;				//Stores the current displayed round&lt;br /&gt;
      var criteriaSelected = [];	//Stores selected criteria to display&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
         for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
          var criteriaNum = Math.floor(Math.random() * 5 + 5);&lt;br /&gt;
           var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
            round.push(Math.floor(Math.random() * 101));&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
 function drawBasic() {	//Initializes all google chart information&lt;br /&gt;
        generateData();&lt;br /&gt;
         chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Average Scores',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
            fontName: 'arial',	//Fonts to be changed to Helvetica when implemented&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
          },&lt;br /&gt;
          legend: 'none',&lt;br /&gt;
          bar: {&lt;br /&gt;
            groupWidth: 'default'&lt;br /&gt;
          },&lt;br /&gt;
          hAxis: {&lt;br /&gt;
            title: 'Criterion',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false,&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0.5&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          vAxis: {&lt;br /&gt;
            title: 'Average Score',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0,&lt;br /&gt;
              max: 100&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        };&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds();&lt;br /&gt;
      }&lt;br /&gt;
      function updateChart(roundNum) {	//Updates the chart with a new round number&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      }&lt;br /&gt;
    function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
        var data = loadData();&lt;br /&gt;
        chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
       function loadData() {	//Pulls data from the page and renders the chart with it&lt;br /&gt;
        var data = new google.visualization.DataTable();&lt;br /&gt;
        data.addColumn('number', 'Criterion');&lt;br /&gt;
        data.addColumn('number', 'Average Score');&lt;br /&gt;
        data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
        data.addColumn({type: 'number', role: 'annotation'});&lt;br /&gt;
         var rowCount = 1;&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) {&lt;br /&gt;
          if (criteriaSelected[currentRound][i]) {&lt;br /&gt;
            data.addRow([rowCount++, chartData[currentRound][i], '#a90201', i+1]);&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
         return data;&lt;br /&gt;
       }&lt;br /&gt;
       function loadRounds() {	//Creates the Rounds in the dropdown menu&lt;br /&gt;
        var rounds = document.getElementById(&amp;quot;chartRounds&amp;quot;);&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData.length; i++) {&lt;br /&gt;
          var option = document.createElement('option');&lt;br /&gt;
          option.value = i;&lt;br /&gt;
          option.text = &amp;quot;Round &amp;quot; + (i+1);&lt;br /&gt;
          rounds.add(option);&lt;br /&gt;
        }&lt;br /&gt;
        rounds.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
      function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
        var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
        while (form.firstChild)&lt;br /&gt;
          form.removeChild(form.firstChild);&lt;br /&gt;
         chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
          var checkbox = document.createElement('input');&lt;br /&gt;
          checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
          checkbox.name = &amp;quot;name&amp;quot;;&lt;br /&gt;
          checkbox.value = &amp;quot;value&amp;quot;;&lt;br /&gt;
          checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
          checkbox.onclick = function() {&lt;br /&gt;
            checkboxUpdate(i);&lt;br /&gt;
          }&lt;br /&gt;
           var label = document.createElement('label')&lt;br /&gt;
          label.htmlFor = checkbox.id;&lt;br /&gt;
          label.appendChild(document.createTextNode(&amp;quot;Criteria &amp;quot; + (i+1)));&lt;br /&gt;
           form.appendChild(checkbox);&lt;br /&gt;
          form.appendChild(label);&lt;br /&gt;
          form.appendChild(document.createElement(&amp;quot;BR&amp;quot;));&lt;br /&gt;
          checkbox.checked = criteriaSelected[currentRound][i];&lt;br /&gt;
        });&lt;br /&gt;
      }&lt;br /&gt;
       function checkboxUpdate(checkid) {	//Update function to change the displayed criteria&lt;br /&gt;
        var check = document.getElementById(&amp;quot;checkboxoption&amp;quot; + checkid);&lt;br /&gt;
        criteriaSelected[currentRound][checkid] = check.checked;&lt;br /&gt;
        renderChart();&lt;br /&gt;
      }&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 function checkboxUpdate(checkid) {&lt;br /&gt;
 &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
 &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;br /&gt;
&lt;br /&gt;
== spec/controllers/grades_controller_spec.rb ==&lt;br /&gt;
    context 'when current assignment does not vary rubric by round' do&lt;br /&gt;
      it 'calculates scores and renders grades#view page' do&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, used_in_round: 2).and_return([])&lt;br /&gt;
        # added AssignmentQuestionnaire 'allow' below to handle chart functionality added in E1859&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, questionnaire_id: 1).and_return([assignment_questionnaire])&lt;br /&gt;
        allow(ReviewResponseMap).to receive(:get_assessments_for).with(team).and_return([review_response])&lt;br /&gt;
        params = {id: 1}&lt;br /&gt;
        get :view, params&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121111</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121111"/>
		<updated>2018-12-07T01:48:52Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 &lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 &lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 &lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
  newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== app/views/grades/_team_charts.html.erb ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
      google.charts.setOnLoadCallback(drawBasic);&lt;br /&gt;
       var chart;&lt;br /&gt;
      var chartOptions;&lt;br /&gt;
       var chartData = [];					//Stores all data for the chart to display&lt;br /&gt;
      var currentRound = 0;				//Stores the current displayed round&lt;br /&gt;
      var criteriaSelected = [];	//Stores selected criteria to display&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
         for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
          var criteriaNum = Math.floor(Math.random() * 5 + 5);&lt;br /&gt;
           var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
            round.push(Math.floor(Math.random() * 101));&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
 function drawBasic() {	//Initializes all google chart information&lt;br /&gt;
        generateData();&lt;br /&gt;
         chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Average Scores',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
            fontName: 'arial',	//Fonts to be changed to Helvetica when implemented&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
          },&lt;br /&gt;
          legend: 'none',&lt;br /&gt;
          bar: {&lt;br /&gt;
            groupWidth: 'default'&lt;br /&gt;
          },&lt;br /&gt;
          hAxis: {&lt;br /&gt;
            title: 'Criterion',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false,&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0.5&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          vAxis: {&lt;br /&gt;
            title: 'Average Score',&lt;br /&gt;
            titleTextStyle: {&lt;br /&gt;
              fontName: 'arial',&lt;br /&gt;
              fontSize: 14,&lt;br /&gt;
              italic: false,&lt;br /&gt;
              bold: false&lt;br /&gt;
            },&lt;br /&gt;
            viewWindow: {&lt;br /&gt;
              min: 0,&lt;br /&gt;
              max: 100&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        };&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds();&lt;br /&gt;
      }&lt;br /&gt;
      function updateChart(roundNum) {	//Updates the chart with a new round number&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      }&lt;br /&gt;
    function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
        var data = loadData();&lt;br /&gt;
        chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
       function loadData() {	//Pulls data from the page and renders the chart with it&lt;br /&gt;
        var data = new google.visualization.DataTable();&lt;br /&gt;
        data.addColumn('number', 'Criterion');&lt;br /&gt;
        data.addColumn('number', 'Average Score');&lt;br /&gt;
        data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
        data.addColumn({type: 'number', role: 'annotation'});&lt;br /&gt;
         var rowCount = 1;&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) {&lt;br /&gt;
          if (criteriaSelected[currentRound][i]) {&lt;br /&gt;
            data.addRow([rowCount++, chartData[currentRound][i], '#a90201', i+1]);&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
         return data;&lt;br /&gt;
       }&lt;br /&gt;
       function loadRounds() {	//Creates the Rounds in the dropdown menu&lt;br /&gt;
        var rounds = document.getElementById(&amp;quot;chartRounds&amp;quot;);&lt;br /&gt;
        for(var i = 0; i &amp;lt; chartData.length; i++) {&lt;br /&gt;
          var option = document.createElement('option');&lt;br /&gt;
          option.value = i;&lt;br /&gt;
          option.text = &amp;quot;Round &amp;quot; + (i+1);&lt;br /&gt;
          rounds.add(option);&lt;br /&gt;
        }&lt;br /&gt;
        rounds.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
      function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
        var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
        while (form.firstChild)&lt;br /&gt;
          form.removeChild(form.firstChild);&lt;br /&gt;
         chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
          var checkbox = document.createElement('input');&lt;br /&gt;
          checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
          checkbox.name = &amp;quot;name&amp;quot;;&lt;br /&gt;
          checkbox.value = &amp;quot;value&amp;quot;;&lt;br /&gt;
          checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
          checkbox.onclick = function() {&lt;br /&gt;
            checkboxUpdate(i);&lt;br /&gt;
          }&lt;br /&gt;
           var label = document.createElement('label')&lt;br /&gt;
          label.htmlFor = checkbox.id;&lt;br /&gt;
          label.appendChild(document.createTextNode(&amp;quot;Criteria &amp;quot; + (i+1)));&lt;br /&gt;
           form.appendChild(checkbox);&lt;br /&gt;
          form.appendChild(label);&lt;br /&gt;
          form.appendChild(document.createElement(&amp;quot;BR&amp;quot;));&lt;br /&gt;
          checkbox.checked = criteriaSelected[currentRound][i];&lt;br /&gt;
        });&lt;br /&gt;
      }&lt;br /&gt;
       function checkboxUpdate(checkid) {	//Update function to change the displayed criteria&lt;br /&gt;
        var check = document.getElementById(&amp;quot;checkboxoption&amp;quot; + checkid);&lt;br /&gt;
        criteriaSelected[currentRound][checkid] = check.checked;&lt;br /&gt;
        renderChart();&lt;br /&gt;
      }&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 function checkboxUpdate(checkid) {&lt;br /&gt;
 &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
 &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;br /&gt;
&lt;br /&gt;
== spec/controllers/grades_controller_spec.rb ==&lt;br /&gt;
    context 'when current assignment does not vary rubric by round' do&lt;br /&gt;
      it 'calculates scores and renders grades#view page' do&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, used_in_round: 2).and_return([])&lt;br /&gt;
        # added AssignmentQuestionnaire 'allow' below to handle chart functionality added in E1859&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, questionnaire_id: 1).and_return([assignment_questionnaire])&lt;br /&gt;
        allow(ReviewResponseMap).to receive(:get_assessments_for).with(team).and_return([review_response])&lt;br /&gt;
        params = {id: 1}&lt;br /&gt;
        get :view, params&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121108</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121108"/>
		<updated>2018-12-07T01:05:01Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* RSpec Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 &lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 &lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 &lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
  newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;br /&gt;
&lt;br /&gt;
== spec/controllers/grades_controller_spec.rb ==&lt;br /&gt;
    context 'when current assignment does not vary rubric by round' do&lt;br /&gt;
      it 'calculates scores and renders grades#view page' do&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, used_in_round: 2).and_return([])&lt;br /&gt;
        # added AssignmentQuestionnaire 'allow' below to handle chart functionality added in E1859&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1, questionnaire_id: 1).and_return([assignment_questionnaire])&lt;br /&gt;
        allow(ReviewResponseMap).to receive(:get_assessments_for).with(team).and_return([review_response])&lt;br /&gt;
        params = {id: 1}&lt;br /&gt;
        get :view, params&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121107</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121107"/>
		<updated>2018-12-07T01:00:36Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/views/grades/_criteria_charts.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 &lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 &lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 &lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
  newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121106</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121106"/>
		<updated>2018-12-07T01:00:20Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/views/grades/_criteria_charts.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 &lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
         chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
      function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 &lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 &lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
  newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121102</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121102"/>
		<updated>2018-12-07T00:58:00Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/controllers/grades_controller.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
 @@ -55,29 +22,35 @@&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 @@ -89,7 +62,7 @@&lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
 @@ -130,12 +103,12 @@&lt;br /&gt;
        chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
 @@ -150,18 +123,13 @@&lt;br /&gt;
       function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 @@ -177,9 +145,9 @@&lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 @@ -192,7 +160,7 @@&lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 @@ -208,16 +176,16 @@&lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
 newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
 @@ -249,15 +217,15 @@&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 @@ -285,7 +253,7 @@&lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121101</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121101"/>
		<updated>2018-12-07T00:56:28Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/controllers/grades_controller.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
 @@ -55,29 +22,35 @@&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 @@ -89,7 +62,7 @@&lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
 @@ -130,12 +103,12 @@&lt;br /&gt;
        chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
 @@ -150,18 +123,13 @@&lt;br /&gt;
       function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 @@ -177,9 +145,9 @@&lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 @@ -192,7 +160,7 @@&lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 @@ -208,16 +176,16 @@&lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
 newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
 @@ -249,15 +217,15 @@&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 @@ -285,7 +253,7 @@&lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 @@ -62,37 +62,37 @@&lt;br /&gt;
 &lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 @@ -137,7 +134,6 @@ def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 @@ -160,10 +156,10 @@ def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 @@ -270,10 +266,10 @@ def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121100</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121100"/>
		<updated>2018-12-07T00:53:21Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/controllers/grades_controller.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
 @@ -55,29 +22,35 @@&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 @@ -89,7 +62,7 @@&lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
 @@ -130,12 +103,12 @@&lt;br /&gt;
        chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
 @@ -150,18 +123,13 @@&lt;br /&gt;
       function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 @@ -177,9 +145,9 @@&lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 @@ -192,7 +160,7 @@&lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 @@ -208,16 +176,16 @@&lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
 newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
 @@ -249,15 +217,15 @@&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 @@ -285,7 +253,7 @@&lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 def action_allowed?&lt;br /&gt;
     case params[:action]&lt;br /&gt;
     when 'view_my_scores'&lt;br /&gt;
       ['Instructor',&lt;br /&gt;
        'Teaching Assistant',&lt;br /&gt;
        'Administrator',&lt;br /&gt;
        'Super-Administrator',&lt;br /&gt;
       'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 @@ -62,37 +62,37 @@&lt;br /&gt;
 &lt;br /&gt;
   # collects the question text for display on the chart&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_text&lt;br /&gt;
     @text = []&lt;br /&gt;
     (1..@assignment.num_review_rounds).to_a.each do |round|&lt;br /&gt;
       question = @questions[('review' + round.to_s).to_sym]&lt;br /&gt;
       @text[round - 1] = []&lt;br /&gt;
       next if question.nil?&lt;br /&gt;
       (0..(question.length - 1)).to_a.each do |q|&lt;br /&gt;
         @text[round - 1][q] = question[q].txt&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 &lt;br /&gt;
   # find the maximum and minimum scores for each questionnaire round&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_minmax(questionnaires)&lt;br /&gt;
     @minmax = []&lt;br /&gt;
     questionnaires.each do |questionnaire|&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 # this method collects and averages all the review scores across teams&lt;br /&gt;
   # Added as part of E1859&lt;br /&gt;
   def assign_chart_data&lt;br /&gt;
     @rounds = @assignment.num_review_rounds&lt;br /&gt;
     @chartdata = []&lt;br /&gt;
     (1..@rounds).to_a.each do |round|&lt;br /&gt;
       @teams = AssignmentTeam.where(parent_id: @assignment.id)&lt;br /&gt;
       @teamids = []&lt;br /&gt;
       @result = []&lt;br /&gt;
       @responseids = []&lt;br /&gt;
       @scoreviews = []&lt;br /&gt;
       (0..(@teams.length - 1)).to_a.each do |t|&lt;br /&gt;
         @teamids[t] = @teams[t].id&lt;br /&gt;
         @result[t] = ResponseMap.find_by_sql [&amp;quot;SELECT id FROM response_maps&lt;br /&gt;
           WHERE type = 'ReviewResponseMap' AND reviewee_id = ?&amp;quot;, @teamids[t]]&lt;br /&gt;
         @responseids[t] = []&lt;br /&gt;
         @scoreviews[t] = []&lt;br /&gt;
         (0..(@result[t].length - 1)).to_a.each do |r|&lt;br /&gt;
           @responseids[t][r] = Response.find_by_sql [&amp;quot;SELECT id FROM responses&lt;br /&gt;
             WHERE round = ? AND map_id = ?&amp;quot;, round, @result[t][r]]&lt;br /&gt;
&lt;br /&gt;
          @scoreviews[t][r] = Answer.where(response_id: @responseids[t][r][0]) unless @responseids[t][r].empty?&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @chartdata[round - 1] = []&lt;br /&gt;
      # because the nth first elements could be nil&lt;br /&gt;
      # iterate until a non-nil value is found or move to next round&lt;br /&gt;
      t = 0&lt;br /&gt;
      r = 0&lt;br /&gt;
 t += 1 while @scoreviews[t].nil?&lt;br /&gt;
      while t &amp;lt; @scoreviews.length and @scoreviews[t][r].nil?&lt;br /&gt;
        if r &amp;lt; @scoreviews[t].length - 1&lt;br /&gt;
          r += 1&lt;br /&gt;
        else&lt;br /&gt;
 @@ -137,7 +134,6 @@ def assign_chart_data&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      next if t &amp;gt;= @scoreviews.length&lt;br /&gt;
 (0..(@scoreviews[t][r].length - 1)).to_a.each do |q|&lt;br /&gt;
        sum = 0&lt;br /&gt;
        counter = 0&lt;br /&gt;
 @@ -160,10 +156,10 @@ def retrieve_questions(questionnaires)&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      questionnaire_symbol = if !round.nil?&lt;br /&gt;
                         (questionnaire.symbol.to_s + round.to_s).to_sym&lt;br /&gt;
                             else&lt;br /&gt;
                               questionnaire.symbol&lt;br /&gt;
                             end&lt;br /&gt;
      @questions[questionnaire_symbol] = questionnaire.questions&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 @@ -270,10 +266,10 @@ def update&lt;br /&gt;
    if format(&amp;quot;%.2f&amp;quot;, total_score) != params[:participant][:grade]&lt;br /&gt;
      participant.update_attribute(:grade, params[:participant][:grade])&lt;br /&gt;
      message = if participant.grade.nil?&lt;br /&gt;
           &amp;quot;The computed score will be used for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                else&lt;br /&gt;
                  &amp;quot;A score of &amp;quot; + params[:participant][:grade] + &amp;quot;% has been saved for &amp;quot; + participant.user.name + &amp;quot;.&amp;quot;&lt;br /&gt;
                end&lt;br /&gt;
    end&lt;br /&gt;
    flash[:note] = message&lt;br /&gt;
    redirect_to action: 'edit', id: params[:id]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121088</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121088"/>
		<updated>2018-12-07T00:09:02Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/controllers/grades_controller.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
 @@ -55,29 +22,35 @@&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 @@ -89,7 +62,7 @@&lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
 @@ -130,12 +103,12 @@&lt;br /&gt;
        chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
 @@ -150,18 +123,13 @@&lt;br /&gt;
       function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 @@ -177,9 +145,9 @@&lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 @@ -192,7 +160,7 @@&lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 @@ -208,16 +176,16 @@&lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
 newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
 @@ -249,15 +217,15 @@&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 @@ -285,7 +253,7 @@&lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
 'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 @@ -82,17 +82,17 @@ def assign_minmax(questionnaires)&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121087</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121087"/>
		<updated>2018-12-07T00:08:36Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/views/grades/_criteria_charts.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
 @@ -55,29 +22,35 @@&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 @@ -89,7 +62,7 @@&lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
 @@ -130,12 +103,12 @@&lt;br /&gt;
        chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
 @@ -150,18 +123,13 @@&lt;br /&gt;
       function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 @@ -177,9 +145,9 @@&lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 @@ -192,7 +160,7 @@&lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 @@ -208,16 +176,16 @@&lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
 newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
 @@ -249,15 +217,15 @@&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 @@ -285,7 +253,7 @@&lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== app/controllers/grades_controller.rb ==&lt;br /&gt;
&lt;br /&gt;
'Student'].include? current_role_name and&lt;br /&gt;
        are_needed_authorizations_present?(params[:id], &amp;quot;reader&amp;quot;, &amp;quot;reviewer&amp;quot;) and&lt;br /&gt;
        check_self_review_status&lt;br /&gt;
 when 'view_team'&lt;br /&gt;
      if ['Student'].include? current_role_name # students can only see the head map for their own team&lt;br /&gt;
        participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
        session[:user].id == participant.user_id&lt;br /&gt;
      else&lt;br /&gt;
 true&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      ['Instructor',&lt;br /&gt;
       'Teaching Assistant',&lt;br /&gt;
       'Administrator',&lt;br /&gt;
       'Super-Administrator'].include? current_role_name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 @@ -82,17 +82,17 @@ def assign_minmax(questionnaires)&lt;br /&gt;
      next if questionnaire.symbol != :review&lt;br /&gt;
      round = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id).first.used_in_round&lt;br /&gt;
      next if round.nil?&lt;br /&gt;
  @minmax[round - 1] = []&lt;br /&gt;
      @minmax[round - 1][0] = if !questionnaire.min_question_score.nil? and questionnaire.min_question_score &amp;lt; 0&lt;br /&gt;
                                questionnaire.min_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                0&lt;br /&gt;
                              end&lt;br /&gt;
      @minmax[round - 1][1] = if !questionnaire.max_question_score.nil?&lt;br /&gt;
                                questionnaire.max_question_score&lt;br /&gt;
                              else&lt;br /&gt;
                                5&lt;br /&gt;
                              end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121086</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121086"/>
		<updated>2018-12-06T23:53:36Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* app/views/grades/_criteria_charts.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
 @@ -55,29 +22,35 @@&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
 for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
  var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
  round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
 @@ -89,7 +62,7 @@&lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
 @@ -130,12 +103,12 @@&lt;br /&gt;
        chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
 function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
 @@ -150,18 +123,13 @@&lt;br /&gt;
       function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
 }&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
 @@ -177,9 +145,9 @@&lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
 @@ -192,7 +160,7 @@&lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
 for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
 @@ -208,16 +176,16 @@&lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
 newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
 @@ -249,15 +217,15 @@&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
 while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
 @@ -285,7 +253,7 @@&lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; &lt;br /&gt;
 onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show &lt;br /&gt;
 Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121085</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=121085"/>
		<updated>2018-12-06T23:49:25Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
== app/views/grades/_criteria_charts.html.erb ==&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;chartdata_information&amp;quot;, data: {chartdata: @chartdata} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;%= content_tag :div, class: &amp;quot;text_information&amp;quot;, data: {text: @text} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;%= content_tag :div, class: &amp;quot;minmax_information&amp;quot;, data: {minmax: @minmax} do %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://www.gstatic.com/charts/loader.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
      google.charts.load('current', {packages: ['corechart', 'bar']});&lt;br /&gt;
@@ -55,29 +22,35 @@&lt;br /&gt;
       //Display Options&lt;br /&gt;
      var showLabels = true;&lt;br /&gt;
      var barColors = [ // Other colors generated from the expertiza base red&lt;br /&gt;
          '#A90201',    // using paletton.com&lt;br /&gt;
          '#018701',&lt;br /&gt;
          '#016565',&lt;br /&gt;
          '#A94D01'&lt;br /&gt;
      ];&lt;br /&gt;
      function getData(){ //Loads all chart data from the page&lt;br /&gt;
        chartData = $('.chartdata_information').data('chartdata');&lt;br /&gt;
        chartText = $('.text_information').data('text');&lt;br /&gt;
        chartRange = $('.minmax_information').data('minmax');&lt;br /&gt;
for (var i = 0; i &amp;lt; chartData.length; i++){ //Set all the criteriaSelected to true&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for (var j = 0; j &amp;lt; chartData[i].length; j++){&lt;br /&gt;
            criteria.push(true);&lt;br /&gt;
          }&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
        }&lt;br /&gt;
     }&lt;br /&gt;
       function generateData() {	//Generates random data for testing&lt;br /&gt;
        var rounds = 3;&lt;br /&gt;
        for(var i = 0; i &amp;lt; rounds; i++) {&lt;br /&gt;
 var criteriaNum = Math.floor(Math.random() * 5 + 5);  //Random number of criteria&lt;br /&gt;
          var round = [];&lt;br /&gt;
          var criteria = [];&lt;br /&gt;
          for(var j = 0; j &amp;lt; criteriaNum; j++) {&lt;br /&gt;
 round.push(Math.floor(Math.random() * 101));  //Random score for each criterion&lt;br /&gt;
            criteria.push(true);  //Everything starts out true&lt;br /&gt;
          }&lt;br /&gt;
          chartData.push(round);&lt;br /&gt;
          criteriaSelected.push(criteria);&lt;br /&gt;
@@ -89,7 +62,7 @@&lt;br /&gt;
        chartOptions = {		//Render options for the chart&lt;br /&gt;
          title: 'Class Average on Criteria',&lt;br /&gt;
          titleTextStyle: {&lt;br /&gt;
  fontName: 'arial',&lt;br /&gt;
            fontSize: 18,&lt;br /&gt;
            italic: false,&lt;br /&gt;
            bold: true&lt;br /&gt;
@@ -130,12 +103,12 @@&lt;br /&gt;
        chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));&lt;br /&gt;
        var checkBox = document.getElementById(&amp;quot;labelCheck&amp;quot;);&lt;br /&gt;
        checkBox.checked = true;&lt;br /&gt;
        checkBox.style.display = &amp;quot;inline&amp;quot;;&lt;br /&gt;
        updateChart(currentRound);&lt;br /&gt;
        loadRounds(); }&lt;br /&gt;
function updateChart(roundNum) {	//Updates the chart with a new round number and renders&lt;br /&gt;
        currentRound = roundNum;&lt;br /&gt;
        renderChart();&lt;br /&gt;
        loadCriteria();&lt;br /&gt;
@@ -150,18 +123,13 @@&lt;br /&gt;
       function renderChart() {	//Renders the chart if changes have been made&lt;br /&gt;
          var data = loadData();&lt;br /&gt;
 chartOptions.vAxis.viewWindow.max = 5;&lt;br /&gt;
          chartOptions.vAxis.viewWindow.min = 0;&lt;br /&gt;
          if (chartRange[currentRound]) { //Set axis ranges if they exist&lt;br /&gt;
              if (chartRange[currentRound][1])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.max = chartRange[currentRound][1];&lt;br /&gt;
 if (chartRange[currentRound][0])&lt;br /&gt;
                  chartOptions.vAxis.viewWindow.min = chartRange[currentRound][0];&lt;br /&gt;
}&lt;br /&gt;
          chart.draw(data, chartOptions);&lt;br /&gt;
      }&lt;br /&gt;
@@ -177,9 +145,9 @@&lt;br /&gt;
           chartOptions.hAxis.ticks = [];&lt;br /&gt;
          var rowCount = 1;&lt;br /&gt;
 for(var i = 0; i &amp;lt; chartData[currentRound].length; i++) { //Add a chart row for each criterion if not null&lt;br /&gt;
              if (criteriaSelected[currentRound][i] &amp;amp;&amp;amp; chartData[currentRound][i]) {&lt;br /&gt;
  data.addRow([rowCount, chartData[currentRound][i], barColors[0], (showLabels) ? chartData[currentRound][i].toFixed(1).toString() : &amp;quot;&amp;quot;]);&lt;br /&gt;
                  chartOptions.hAxis.ticks.push({v: rowCount++, f: (i+1).toString()});&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
@@ -192,7 +160,7 @@&lt;br /&gt;
          var data = new google.visualization.DataTable();&lt;br /&gt;
          data.addColumn('number', 'Criterion');&lt;br /&gt;
          var i;&lt;br /&gt;
for(i = 0; i &amp;lt; roundNum; i++) { //Add all columns for the data&lt;br /&gt;
              data.addColumn('number', 'Round ' + (i+1).toString());&lt;br /&gt;
              data.addColumn({type: 'string', role: 'style'});	//column for specifying the bar color&lt;br /&gt;
              data.addColumn({type: 'string', role: 'annotation'});&lt;br /&gt;
@@ -208,16 +176,16 @@&lt;br /&gt;
              var newRow = [];&lt;br /&gt;
              var elementsAdded = false;&lt;br /&gt;
              newRow.push(rowCount);&lt;br /&gt;
 for(var j = 0; j &amp;lt; roundNum; j++) { //If the round has the criterion, add it&lt;br /&gt;
                  if (chartData[j][i]) {&lt;br /&gt;
                      newRow.push(chartData[j][i]);&lt;br /&gt;
                      elementsAdded = true;&lt;br /&gt;
                  } else {&lt;br /&gt;
                      newRow.push(null);&lt;br /&gt;
                  }&lt;br /&gt;
  newRow.push(barColors[j % barColors.length]); //Add column color&lt;br /&gt;
                  if (chartData[j] &amp;amp;&amp;amp; chartData[j][i] &amp;amp;&amp;amp; showLabels)&lt;br /&gt;
 newRow.push(chartData[j][i].toFixed(1).toString()); //Add column annotations&lt;br /&gt;
                  else&lt;br /&gt;
                      newRow.push(&amp;quot;&amp;quot;);&lt;br /&gt;
              }&lt;br /&gt;
@@ -249,15 +217,15 @@&lt;br /&gt;
       function loadCriteria() {	//Creates the criteria check boxes&lt;br /&gt;
          var form = document.getElementById(&amp;quot;chartCriteria&amp;quot;);&lt;br /&gt;
while (form.firstChild) //Clear out the old check boxes&lt;br /&gt;
              form.removeChild(form.firstChild);&lt;br /&gt;
 if (currentRound == -1) //Don't show criteria for 'all rounds'&lt;br /&gt;
              return;&lt;br /&gt;
          chartData[currentRound].forEach(function(dat, i) {&lt;br /&gt;
              var checkbox = document.createElement('input');&lt;br /&gt;
              checkbox.type = &amp;quot;checkbox&amp;quot;;&lt;br /&gt;
              checkbox.id = &amp;quot;checkboxoption&amp;quot; + i;&lt;br /&gt;
 checkbox.onclick = function() { //Register callback to toggle the criterion&lt;br /&gt;
                  checkboxUpdate(i);&lt;br /&gt;
              }&lt;br /&gt;
              var label = document.createElement('label')&lt;br /&gt;
@@ -285,7 +253,7 @@&lt;br /&gt;
    &amp;lt;form id=&amp;quot;chartOptions&amp;quot; name=&amp;quot;chartOptions&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;select id=&amp;quot;chartRounds&amp;quot; name=&amp;quot;rounds&amp;quot; onChange=&amp;quot;updateChart(document.chartOptions.chartRounds.options[document.chartOptions.chartRounds.options.selectedIndex].value)&amp;quot; style = &amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/select&amp;gt;&lt;br /&gt;
 &amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id = &amp;quot;labelCheck&amp;quot; checked=&amp;quot;checked&amp;quot; style=&amp;quot;display: none&amp;quot; onclick=&amp;quot;showLabels = !showLabels; renderChart();&amp;quot;&amp;gt;Show Labels&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;chartCriteria&amp;quot; name=&amp;quot;chartCriteria&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;br /&gt;
&lt;br /&gt;
===JavaScript Chart===&lt;br /&gt;
To validate all functionality of the chart when adding new features or fixing old ones, the following criteria were tested manually for expected functionality:&lt;br /&gt;
&lt;br /&gt;
# Chart is displaying correctly&lt;br /&gt;
## Bars are showing up where expected&lt;br /&gt;
## Bar annotations are showing the expected value&lt;br /&gt;
## Criteria labels are for the correct bar and displaying correct values&lt;br /&gt;
## Hover text is displaying the correct values&lt;br /&gt;
## Null values are not present on the chart&lt;br /&gt;
## Correct colors are used for the multi-round view&lt;br /&gt;
# Show Labels checkbox works as expected&lt;br /&gt;
# Round Criteria is displaying correctly&lt;br /&gt;
## Round dropdown menu shows all rounds for the assignment&lt;br /&gt;
## Selecting a round changes the criteria checkboxes&lt;br /&gt;
## All checkboxes are displayed with appropriate text&lt;br /&gt;
## Checkboxes correctly remove or add criterion bars to the chart&lt;br /&gt;
&lt;br /&gt;
===RSpec Tests===&lt;br /&gt;
RSpec tests were added to validate functionality of the helper methods that were added to the grades controller.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120952</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120952"/>
		<updated>2018-12-04T22:19:08Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:1859_Chart_Preview.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 5 rubric criteria in Round 1 selected by the instructor. A live demo with randomly generated data can be found on [https://jsfiddle.net/Jereman/5uxqr92y/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120700</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120700"/>
		<updated>2018-11-21T04:18:57Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:A3.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:2411C.png&amp;diff=120699</id>
		<title>File:2411C.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:2411C.png&amp;diff=120699"/>
		<updated>2018-11-21T04:18:19Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120397</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120397"/>
		<updated>2018-11-20T22:34:44Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Try.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Try.jpg&amp;diff=120396</id>
		<title>File:Try.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Try.jpg&amp;diff=120396"/>
		<updated>2018-11-20T22:34:08Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120394</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120394"/>
		<updated>2018-11-20T22:28:00Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120393</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120393"/>
		<updated>2018-11-20T22:27:40Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:Oodd4.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120390</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120390"/>
		<updated>2018-11-20T22:19:16Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:A2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120389</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120389"/>
		<updated>2018-11-20T22:18:38Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
   a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
   b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:A2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:A2.JPG&amp;diff=120387</id>
		<title>File:A2.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:A2.JPG&amp;diff=120387"/>
		<updated>2018-11-20T22:17:57Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120385</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120385"/>
		<updated>2018-11-20T22:16:27Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
   a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
   b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:oodd4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd4.JPG&amp;diff=120384</id>
		<title>File:Oodd4.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd4.JPG&amp;diff=120384"/>
		<updated>2018-11-20T22:14:08Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: uploaded a new version of &amp;amp;quot;File:Oodd4.JPG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120383</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120383"/>
		<updated>2018-11-20T22:13:25Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
   a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
   b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120382</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120382"/>
		<updated>2018-11-20T22:12:43Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
   a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
   b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120381</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120381"/>
		<updated>2018-11-20T22:12:08Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on 'view score' icon of an assignment. The summary report page of the selected assignment comes up.&lt;br /&gt;
[[File:A0.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Following are mockup screens which we wish to create:&lt;br /&gt;
&lt;br /&gt;
   a) Instructor would select the round and rubric criteria of the assignment for which he/she wants to view the class performance.&lt;br /&gt;
 &lt;br /&gt;
[[File:A1.jpg]]&lt;br /&gt;
&lt;br /&gt;
   b) The bar graph of the class performance for those criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd4.JPG&amp;diff=120378</id>
		<title>File:Oodd4.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd4.JPG&amp;diff=120378"/>
		<updated>2018-11-20T22:04:36Z</updated>

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

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:A0.jpg&amp;diff=120376</id>
		<title>File:A0.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:A0.jpg&amp;diff=120376"/>
		<updated>2018-11-20T22:04:02Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120347</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=120347"/>
		<updated>2018-11-20T20:40:06Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Purpose ==&lt;br /&gt;
Our task is to provide an interactive visualization or a table for instructors that shows how their class performed on selected rubric criteria. Such feature would be immensely helpful for instructors as it would assist them to identify what they need to focus more attention on. For example, creating a graph showing the average scores for all or a certain subset of main rubric criteria (questionnaire). If the average score of the class on selected criteria (question) is low means the instructor can emphasize more on the learning materials related to it.&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
== Project Design ==&lt;br /&gt;
&lt;br /&gt;
==== Design Flow ==== &lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
==== Tools and Design Choice ====&lt;br /&gt;
&lt;br /&gt;
We plan to use the lightweight [https://developers.google.com/chart/ Google Charts] library for displaying the chart data on the page, with standard HTML for all of the options and dropdowns for option selection. Google Charts was chosen because of its high compatibility, full option set, and comparable graphical quality to the rest of expertiza while keeping a small JS footprint, which should help prevent slow page responsiveness.&lt;br /&gt;
&lt;br /&gt;
==== Visualization ====&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed. &lt;br /&gt;
&lt;br /&gt;
[[File:JsfiddleBarChart.png]]&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor. The code and live demo can be found on [https://jsfiddle.net/Jereman/5uxqr92y/51/ JSFiddle]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping. Hopefully there is only slight controller modifications necessary, as the chart can use the existing information collected by controller methods to display the raw details on the existing page.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
The specification of the project does not require us to use automated tests. However, we plan to test the modified ruby code or the new features that will be added to the grades_controller. We will be approaching [http://rspec.info/ RSpec] testing framework. For the javascript, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119878</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119878"/>
		<updated>2018-11-14T00:30:28Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* Visualization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Visualization ==&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above graph shows average score of the class for 10 rubric criteria selected by the instructor.&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119873</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119873"/>
		<updated>2018-11-14T00:26:05Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Expertiza is an online assignment grading platform. Instructors can create assignments and implement peer reviews for submitted assignments. This project concerns the creation of a system for visualizing student performance on those assignments, primarily as graded in peer reviews. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Visualization ==&lt;br /&gt;
&lt;br /&gt;
The following graph shows the expected view of the 'view scores' page. The instructor selects a subset of rubric criteria for which he/she wants to know how a class performed. A bar graph of the average score of the class for that subset of criteria would be displayed.&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline-block&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Hw4.png&amp;diff=119541</id>
		<title>File:Hw4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Hw4.png&amp;diff=119541"/>
		<updated>2018-11-12T23:02:47Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: uploaded a new version of &amp;amp;quot;File:Hw4.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119540</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119540"/>
		<updated>2018-11-12T23:00:48Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project concerns the creation of a system for visualizing student performance on assignments in the Expertiza system. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119539</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119539"/>
		<updated>2018-11-12T23:00:31Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project concerns the creation of a system for visualizing student performance on assignments in the Expertiza system. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.pn]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119538</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119538"/>
		<updated>2018-11-12T23:00:10Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project concerns the creation of a system for visualizing student performance on assignments in the Expertiza system. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119537</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119537"/>
		<updated>2018-11-12T22:59:22Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project concerns the creation of a system for visualizing student performance on assignments in the Expertiza system. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:hw4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119536</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119536"/>
		<updated>2018-11-12T22:58:46Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project concerns the creation of a system for visualizing student performance on assignments in the Expertiza system. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:HW4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119535</id>
		<title>E1859 Visualizations for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1859_Visualizations_for_Instructors&amp;diff=119535"/>
		<updated>2018-11-12T22:58:32Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project concerns the creation of a system for visualizing student performance on assignments in the Expertiza system. Graphs will be made to show various rubric criteria and the class' performance on the criteria. If the criteria are the same for multiple stages of review, an instructor should be able to compare performance over time or between reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Proposed Changes ==&lt;br /&gt;
The visualizations will be implemented as either a single or stacked bar chart with a bar for each of the selected criteria to be observed. If a single bar, then the height of the bar will be the total class average, but a stacked bar chart may be better to show the percentage of the class that received each score. The changes made to the expertiza project will primarily include HTML/ERB changes to the view files to accommodate the added charts on the page and the necessary javascript to allow responsive design. Brief controller modifications will be made to facilitate database filtering to get the displayed data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Flow ==&lt;br /&gt;
&lt;br /&gt;
The flowchart representing graphical flow of an instructor visiting view scores under assignments is given below:&lt;br /&gt;
&lt;br /&gt;
[[File:File.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Involved ==&lt;br /&gt;
We plan to work on the files that the previous team were involved with such as controllers of grade and assignment and the view of grade and review_mapping.&lt;br /&gt;
&lt;br /&gt;
Proposed files:&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb &lt;br /&gt;
&lt;br /&gt;
app/views/grades/_teams.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_title.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/_team_charts.html.erb&lt;br /&gt;
&lt;br /&gt;
app/view/review_mapping/_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We plan to test the modified ruby code or the new features that will be added to the controllers. We will be approaching RSpec testing framework. For the javascripts, the tests will be conducted manually.&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Hw4.png&amp;diff=119534</id>
		<title>File:Hw4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Hw4.png&amp;diff=119534"/>
		<updated>2018-11-12T22:57:44Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=119083</id>
		<title>E1844 Issues related to names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=119083"/>
		<updated>2018-11-09T20:16:36Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, teams are created for every homework. Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. The team names should be of the form &amp;quot;Team_random_number&amp;quot;. Also currently, the usernames can have spaces in them but then you cannot impersonate that user. The expertiza should prohibit spaces in usernames.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=='''Issues to be fixed'''==&lt;br /&gt;
&lt;br /&gt;
Issues as described by the problem statement:&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
Team names created by bidding are incorrect&lt;br /&gt;
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Modified Files'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
1) app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
2) app/controllers/suggestion_controller.rb&lt;br /&gt;
&lt;br /&gt;
3) app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
4) spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
1) app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
2) spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Approach used to resolve the issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842 '''===&lt;br /&gt;
&lt;br /&gt;
Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, course and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format. A single team name format was fixed, i.e. 'Team_random_no' (e.g. Team_51) and all the automatically generated teams were assigned a team name with the standardized format. &lt;br /&gt;
&lt;br /&gt;
Pseudocode standardizing auto-generated team names throughout expertiza&lt;br /&gt;
&lt;br /&gt;
 Identify all the create methods for teams that are generated automatically&lt;br /&gt;
 Modify the team name passed to the team create or generate methods to the standardized format&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982 '''===&lt;br /&gt;
Expertiza allows spaces in username. But, if a user has username with spaces then that user cannot be impersonated by an instructor. Thus, the task is to prohibit users from having spaces in usernames.  &lt;br /&gt;
&lt;br /&gt;
Pseudocode representing the logic we have used to modify app_models_user.rb&lt;br /&gt;
 &lt;br /&gt;
 If username has spaces&lt;br /&gt;
  disallow spaces using regex  /\s/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Login Credentials'''==&lt;br /&gt;
1.) Login as instructor,&lt;br /&gt;
    Username: instructor6&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
2.) Login as student,&lt;br /&gt;
    Username: student7348&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
    Username:student7349&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
=='''Development'''==&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
Following are the identified team creation methods and corresponding code changes:&lt;br /&gt;
&lt;br /&gt;
===='''app/controllers/lottery_controller.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:lottery_controller.png]]&lt;br /&gt;
&lt;br /&gt;
===='''app/controllers/suggestion_controller.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:suggestion_controller.png]]&lt;br /&gt;
&lt;br /&gt;
===='''app/models/team.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:team_model.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
The validation check has been added to the model of the user class so that no white spaces are present in the username :&lt;br /&gt;
&lt;br /&gt;
===='''app/models/user.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:User_rb.JPG]]&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
===='''Steps performed'''====&lt;br /&gt;
&lt;br /&gt;
1)Login as Instructor, create an OSS assignment for bidding with all the necessary details like maximum no of users per team, add topics for the assignment, add participants(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2)Login as a Student(say Student7348), whom you have enrolled in the assignment. You should be able to see the assignment now in the Assignment section.&lt;br /&gt;
&lt;br /&gt;
3)Click on the assignment and then click on 'Your team'. &lt;br /&gt;
&lt;br /&gt;
4)Invite a student(say Student7349) whom you have also added as a participant in your assignment, to be your teammate. &lt;br /&gt;
&lt;br /&gt;
5)Login as student7349 and accept student7348's request to join his/her team.&lt;br /&gt;
&lt;br /&gt;
6)Now, the team name would appear on the top section of the webpage. The team name would be of format : Team_RandomNumber ( say Team_21 ).&lt;br /&gt;
&lt;br /&gt;
===='''Screenshots from conducted Test '''====&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on copy assignment icon and edit the information as per requirement. A new assignment would be created.&lt;br /&gt;
&lt;br /&gt;
[[File:S2.JPG]]&lt;br /&gt;
&lt;br /&gt;
3. Now login as student7609 and click on 'Test Assignment'(assignment that you have created as an instructor) under Assignment tab.&lt;br /&gt;
&lt;br /&gt;
[[File:S6.JPG]]&lt;br /&gt;
&lt;br /&gt;
4. Click on 'your team' and send teammate invitation to another student7508.&lt;br /&gt;
&lt;br /&gt;
[[File:S4.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Now login as Student7508 and accept the teammate request of student7609. You can view the team name 'Team_7' at the top of the page which is the required standardized format.&lt;br /&gt;
&lt;br /&gt;
[[File:S5.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''RSpec'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
The existing Rspec test is modified so that the expected value of the team name is modified to the new format.&lt;br /&gt;
&lt;br /&gt;
===='''spec/controllers/team_spec.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:team_spec.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
The existing Rspec file user_spec.rb is modified in order to add another test case to validate the use of white spaces in the username.&lt;br /&gt;
&lt;br /&gt;
===='''spec/models/user_spec.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:User_rspec.JPG]]&lt;br /&gt;
&lt;br /&gt;
=='''External Links'''==&lt;br /&gt;
&lt;br /&gt;
[http://152.46.17.167:8080 Link to Expertiza deployed on VCL]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1261 Pull request for issue #842]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1259 Pull request for issue #982]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/shraddha-dhyade/expertiza/tree/842_standardizing_team_names Github branch for issue #842]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/shraddha-dhyade/expertiza/tree/982_validation_username Github branch for issue #982]&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=119082</id>
		<title>E1844 Issues related to names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=119082"/>
		<updated>2018-11-09T20:15:09Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, teams are created for every homework. Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. The team names should be of the form &amp;quot;Team_random_number&amp;quot;. Also currently, the usernames can have spaces in them but then you cannot impersonate that user. The expertiza should prohibit spaces in usernames.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=='''Issues to be fixed'''==&lt;br /&gt;
&lt;br /&gt;
Issues as described by the problem statement:&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
Team names created by bidding are incorrect&lt;br /&gt;
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Modified Files'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
1) app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
2) app/controllers/suggestion_controller.rb&lt;br /&gt;
&lt;br /&gt;
3) app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
4) spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
1) app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
2) spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Approach used to resolve the issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842 '''===&lt;br /&gt;
&lt;br /&gt;
Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, course and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format. A single team name format was fixed, i.e. 'Team_random_no' (e.g. Team_51) and all the automatically generated teams were assigned a team name with the standardized format. &lt;br /&gt;
&lt;br /&gt;
Pseudocode standardizing auto-generated team names throughout expertiza&lt;br /&gt;
&lt;br /&gt;
 Identify all the create methods for teams that are generated automatically&lt;br /&gt;
 Modify the team name passed to the team create or generate methods to the standardized format&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982 '''===&lt;br /&gt;
Expertiza allows spaces in username. But, if a user has username with spaces then that user cannot be impersonated by an instructor. Thus, the task is to prohibit users from having spaces in usernames.  &lt;br /&gt;
&lt;br /&gt;
Pseudocode representing the logic we have used to modify app_models_user.rb&lt;br /&gt;
 &lt;br /&gt;
 If username has spaces&lt;br /&gt;
  disallow spaces using regex  /\s/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Login Credentials'''==&lt;br /&gt;
1.) Login as instructor,&lt;br /&gt;
    Username: instructor6&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
2.) Login as student,&lt;br /&gt;
    Username: student7348&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
    Username:student7349&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
=='''Development'''==&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
Following are the identified team creation methods and corresponding code changes:&lt;br /&gt;
&lt;br /&gt;
===='''app/controllers/lottery_controller.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:lottery_controller.png]]&lt;br /&gt;
&lt;br /&gt;
===='''app/controllers/suggestion_controller.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:suggestion_controller.png]]&lt;br /&gt;
&lt;br /&gt;
===='''app/models/team.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:team_model.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
The validation check has been added to the model of the user class so that no white spaces are present in the username :&lt;br /&gt;
&lt;br /&gt;
===='''app/models/user.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:User_rb.JPG]]&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
===='''Steps performed'''====&lt;br /&gt;
&lt;br /&gt;
1)Login as Instructor, create an OSS assignment for bidding with all the necessary details like maximum no of users per team, add topics for the assignment, add participants(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2)Login as a Student(say Student7348), whom you have enrolled in the assignment. You should be able to see the assignment now in the Assignment section.&lt;br /&gt;
&lt;br /&gt;
3)Click on the assignment and then click on 'Your team'. &lt;br /&gt;
&lt;br /&gt;
4)Invite a student(say Student7349) whom you have also added as a participant in your assignment, to be your teammate. &lt;br /&gt;
&lt;br /&gt;
5)Login as student B and accept A's request to join his/her team.&lt;br /&gt;
&lt;br /&gt;
6)Now, the team name would appear on the top section of the webpage. The team name would be of format : Team_RandomNumber ( say Team_21 ).&lt;br /&gt;
&lt;br /&gt;
===='''Screenshots from conducted Test '''====&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on copy assignment icon and edit the information as per requirement. A new assignment would be created.&lt;br /&gt;
&lt;br /&gt;
[[File:S2.JPG]]&lt;br /&gt;
&lt;br /&gt;
3. Now login as student7609 and click on 'Test Assignment'(assignment that you have created as an instructor) under Assignment tab.&lt;br /&gt;
&lt;br /&gt;
[[File:S6.JPG]]&lt;br /&gt;
&lt;br /&gt;
4. Click on 'your team' and send teammate invitation to another student7508.&lt;br /&gt;
&lt;br /&gt;
[[File:S4.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Now login as Student7508 and accept the teammate request of student7609. You can view the team name 'Team_7' at the top of the page which is the required standardized format.&lt;br /&gt;
&lt;br /&gt;
[[File:S5.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''RSpec'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
The existing Rspec test is modified so that the expected value of the team name is modified to the new format.&lt;br /&gt;
&lt;br /&gt;
===='''spec/controllers/team_spec.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:team_spec.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
The existing Rspec file user_spec.rb is modified in order to add another test case to validate the use of white spaces in the username.&lt;br /&gt;
&lt;br /&gt;
===='''spec/models/user_spec.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:User_rspec.JPG]]&lt;br /&gt;
&lt;br /&gt;
=='''External Links'''==&lt;br /&gt;
&lt;br /&gt;
[http://152.46.17.167:8080 Link to Expertiza deployed on VCL]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1261 Pull request for issue #842]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1259 Pull request for issue #982]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/shraddha-dhyade/expertiza/tree/842_standardizing_team_names Github branch for issue #842]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/shraddha-dhyade/expertiza/tree/982_validation_username Github branch for issue #982]&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=119081</id>
		<title>E1844 Issues related to names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=119081"/>
		<updated>2018-11-09T20:11:48Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, teams are created for every homework. Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. The team names should be of the form &amp;quot;Team_random_number&amp;quot;. Also currently, the usernames can have spaces in them but then you cannot impersonate that user. The expertiza should prohibit spaces in usernames.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=='''Issues to be fixed'''==&lt;br /&gt;
&lt;br /&gt;
Issues as described by the problem statement:&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
Team names created by bidding are incorrect&lt;br /&gt;
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Modified Files'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
1) app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
2) app/controllers/suggestion_controller.rb&lt;br /&gt;
&lt;br /&gt;
3) app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
4) spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
1) app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
2) spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Approach used to resolve the issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842 '''===&lt;br /&gt;
&lt;br /&gt;
Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, course and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format. A single team name format was fixed, i.e. 'Team_random_no' (e.g. Team_51) and all the automatically generated teams were assigned a team name with the standardized format. &lt;br /&gt;
&lt;br /&gt;
Pseudocode standardizing auto-generated team names throughout expertiza&lt;br /&gt;
&lt;br /&gt;
 Identify all the create methods for teams that are generated automatically&lt;br /&gt;
 Modify the team name passed to the team create or generate methods to the standardized format&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982 '''===&lt;br /&gt;
Expertiza allows spaces in username. But, if a user has username with spaces then that user cannot be impersonated by an instructor. Thus, the task is to prohibit users from having spaces in usernames.  &lt;br /&gt;
&lt;br /&gt;
Pseudocode representing the logic we have used to modify app_models_user.rb&lt;br /&gt;
 &lt;br /&gt;
 If username has spaces&lt;br /&gt;
  disallow spaces using regex  /\s/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Login Credentials'''==&lt;br /&gt;
1.) Login as instructor,&lt;br /&gt;
    Username: instructor6&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
2.) Login as student,&lt;br /&gt;
    Username: student7348&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
    Username:student7349&lt;br /&gt;
    Password: password&lt;br /&gt;
&lt;br /&gt;
=='''Development'''==&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
Following are the identified team creation methods and corresponding code changes:&lt;br /&gt;
&lt;br /&gt;
===='''app/controllers/lottery_controller.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:lottery_controller.png]]&lt;br /&gt;
&lt;br /&gt;
===='''app/controllers/suggestion_controller.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:suggestion_controller.png]]&lt;br /&gt;
&lt;br /&gt;
===='''app/models/team.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:team_model.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
The validation check has been added to the model of the user class so that no white spaces are present in the username :&lt;br /&gt;
&lt;br /&gt;
===='''app/models/user.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:User_rb.JPG]]&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
===='''Steps performed'''====&lt;br /&gt;
&lt;br /&gt;
1)Login as Instructor, create an OSS assignment for bidding with all the necessary details like maximum no of users per team, add topics for the assignment, add participants(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2)Login as a Student(say A), say student A, whom you have enrolled in the assignment. You should be able to see the assignment now in the Assignment section.&lt;br /&gt;
&lt;br /&gt;
3)Click on the assignment and then click on 'Your team'. &lt;br /&gt;
&lt;br /&gt;
4)Invite a student(say B) to be your teammate. &lt;br /&gt;
&lt;br /&gt;
5)Login as student B and accept A's request to join his/her team.&lt;br /&gt;
&lt;br /&gt;
6)Now, the team name would appear on the top section of the webpage. The team name would be of format : Team_RandomNumber ( say Team_21 ).&lt;br /&gt;
&lt;br /&gt;
===='''Screenshots from conducted Test '''====&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on copy assignment icon and edit the information as per requirement. A new assignment would be created.&lt;br /&gt;
&lt;br /&gt;
[[File:S2.JPG]]&lt;br /&gt;
&lt;br /&gt;
3. Now login as student7609 and click on 'Test Assignment'(assignment that you have created as an instructor) under Assignment tab.&lt;br /&gt;
&lt;br /&gt;
[[File:S6.JPG]]&lt;br /&gt;
&lt;br /&gt;
4. Click on 'your team' and send teammate invitation to another student7508.&lt;br /&gt;
&lt;br /&gt;
[[File:S4.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Now login as Student7508 and accept the teammate request of student7609. You can view the team name 'Team_7' at the top of the page which is the required standardized format.&lt;br /&gt;
&lt;br /&gt;
[[File:S5.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''RSpec'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
The existing Rspec test is modified so that the expected value of the team name is modified to the new format.&lt;br /&gt;
&lt;br /&gt;
===='''spec/controllers/team_spec.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:team_spec.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
The existing Rspec file user_spec.rb is modified in order to add another test case to validate the use of white spaces in the username.&lt;br /&gt;
&lt;br /&gt;
===='''spec/models/user_spec.rb'''====&lt;br /&gt;
&lt;br /&gt;
[[File:User_rspec.JPG]]&lt;br /&gt;
&lt;br /&gt;
=='''External Links'''==&lt;br /&gt;
&lt;br /&gt;
[http://152.46.17.167:8080 Link to Expertiza deployed on VCL]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1261 Pull request for issue #842]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1259 Pull request for issue #982]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/shraddha-dhyade/expertiza/tree/842_standardizing_team_names Github branch for issue #842]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/shraddha-dhyade/expertiza/tree/982_validation_username Github branch for issue #982]&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=118523</id>
		<title>E1844 Issues related to names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=118523"/>
		<updated>2018-11-03T03:06:14Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, teams are created for every homework. Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. The team names should be of the form &amp;quot;Team_random_number&amp;quot;. Also currently, the usernames can have spaces in them but then you cannot impersonate that user. The expertiza should prohibit spaces in usernames.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=='''Issues to be fixed'''==&lt;br /&gt;
&lt;br /&gt;
Issues as described by the problem statement:&lt;br /&gt;
&lt;br /&gt;
Issue #842: Team names created by bidding are incorrect&lt;br /&gt;
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.&lt;br /&gt;
&lt;br /&gt;
Issue #982: Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Modified Files'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
1) app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
2) app/controllers/suggestion_controller.rb&lt;br /&gt;
&lt;br /&gt;
3) app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
4) spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
1) app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
2) spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Approach used to resolve the issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842 '''===&lt;br /&gt;
&lt;br /&gt;
Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, course and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format. A single team name format was fixed, i.e. 'Team_random_no' (e.g. Team_51) and all the automatically generated teams were assigned a team name with the standardized format. &lt;br /&gt;
&lt;br /&gt;
==='''Issue #982 '''===&lt;br /&gt;
Expertiza allows spaces in username. But, if a user has username with spaces then that user cannot be impersonated by an instructor. Thus, the task is to prohibit users from having spaces in usernames.  &lt;br /&gt;
&lt;br /&gt;
Pseudocode representing the logic we have used to modify app_models_user.rb&lt;br /&gt;
 &lt;br /&gt;
 If username has spaces&lt;br /&gt;
  disallow spaces using regex  /\s/&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
1)Login as Instructor, create an OSS assignment for bidding with all the necessary details like maximum no of users per team, add topics for the assignment, add participants(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2)Login as a Student(say A), say student A, whom you have enrolled in the assignment. You should be able to see the assignment now in the Assignment section.&lt;br /&gt;
&lt;br /&gt;
3)Click on the assignment and then click on 'Your team'. &lt;br /&gt;
&lt;br /&gt;
4)Invite a student(say B) to be your teammate. &lt;br /&gt;
&lt;br /&gt;
5)Login as student B and accept A's request to join his/her team.&lt;br /&gt;
&lt;br /&gt;
6)Now, the team name would appear on the top section of the webpage. The team name would be of format : Team_RandomNumber ( say Team_21 ).&lt;br /&gt;
&lt;br /&gt;
==='''Screenshots from conducted Test '''===&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on copy assignment icon and edit the information as per requirement. A new assignment would be created.&lt;br /&gt;
&lt;br /&gt;
[[File:S2.JPG]]&lt;br /&gt;
&lt;br /&gt;
3. Now login as student7609 and click on 'Test Assignment'(assignment that you have created as an instructor) under Assignment tab.&lt;br /&gt;
&lt;br /&gt;
[[File:S6.JPG]]&lt;br /&gt;
&lt;br /&gt;
4. Click on 'your team' and send teammate invitation to another student7508.&lt;br /&gt;
&lt;br /&gt;
[[File:S4.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Now login as Student7508 and accept the teammate request of student7609. You can view the team name 'Team_7' at the top of the page which is the required standardized format.&lt;br /&gt;
&lt;br /&gt;
[[File:S5.JPG]]&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=118517</id>
		<title>E1844 Issues related to names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=118517"/>
		<updated>2018-11-03T03:04:33Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, teams are created for every homework. Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. The team names should be of the form &amp;quot;Team_random_number&amp;quot;. Also currently, the usernames can have spaces in them but then you cannot impersonate that user. The expertiza should prohibit spaces in usernames.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=='''Issues to be fixed'''==&lt;br /&gt;
&lt;br /&gt;
Issues as described by the problem statement:&lt;br /&gt;
&lt;br /&gt;
Issue #842: Team names created by bidding are incorrect&lt;br /&gt;
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.&lt;br /&gt;
&lt;br /&gt;
Issue #982: Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Modified Files'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
1) app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
2) app/controllers/suggestion_controller.rb&lt;br /&gt;
&lt;br /&gt;
3) app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
4) spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
1) app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
2) spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Approach used to resolve the issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842 '''===&lt;br /&gt;
&lt;br /&gt;
Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, course and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format. A single team name format was fixed, i.e. 'Team_random_no' (e.g. Team_51) and all the automatically generated teams were assigned a team name with the standardized format. &lt;br /&gt;
&lt;br /&gt;
==='''Issue #982 '''===&lt;br /&gt;
Expertiza allows spaces in username. But, if a user has username with spaces then that user cannot be impersonated by an instructor. Thus, the task is to prohibit users from having spaces in usernames.  &lt;br /&gt;
&lt;br /&gt;
Pseudocode representing the logic we have used to modify app_models_user.rb&lt;br /&gt;
 &lt;br /&gt;
 If username has spaces&lt;br /&gt;
  disallow spaces using regex  /\s/&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
1)Login as Instructor, create an OSS assignment for bidding with all the necessary details like maximum no of users per team, add topics for the assignment, add participants(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2)Login as a Student(say A), say student A, whom you have enrolled in the assignment. You should be able to see the assignment now in the Assignment section.&lt;br /&gt;
&lt;br /&gt;
3)Click on the assignment and then click on 'Your team'. &lt;br /&gt;
&lt;br /&gt;
4)Invite a student(say B) to be your teammate. &lt;br /&gt;
&lt;br /&gt;
5)Login as student B and accept A's request to join his/her team.&lt;br /&gt;
&lt;br /&gt;
6)Now, the team name would appear on the top section of the webpage. The team name would be of format : Team_RandomNumber ( say Team_21 ).&lt;br /&gt;
&lt;br /&gt;
==='''Screenshots from conducted Test '''===&lt;br /&gt;
1. On clicking Manage and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on copy assignment icon and edit the information as per requirement. A new assignment would be created.&lt;br /&gt;
&lt;br /&gt;
[[File:S2.JPG]]&lt;br /&gt;
&lt;br /&gt;
3. Now login as student7609 and click on 'Test Assignment'(assignment that you have created as an instructor) under Assignment tab.&lt;br /&gt;
&lt;br /&gt;
[[File:S6.JPG]]&lt;br /&gt;
&lt;br /&gt;
4. Click on 'your team' and send teammate invitation to another student7508.&lt;br /&gt;
&lt;br /&gt;
[[File:S4.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Now login as Student7508 and accept the teammate request of student7609.&lt;br /&gt;
&lt;br /&gt;
[[File:S5.JPG]]&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:S5.JPG&amp;diff=118516</id>
		<title>File:S5.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:S5.JPG&amp;diff=118516"/>
		<updated>2018-11-03T03:04:25Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=118513</id>
		<title>E1844 Issues related to names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1844_Issues_related_to_names&amp;diff=118513"/>
		<updated>2018-11-03T03:03:28Z</updated>

		<summary type="html">&lt;p&gt;Ntripat: /* Screenshots from conducted Test  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, teams are created for every homework. Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. The team names should be of the form &amp;quot;Team_random_number&amp;quot;. Also currently, the usernames can have spaces in them but then you cannot impersonate that user. The expertiza should prohibit spaces in usernames.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=='''Issues to be fixed'''==&lt;br /&gt;
&lt;br /&gt;
Issues as described by the problem statement:&lt;br /&gt;
&lt;br /&gt;
Issue #842: Team names created by bidding are incorrect&lt;br /&gt;
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.&lt;br /&gt;
&lt;br /&gt;
Issue #982: Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Modified Files'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
1) app/controllers/lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
2) app/controllers/suggestion_controller.rb&lt;br /&gt;
&lt;br /&gt;
3) app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
4) spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
==='''Issue #982'''===&lt;br /&gt;
&lt;br /&gt;
1) app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
2) spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Approach used to resolve the issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842 '''===&lt;br /&gt;
&lt;br /&gt;
Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, course and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format. A single team name format was fixed, i.e. 'Team_random_no' (e.g. Team_51) and all the automatically generated teams were assigned a team name with the standardized format. &lt;br /&gt;
&lt;br /&gt;
==='''Issue #982 '''===&lt;br /&gt;
Expertiza allows spaces in username. But, if a user has username with spaces then that user cannot be impersonated by an instructor. Thus, the task is to prohibit users from having spaces in usernames.  &lt;br /&gt;
&lt;br /&gt;
Pseudocode representing the logic we have used to modify app_models_user.rb&lt;br /&gt;
 &lt;br /&gt;
 If username has spaces&lt;br /&gt;
  disallow spaces using regex  /\s/&lt;br /&gt;
&lt;br /&gt;
==='''Issue #842'''===&lt;br /&gt;
&lt;br /&gt;
1)Login as Instructor, create an OSS assignment for bidding with all the necessary details like maximum no of users per team, add topics for the assignment, add participants(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2)Login as a Student(say A), say student A, whom you have enrolled in the assignment. You should be able to see the assignment now in the Assignment section.&lt;br /&gt;
&lt;br /&gt;
3)Click on the assignment and then click on 'Your team'. &lt;br /&gt;
&lt;br /&gt;
4)Invite a student(say B) to be your teammate. &lt;br /&gt;
&lt;br /&gt;
5)Login as student B and accept A's request to join his/her team.&lt;br /&gt;
&lt;br /&gt;
6)Now, the team name would appear on the top section of the webpage. The team name would be of format : Team_RandomNumber ( say Team_21 ).&lt;br /&gt;
&lt;br /&gt;
==='''Screenshots from conducted Test '''===&lt;br /&gt;
1. On clicking Management and then on assignments, following page appears.&lt;br /&gt;
&lt;br /&gt;
[[File:S1.JPG]]&lt;br /&gt;
&lt;br /&gt;
2. Click on copy assignment icon and edit the information as per requirement. A new assignment would be created.&lt;br /&gt;
&lt;br /&gt;
[[File:S2.JPG]]&lt;br /&gt;
&lt;br /&gt;
3. Now login as student7609 and click on 'Test Assignment'(assignment that you have created as an instructor) under Assignment tab.&lt;br /&gt;
&lt;br /&gt;
[[File:S6.JPG]]&lt;br /&gt;
&lt;br /&gt;
4. Click on 'your team' and send teammate invitation to another student7508.&lt;br /&gt;
&lt;br /&gt;
[[File:S4.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Now login as Student7508 and accept the teammate request of student7609.&lt;br /&gt;
&lt;br /&gt;
[[File:S5.JPG]]&lt;/div&gt;</summary>
		<author><name>Ntripat</name></author>
	</entry>
</feed>