<?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=Aspandit</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=Aspandit"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Aspandit"/>
	<updated>2026-06-30T06:24:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117452</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117452"/>
		<updated>2018-05-04T19:38:42Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Future Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG‎‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/twwprx9d/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
====Code====&lt;br /&gt;
The ruby code printed below is the adapter that was made to convert the highchart series data into the form required by our flot plot in the method highchart_to_flot_adapter.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
def highchart_to_flot_adapter(min, max, highchart_series_data)&lt;br /&gt;
    flot_series_data = []&lt;br /&gt;
    flot_categories = []&lt;br /&gt;
    highchart_data = []&lt;br /&gt;
    flot_data = []&lt;br /&gt;
    j = 0&lt;br /&gt;
    k = 0&lt;br /&gt;
    rounds = 0&lt;br /&gt;
    highchart_series_index = 0&lt;br /&gt;
    review_round = highchart_series_data.to_a.reverse[0][:stack]&lt;br /&gt;
    flot_colors = [&amp;quot;#FF0000&amp;quot;, &amp;quot;#FF6600&amp;quot;, &amp;quot;#FFCC00&amp;quot;, &amp;quot;#CCFF00&amp;quot;, &amp;quot;#66FF00&amp;quot;, &amp;quot;#00FF00&amp;quot;] # These are the six colors from red to green&lt;br /&gt;
&lt;br /&gt;
    # This loop will look at every element of the highchart_series_data and use them to form the flot_series_data&lt;br /&gt;
    # and flot_categories. Flot_series_data is of the form [{data: [[0,x], [1,x], [2,x], [3,x], [4,x], ...], color: &amp;quot;#......&amp;quot;},...].&lt;br /&gt;
    # It is an array of hashes of the size of the number of different scores, which for us is 6: 0, 1, 2, 3, 4, 5. The first&lt;br /&gt;
    # value in each of those arrays within the hash indicates the specific question, while the x indicates the percentage&lt;br /&gt;
    # of people which scored a certain score on that question. Flot_categories is a hash of the form [[0,&amp;quot;&amp;quot;], [1,&amp;quot;&amp;quot;], [2,&amp;quot;&amp;quot;]],&lt;br /&gt;
    # where the first value in each of the inner arrays indicates the question number and the quotes indicate the name&lt;br /&gt;
    # of that question.&lt;br /&gt;
    highchart_series_data.to_a.reverse.each do |element|&lt;br /&gt;
      highchart_data = element[:data]&lt;br /&gt;
      stack = element[:stack]&lt;br /&gt;
      round = stack.scan(/[0-9]/)&lt;br /&gt;
      # This tells flot_categories and flot_series_data that it is a new round&lt;br /&gt;
      unless stack.eql?(review_round)&lt;br /&gt;
        rounds += 1&lt;br /&gt;
        review_round = stack&lt;br /&gt;
        k = 0&lt;br /&gt;
      end&lt;br /&gt;
      # Every sixth element tells flot_categories to create as many ticks as there were questions in that round&lt;br /&gt;
      if highchart_series_index % 6 == 1&lt;br /&gt;
        for i in 0..highchart_data.size-1&lt;br /&gt;
          flot_categories.push([k + (rounds*highchart_data.size), &amp;quot;Rubric \##{k} Round \##{round[0]}&amp;quot;])&lt;br /&gt;
          k += 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # Pushes the data into flot_series_data in the correct form specified above&lt;br /&gt;
      for i in 0..highchart_data.size-1&lt;br /&gt;
        if rounds &amp;gt; 0&lt;br /&gt;
          flot_series_data[j][:data].push([i + (rounds*highchart_data.size), highchart_data[i]])&lt;br /&gt;
        end&lt;br /&gt;
        if rounds.zero?&lt;br /&gt;
          flot_data.push([i, highchart_data[i]])&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      flot_series_data.push(data: flot_data, color: flot_colors[j]) if rounds.zero?&lt;br /&gt;
&lt;br /&gt;
      j += 1&lt;br /&gt;
      if j &amp;gt; max&lt;br /&gt;
        j = 0&lt;br /&gt;
      end&lt;br /&gt;
      flot_data = []&lt;br /&gt;
      highchart_data = []&lt;br /&gt;
      highchart_series_index += 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # This loop calculates the percentages and stores them in the correct data series&lt;br /&gt;
    num_reviewees = 0&lt;br /&gt;
    for i in 0..flot_series_data[0][:data].size-1&lt;br /&gt;
      for j in 0..flot_series_data.size - 1&lt;br /&gt;
        num_reviewees += flot_series_data[j][:data][i][1]&lt;br /&gt;
      end&lt;br /&gt;
      for j in 0..flot_series_data.size - 1&lt;br /&gt;
        unless num_reviewees.zero?&lt;br /&gt;
          flot_series_data[j][:data][i][1] /= num_reviewees.to_f&lt;br /&gt;
          flot_series_data[j][:data][i][1] *= 100.0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      num_reviewees = 0&lt;br /&gt;
    end&lt;br /&gt;
    [flot_series_data, flot_categories]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, javascript code was added in order to produce the stacked bar chart as shown on the webpage.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;flot_scores_on_rubric_questions&amp;quot; style=&amp;quot;width:1000px;height:300px;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    $.plot($(&amp;quot;#flot_scores_on_rubric_questions&amp;quot;), &amp;lt;%= @flot_series_data.to_json.html_safe %&amp;gt;, {&lt;br /&gt;
      xaxis: {&lt;br /&gt;
        ticks: &amp;lt;%= @flot_categories.to_json.html_safe %&amp;gt;&lt;br /&gt;
      },&lt;br /&gt;
        yaxis: {&lt;br /&gt;
            tickFormatter: function(val, axis) { return val &amp;lt; axis.max ? val.toFixed(2) : &amp;quot;Percentage of teams&amp;quot;;}&lt;br /&gt;
        },&lt;br /&gt;
      grid: {&lt;br /&gt;
        hoverable: true,&lt;br /&gt;
        clickable: true&lt;br /&gt;
      },&lt;br /&gt;
      series: {&lt;br /&gt;
        stack: true,&lt;br /&gt;
        lines: {&lt;br /&gt;
          show: false,&lt;br /&gt;
          fill: true,&lt;br /&gt;
          steps: 0&lt;br /&gt;
        },&lt;br /&gt;
        bars: {&lt;br /&gt;
          show: true,&lt;br /&gt;
          align: 'center',&lt;br /&gt;
          barWidth: 1&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    $(&amp;quot;&amp;lt;div id='flot_team_scores_tooltip'&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;).css({&lt;br /&gt;
      position: &amp;quot;absolute&amp;quot;,&lt;br /&gt;
      display: &amp;quot;none&amp;quot;,&lt;br /&gt;
      border: &amp;quot;1px solid #fdd&amp;quot;,&lt;br /&gt;
      padding: &amp;quot;2px&amp;quot;,&lt;br /&gt;
      &amp;quot;background-color&amp;quot;: &amp;quot;#fee&amp;quot;,&lt;br /&gt;
      opacity: 0.80&lt;br /&gt;
    }).appendTo(&amp;quot;body&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $(&amp;quot;#flot_scores_on_rubric_questions&amp;quot;).bind(&amp;quot;plothover&amp;quot;, function (event, pos, item) {&lt;br /&gt;
&lt;br /&gt;
      if (item) {&lt;br /&gt;
        var x = item.datapoint[0],&lt;br /&gt;
        y = item.datapoint[1];&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#flot_team_scores_tooltip&amp;quot;).html(item.series.xaxis.ticks[x].label + &amp;quot;: &amp;quot; + item.series.data[x][1].toFixed(2) + &amp;quot;% of the class scored &amp;quot; + item.seriesIndex)&lt;br /&gt;
        .css({top: item.pageY+5, left: item.pageX+5})&lt;br /&gt;
        .fadeIn(200);&lt;br /&gt;
      } else {&lt;br /&gt;
        $(&amp;quot;#flot_team_scores_tooltip&amp;quot;).hide();&lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/w17tdby1/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
====Code====&lt;br /&gt;
The ruby code added is below. These are additional methods in the grades controller that collects and adds the raw score counts for each team to the &amp;lt;code&amp;gt;@scores&amp;lt;/code&amp;gt; instance variable&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
  def add_scores_by_round&lt;br /&gt;
    scores_by_team_round = get_raw_scores_by_team_round(@questions)&lt;br /&gt;
    @scores[:teams].each_value do |value|&lt;br /&gt;
      team_id = value[:team][:id]&lt;br /&gt;
      value[:scores][:scores_by_round] = scores_by_team_round[:teams][team_id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_raw_scores_by_team_round(questions)&lt;br /&gt;
    scores = {}&lt;br /&gt;
&lt;br /&gt;
    scores[:teams] = {}&lt;br /&gt;
    if !questions.nil? &amp;amp;&amp;amp; !questions.empty?&lt;br /&gt;
      @assignment.teams.collect {|team| team.id}.each do |team_id|&lt;br /&gt;
        first_round_sym = (@assignment.num_review_rounds == 1) ? :review : :review1&lt;br /&gt;
        scores[:teams][team_id] = get_team_raw_scores_by_round(team_id,questions[first_round_sym][0].questionnaire.id) if !questions[first_round_sym].nil? &amp;amp;&amp;amp; !questions[first_round_sym].empty?&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    scores&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_team_raw_scores_by_round(team_id, questionnaire_id)&lt;br /&gt;
    scores = {}&lt;br /&gt;
    maps = ResponseMap.where(reviewee_id: team_id, type: &amp;quot;ReviewResponseMap&amp;quot;)&lt;br /&gt;
    assessments_by_team_id = {}&lt;br /&gt;
    res_round = {}&lt;br /&gt;
    maps.each do |m|&lt;br /&gt;
      responses = m.response.each{|r| r.response_id} # response_id is the actual response here&lt;br /&gt;
      assessments_by_team_id[team_id] = [] if assessments_by_team_id[team_id].nil?&lt;br /&gt;
      responses.each{|res| assessments_by_team_id[team_id] &amp;lt;&amp;lt; res.id if res.is_submitted} if !responses.nil? &amp;amp;&amp;amp; !responses.empty?&lt;br /&gt;
      responses.each{|res| res_round[res.id] = res.round if res.is_submitted} if !responses.nil? &amp;amp;&amp;amp; !responses.empty?&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    qData = ScoreView.find_by_sql [&amp;quot;SELECT q1_id,s_response_id, question_weight,s_score FROM score_views WHERE type in('Criterion', 'Scale') AND q1_id = ? AND s_response_id in (?)&amp;quot;, questionnaire_id, assessments_by_team_id[team_id]]&lt;br /&gt;
    scores[team_id] = {}&lt;br /&gt;
    (1..@assignment.num_review_rounds).each{|idx| scores[team_id].merge!(&amp;quot;#{idx}&amp;quot;: [0, 0, 0, 0, 0, 0])} # [num0s,num1s,num2s,num3s,num4s,num5s]&lt;br /&gt;
    qData.each do |qd|&lt;br /&gt;
      if !qd.s_score.nil? &amp;amp;&amp;amp; !res_round[qd.s_response_id].nil? # if res_round[qd.s_response_id].nil?, then not submitted&lt;br /&gt;
        scores[team_id][res_round[qd.s_response_id].to_s.to_sym][qd.s_score] = scores[team_id][res_round[qd.s_response_id].to_s.to_sym][qd.s_score] + 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    scores[team_id]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally, there was JavaScript code added to the &amp;lt;code&amp;gt;_team_charts.html.erb&amp;lt;/code&amp;gt; file. This code took the incoming &amp;lt;code&amp;gt;@scores&amp;lt;/code&amp;gt; object and converted it to a format that the Flot libraries could understand. The JavaScript code also added the radio buttons to switch between the individual rounds and all rounds as well as the tooltip for the class performance visualizaton portion of this assignment.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
        function compileData() {&lt;br /&gt;
            var allData = &amp;lt;%= @scores.to_json.html_safe %&amp;gt;;&lt;br /&gt;
            var frequencyDataByTeam = collectFrequencyDataByTeam(allData);&lt;br /&gt;
            var aggregate = calculateAggregateFrequencies(frequencyDataByTeam);&lt;br /&gt;
            var data = convertAggregateFrequencyArraysToFlotData(aggregate);&lt;br /&gt;
&lt;br /&gt;
            return data;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function collectFrequencyDataByTeam(allData) {&lt;br /&gt;
            var frequencyData = [];&lt;br /&gt;
            for(var teamIdx in allData.teams) {&lt;br /&gt;
                var team = allData.teams[teamIdx].team;&lt;br /&gt;
                var scoresByRound = allData.teams[teamIdx].scores.scores_by_round;&lt;br /&gt;
                frequencyData.push({&lt;br /&gt;
                    team: {&lt;br /&gt;
                        id: team.id,&lt;br /&gt;
                        name: team.name&lt;br /&gt;
                    },&lt;br /&gt;
                    scoresByRound: scoresByRound&lt;br /&gt;
                });&lt;br /&gt;
            }&lt;br /&gt;
            return frequencyData;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function calculateAggregateFrequencies(frequencyData) {&lt;br /&gt;
            var aggregate = aggregateByRound(frequencyData);&lt;br /&gt;
&lt;br /&gt;
            aggregate.all = aggregateAllRounds(aggregate);&lt;br /&gt;
&lt;br /&gt;
            return aggregate;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function aggregateAllRounds(aggregate) {&lt;br /&gt;
            var all = [0,0,0,0,0,0];&lt;br /&gt;
            for(var round in aggregate) {&lt;br /&gt;
                for(var idx = 0;idx &amp;lt; aggregate[round].length;idx++) {&lt;br /&gt;
                    all[idx] += aggregate[round][idx];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            return all;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function aggregateByRound(frequencyData) {&lt;br /&gt;
            var aggregate = {};&lt;br /&gt;
&lt;br /&gt;
            for(var teamDataKey in frequencyData) {&lt;br /&gt;
                var teamData = frequencyData[teamDataKey];&lt;br /&gt;
                for(var round in teamData.scoresByRound) {&lt;br /&gt;
                    var scores = teamData.scoresByRound[round];&lt;br /&gt;
                    if(aggregate[round] == null) {&lt;br /&gt;
                        aggregate[round] = [0, 0, 0, 0, 0, 0];&lt;br /&gt;
                    }&lt;br /&gt;
                    for(var idx = 0;idx &amp;lt; scores.length;idx++) {&lt;br /&gt;
                        aggregate[round][idx] += scores[idx];&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            return aggregate;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function convertAggregateFrequencyArraysToFlotData(aggregate) {&lt;br /&gt;
            var data = {};&lt;br /&gt;
            for(var round in aggregate) {&lt;br /&gt;
                data[round] = [];&lt;br /&gt;
                for(var idx = 0;idx &amp;lt; aggregate[round].length;idx++) {&lt;br /&gt;
                    data[round].push([idx, aggregate[round][idx]]);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            return data;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).width($(&amp;quot;#class-performance-plot&amp;quot;).parent().innerWidth()*0.8);&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).height($(&amp;quot;#team-chart&amp;quot;).innerHeight());&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#radioBtns&amp;quot;).width($(&amp;quot;#radioBtns&amp;quot;).parent().innerWidth()*0.2);&lt;br /&gt;
        $(&amp;quot;#radioBtns&amp;quot;).height($(&amp;quot;#team-chart&amp;quot;).innerHeight());&lt;br /&gt;
&lt;br /&gt;
        var cpdata = compileData();&lt;br /&gt;
&lt;br /&gt;
        var classPerformance = $.plot($(&amp;quot;#class-performance-plot&amp;quot;),[cpdata.all],&lt;br /&gt;
            {&lt;br /&gt;
                grid: {&lt;br /&gt;
                    hoverable: true,&lt;br /&gt;
                    clickable: false&lt;br /&gt;
                },series: {&lt;br /&gt;
                lines: {&lt;br /&gt;
                    show: false,&lt;br /&gt;
                    fill: true,&lt;br /&gt;
                    steps: 0&lt;br /&gt;
                },&lt;br /&gt;
                bars: {&lt;br /&gt;
                    show: true,&lt;br /&gt;
                    align: 'center',&lt;br /&gt;
                    barWidth: 1&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;&amp;lt;div id='class-performance-plot-tooltip'&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;).css({&lt;br /&gt;
            position: &amp;quot;absolute&amp;quot;,&lt;br /&gt;
            display: &amp;quot;none&amp;quot;,&lt;br /&gt;
            border: &amp;quot;1px solid #fdd&amp;quot;,&lt;br /&gt;
            padding: &amp;quot;2px&amp;quot;,&lt;br /&gt;
            &amp;quot;background-color&amp;quot;: &amp;quot;#fee&amp;quot;,&lt;br /&gt;
            opacity: 0.80&lt;br /&gt;
        }).appendTo(&amp;quot;body&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).bind(&amp;quot;plothover&amp;quot;, function (event, pos, item) {&lt;br /&gt;
&lt;br /&gt;
            if (item) {&lt;br /&gt;
                var x = item.datapoint[0],&lt;br /&gt;
                    y = item.datapoint[1];&lt;br /&gt;
&lt;br /&gt;
                $(&amp;quot;#class-performance-plot-tooltip&amp;quot;).html(&amp;quot;Score: &amp;quot; + x + &amp;quot;; Frequency: &amp;quot; + y)&lt;br /&gt;
                    .css({top: item.pageY+5, left: item.pageX+5})&lt;br /&gt;
                    .fadeIn(200);&lt;br /&gt;
            } else {&lt;br /&gt;
                $(&amp;quot;#class-performance-plot-tooltip&amp;quot;).hide();&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        var radioBtn = $('&amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;assignmentRound&amp;quot; value=&amp;quot;all&amp;quot; checked onclick=&amp;quot;showAggregation(\'all\')&amp;quot;/&amp;gt;All Rounds&amp;lt;/label&amp;gt;')&lt;br /&gt;
        radioBtn.appendTo('#radioBtns');&lt;br /&gt;
&lt;br /&gt;
        for (var round = 1; round &amp;lt;= &amp;lt;%= @assignment.num_review_rounds %&amp;gt;; round++) {&lt;br /&gt;
            var radioBtn = $('&amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;assignmentRound&amp;quot; onclick=&amp;quot;showAggregation(\''+round+'\')&amp;quot;/&amp;gt;Round '+round+'&amp;lt;/label&amp;gt;');&lt;br /&gt;
            radioBtn.attr(&amp;quot;value&amp;quot;,round);&lt;br /&gt;
            radioBtn.appendTo('#radioBtns');&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        window.showAggregation = function(round) {&lt;br /&gt;
            classPerformance.setData([cpdata[round]]);&lt;br /&gt;
            classPerformance.setupGrid();&lt;br /&gt;
            classPerformance.draw();&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Needed==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. Unfortunately we were unable to meet this goal, as integrating a test that could cover certain functionality without returning an error proved challenging. This is a possibility for a future team, or for future maintenance.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The tests verify that the correct frequency of raw scores is received from the database. A test is performed for rubric criteria that vary by round and one is created for an assignment where the rubric does not vary.&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
Some obsolete codes in the review_mapping_controller.rb are deleted and the previous test still works.&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores. If it is decided to stay with using the raw scores, the frequency arrays should be made variable instead of returning a six-element array for scores 0-5 all the time. It would also be more useful to have a two-level breakdown of the radio button options, and thus the six-element frequency array data, for rounds then questions.&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://www.youtube.com/watch?v=nKu3LyFvm4M&amp;amp;feature=youtu.be Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117401</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117401"/>
		<updated>2018-05-04T13:53:09Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG‎‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/twwprx9d/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
====Code====&lt;br /&gt;
The ruby code printed below is the adapter that was made to convert the highchart series data into the form required by our flot plot in the method highchart_to_flot_adapter.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
def highchart_to_flot_adapter(min, max, highchart_series_data)&lt;br /&gt;
    flot_series_data = []&lt;br /&gt;
    flot_categories = []&lt;br /&gt;
    highchart_data = []&lt;br /&gt;
    flot_data = []&lt;br /&gt;
    j = 0&lt;br /&gt;
    k = 0&lt;br /&gt;
    rounds = 0&lt;br /&gt;
    highchart_series_index = 0&lt;br /&gt;
    review_round = highchart_series_data.to_a.reverse[0][:stack]&lt;br /&gt;
    flot_colors = [&amp;quot;#FF0000&amp;quot;, &amp;quot;#FF6600&amp;quot;, &amp;quot;#FFCC00&amp;quot;, &amp;quot;#CCFF00&amp;quot;, &amp;quot;#66FF00&amp;quot;, &amp;quot;#00FF00&amp;quot;] # These are the six colors from red to green&lt;br /&gt;
&lt;br /&gt;
    # This loop will look at every element of the highchart_series_data and use them to form the flot_series_data&lt;br /&gt;
    # and flot_categories. Flot_series_data is of the form [{data: [[0,x], [1,x], [2,x], [3,x], [4,x], ...], color: &amp;quot;#......&amp;quot;},...].&lt;br /&gt;
    # It is an array of hashes of the size of the number of different scores, which for us is 6: 0, 1, 2, 3, 4, 5. The first&lt;br /&gt;
    # value in each of those arrays within the hash indicates the specific question, while the x indicates the percentage&lt;br /&gt;
    # of people which scored a certain score on that question. Flot_categories is a hash of the form [[0,&amp;quot;&amp;quot;], [1,&amp;quot;&amp;quot;], [2,&amp;quot;&amp;quot;]],&lt;br /&gt;
    # where the first value in each of the inner arrays indicates the question number and the quotes indicate the name&lt;br /&gt;
    # of that question.&lt;br /&gt;
    highchart_series_data.to_a.reverse.each do |element|&lt;br /&gt;
      highchart_data = element[:data]&lt;br /&gt;
      stack = element[:stack]&lt;br /&gt;
      round = stack.scan(/[0-9]/)&lt;br /&gt;
      # This tells flot_categories and flot_series_data that it is a new round&lt;br /&gt;
      unless stack.eql?(review_round)&lt;br /&gt;
        rounds += 1&lt;br /&gt;
        review_round = stack&lt;br /&gt;
        k = 0&lt;br /&gt;
      end&lt;br /&gt;
      # Every sixth element tells flot_categories to create as many ticks as there were questions in that round&lt;br /&gt;
      if highchart_series_index % 6 == 1&lt;br /&gt;
        for i in 0..highchart_data.size-1&lt;br /&gt;
          flot_categories.push([k + (rounds*highchart_data.size), &amp;quot;Rubric \##{k} Round \##{round[0]}&amp;quot;])&lt;br /&gt;
          k += 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # Pushes the data into flot_series_data in the correct form specified above&lt;br /&gt;
      for i in 0..highchart_data.size-1&lt;br /&gt;
        if rounds &amp;gt; 0&lt;br /&gt;
          flot_series_data[j][:data].push([i + (rounds*highchart_data.size), highchart_data[i]])&lt;br /&gt;
        end&lt;br /&gt;
        if rounds.zero?&lt;br /&gt;
          flot_data.push([i, highchart_data[i]])&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      flot_series_data.push(data: flot_data, color: flot_colors[j]) if rounds.zero?&lt;br /&gt;
&lt;br /&gt;
      j += 1&lt;br /&gt;
      if j &amp;gt; max&lt;br /&gt;
        j = 0&lt;br /&gt;
      end&lt;br /&gt;
      flot_data = []&lt;br /&gt;
      highchart_data = []&lt;br /&gt;
      highchart_series_index += 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # This loop calculates the percentages and stores them in the correct data series&lt;br /&gt;
    num_reviewees = 0&lt;br /&gt;
    for i in 0..flot_series_data[0][:data].size-1&lt;br /&gt;
      for j in 0..flot_series_data.size - 1&lt;br /&gt;
        num_reviewees += flot_series_data[j][:data][i][1]&lt;br /&gt;
      end&lt;br /&gt;
      for j in 0..flot_series_data.size - 1&lt;br /&gt;
        unless num_reviewees.zero?&lt;br /&gt;
          flot_series_data[j][:data][i][1] /= num_reviewees.to_f&lt;br /&gt;
          flot_series_data[j][:data][i][1] *= 100.0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      num_reviewees = 0&lt;br /&gt;
    end&lt;br /&gt;
    [flot_series_data, flot_categories]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, javascript code was added in order to produce the stacked bar chart as shown on the webpage.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;flot_scores_on_rubric_questions&amp;quot; style=&amp;quot;width:1000px;height:300px;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    $.plot($(&amp;quot;#flot_scores_on_rubric_questions&amp;quot;), &amp;lt;%= @flot_series_data.to_json.html_safe %&amp;gt;, {&lt;br /&gt;
      xaxis: {&lt;br /&gt;
        ticks: &amp;lt;%= @flot_categories.to_json.html_safe %&amp;gt;&lt;br /&gt;
      },&lt;br /&gt;
        yaxis: {&lt;br /&gt;
            tickFormatter: function(val, axis) { return val &amp;lt; axis.max ? val.toFixed(2) : &amp;quot;Percentage of teams&amp;quot;;}&lt;br /&gt;
        },&lt;br /&gt;
      grid: {&lt;br /&gt;
        hoverable: true,&lt;br /&gt;
        clickable: true&lt;br /&gt;
      },&lt;br /&gt;
      series: {&lt;br /&gt;
        stack: true,&lt;br /&gt;
        lines: {&lt;br /&gt;
          show: false,&lt;br /&gt;
          fill: true,&lt;br /&gt;
          steps: 0&lt;br /&gt;
        },&lt;br /&gt;
        bars: {&lt;br /&gt;
          show: true,&lt;br /&gt;
          align: 'center',&lt;br /&gt;
          barWidth: 1&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    $(&amp;quot;&amp;lt;div id='flot_team_scores_tooltip'&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;).css({&lt;br /&gt;
      position: &amp;quot;absolute&amp;quot;,&lt;br /&gt;
      display: &amp;quot;none&amp;quot;,&lt;br /&gt;
      border: &amp;quot;1px solid #fdd&amp;quot;,&lt;br /&gt;
      padding: &amp;quot;2px&amp;quot;,&lt;br /&gt;
      &amp;quot;background-color&amp;quot;: &amp;quot;#fee&amp;quot;,&lt;br /&gt;
      opacity: 0.80&lt;br /&gt;
    }).appendTo(&amp;quot;body&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $(&amp;quot;#flot_scores_on_rubric_questions&amp;quot;).bind(&amp;quot;plothover&amp;quot;, function (event, pos, item) {&lt;br /&gt;
&lt;br /&gt;
      if (item) {&lt;br /&gt;
        var x = item.datapoint[0],&lt;br /&gt;
        y = item.datapoint[1];&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#flot_team_scores_tooltip&amp;quot;).html(item.series.xaxis.ticks[x].label + &amp;quot;: &amp;quot; + item.series.data[x][1].toFixed(2) + &amp;quot;% of the class scored &amp;quot; + item.seriesIndex)&lt;br /&gt;
        .css({top: item.pageY+5, left: item.pageX+5})&lt;br /&gt;
        .fadeIn(200);&lt;br /&gt;
      } else {&lt;br /&gt;
        $(&amp;quot;#flot_team_scores_tooltip&amp;quot;).hide();&lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/w17tdby1/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
====Code====&lt;br /&gt;
The ruby code added is below. These are additional methods in the grades controller that collects and adds the raw score counts for each team to the &amp;lt;code&amp;gt;@scores&amp;lt;/code&amp;gt; instance variable&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
  def add_scores_by_round&lt;br /&gt;
    scores_by_team_round = get_raw_scores_by_team_round(@questions)&lt;br /&gt;
    @scores[:teams].each_value do |value|&lt;br /&gt;
      team_id = value[:team][:id]&lt;br /&gt;
      value[:scores][:scores_by_round] = scores_by_team_round[:teams][team_id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_raw_scores_by_team_round(questions)&lt;br /&gt;
    scores = {}&lt;br /&gt;
&lt;br /&gt;
    scores[:teams] = {}&lt;br /&gt;
    if !questions.nil? &amp;amp;&amp;amp; !questions.empty?&lt;br /&gt;
      @assignment.teams.collect {|team| team.id}.each do |team_id|&lt;br /&gt;
        first_round_sym = (@assignment.num_review_rounds == 1) ? :review : :review1&lt;br /&gt;
        scores[:teams][team_id] = get_team_raw_scores_by_round(team_id,questions[first_round_sym][0].questionnaire.id) if !questions[first_round_sym].nil? &amp;amp;&amp;amp; !questions[first_round_sym].empty?&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    scores&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_team_raw_scores_by_round(team_id, questionnaire_id)&lt;br /&gt;
    scores = {}&lt;br /&gt;
    maps = ResponseMap.where(reviewee_id: team_id, type: &amp;quot;ReviewResponseMap&amp;quot;)&lt;br /&gt;
    assessments_by_team_id = {}&lt;br /&gt;
    res_round = {}&lt;br /&gt;
    maps.each do |m|&lt;br /&gt;
      responses = m.response.each{|r| r.response_id} # response_id is the actual response here&lt;br /&gt;
      assessments_by_team_id[team_id] = [] if assessments_by_team_id[team_id].nil?&lt;br /&gt;
      responses.each{|res| assessments_by_team_id[team_id] &amp;lt;&amp;lt; res.id if res.is_submitted} if !responses.nil? &amp;amp;&amp;amp; !responses.empty?&lt;br /&gt;
      responses.each{|res| res_round[res.id] = res.round if res.is_submitted} if !responses.nil? &amp;amp;&amp;amp; !responses.empty?&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    qData = ScoreView.find_by_sql [&amp;quot;SELECT q1_id,s_response_id, question_weight,s_score FROM score_views WHERE type in('Criterion', 'Scale') AND q1_id = ? AND s_response_id in (?)&amp;quot;, questionnaire_id, assessments_by_team_id[team_id]]&lt;br /&gt;
    scores[team_id] = {}&lt;br /&gt;
    (1..@assignment.num_review_rounds).each{|idx| scores[team_id].merge!(&amp;quot;#{idx}&amp;quot;: [0, 0, 0, 0, 0, 0])} # [num0s,num1s,num2s,num3s,num4s,num5s]&lt;br /&gt;
    qData.each do |qd|&lt;br /&gt;
      if !qd.s_score.nil? &amp;amp;&amp;amp; !res_round[qd.s_response_id].nil? # if res_round[qd.s_response_id].nil?, then not submitted&lt;br /&gt;
        scores[team_id][res_round[qd.s_response_id].to_s.to_sym][qd.s_score] = scores[team_id][res_round[qd.s_response_id].to_s.to_sym][qd.s_score] + 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    scores[team_id]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally, there was JavaScript code added to the &amp;lt;code&amp;gt;_team_charts.html.erb&amp;lt;/code&amp;gt; file. This code took the incoming &amp;lt;code&amp;gt;@scores&amp;lt;/code&amp;gt; object and converted it to a format that the Flot libraries could understand. The JavaScript code also added the radio buttons to switch between the individual rounds and all rounds as well as the tooltip for the class performance visualizaton portion of this assignment.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
        function compileData() {&lt;br /&gt;
            var allData = &amp;lt;%= @scores.to_json.html_safe %&amp;gt;;&lt;br /&gt;
            var frequencyDataByTeam = collectFrequencyDataByTeam(allData);&lt;br /&gt;
            var aggregate = calculateAggregateFrequencies(frequencyDataByTeam);&lt;br /&gt;
            var data = convertAggregateFrequencyArraysToFlotData(aggregate);&lt;br /&gt;
&lt;br /&gt;
            return data;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function collectFrequencyDataByTeam(allData) {&lt;br /&gt;
            var frequencyData = [];&lt;br /&gt;
            for(var teamIdx in allData.teams) {&lt;br /&gt;
                var team = allData.teams[teamIdx].team;&lt;br /&gt;
                var scoresByRound = allData.teams[teamIdx].scores.scores_by_round;&lt;br /&gt;
                frequencyData.push({&lt;br /&gt;
                    team: {&lt;br /&gt;
                        id: team.id,&lt;br /&gt;
                        name: team.name&lt;br /&gt;
                    },&lt;br /&gt;
                    scoresByRound: scoresByRound&lt;br /&gt;
                });&lt;br /&gt;
            }&lt;br /&gt;
            return frequencyData;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function calculateAggregateFrequencies(frequencyData) {&lt;br /&gt;
            var aggregate = aggregateByRound(frequencyData);&lt;br /&gt;
&lt;br /&gt;
            aggregate.all = aggregateAllRounds(aggregate);&lt;br /&gt;
&lt;br /&gt;
            return aggregate;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function aggregateAllRounds(aggregate) {&lt;br /&gt;
            var all = [0,0,0,0,0,0];&lt;br /&gt;
            for(var round in aggregate) {&lt;br /&gt;
                for(var idx = 0;idx &amp;lt; aggregate[round].length;idx++) {&lt;br /&gt;
                    all[idx] += aggregate[round][idx];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            return all;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function aggregateByRound(frequencyData) {&lt;br /&gt;
            var aggregate = {};&lt;br /&gt;
&lt;br /&gt;
            for(var teamDataKey in frequencyData) {&lt;br /&gt;
                var teamData = frequencyData[teamDataKey];&lt;br /&gt;
                for(var round in teamData.scoresByRound) {&lt;br /&gt;
                    var scores = teamData.scoresByRound[round];&lt;br /&gt;
                    if(aggregate[round] == null) {&lt;br /&gt;
                        aggregate[round] = [0, 0, 0, 0, 0, 0];&lt;br /&gt;
                    }&lt;br /&gt;
                    for(var idx = 0;idx &amp;lt; scores.length;idx++) {&lt;br /&gt;
                        aggregate[round][idx] += scores[idx];&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            return aggregate;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function convertAggregateFrequencyArraysToFlotData(aggregate) {&lt;br /&gt;
            var data = {};&lt;br /&gt;
            for(var round in aggregate) {&lt;br /&gt;
                data[round] = [];&lt;br /&gt;
                for(var idx = 0;idx &amp;lt; aggregate[round].length;idx++) {&lt;br /&gt;
                    data[round].push([idx, aggregate[round][idx]]);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            return data;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).width($(&amp;quot;#class-performance-plot&amp;quot;).parent().innerWidth()*0.8);&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).height($(&amp;quot;#team-chart&amp;quot;).innerHeight());&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#radioBtns&amp;quot;).width($(&amp;quot;#radioBtns&amp;quot;).parent().innerWidth()*0.2);&lt;br /&gt;
        $(&amp;quot;#radioBtns&amp;quot;).height($(&amp;quot;#team-chart&amp;quot;).innerHeight());&lt;br /&gt;
&lt;br /&gt;
        var cpdata = compileData();&lt;br /&gt;
&lt;br /&gt;
        var classPerformance = $.plot($(&amp;quot;#class-performance-plot&amp;quot;),[cpdata.all],&lt;br /&gt;
            {&lt;br /&gt;
                grid: {&lt;br /&gt;
                    hoverable: true,&lt;br /&gt;
                    clickable: false&lt;br /&gt;
                },series: {&lt;br /&gt;
                lines: {&lt;br /&gt;
                    show: false,&lt;br /&gt;
                    fill: true,&lt;br /&gt;
                    steps: 0&lt;br /&gt;
                },&lt;br /&gt;
                bars: {&lt;br /&gt;
                    show: true,&lt;br /&gt;
                    align: 'center',&lt;br /&gt;
                    barWidth: 1&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;&amp;lt;div id='class-performance-plot-tooltip'&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;).css({&lt;br /&gt;
            position: &amp;quot;absolute&amp;quot;,&lt;br /&gt;
            display: &amp;quot;none&amp;quot;,&lt;br /&gt;
            border: &amp;quot;1px solid #fdd&amp;quot;,&lt;br /&gt;
            padding: &amp;quot;2px&amp;quot;,&lt;br /&gt;
            &amp;quot;background-color&amp;quot;: &amp;quot;#fee&amp;quot;,&lt;br /&gt;
            opacity: 0.80&lt;br /&gt;
        }).appendTo(&amp;quot;body&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).bind(&amp;quot;plothover&amp;quot;, function (event, pos, item) {&lt;br /&gt;
&lt;br /&gt;
            if (item) {&lt;br /&gt;
                var x = item.datapoint[0],&lt;br /&gt;
                    y = item.datapoint[1];&lt;br /&gt;
&lt;br /&gt;
                $(&amp;quot;#class-performance-plot-tooltip&amp;quot;).html(&amp;quot;Score: &amp;quot; + x + &amp;quot;; Frequency: &amp;quot; + y)&lt;br /&gt;
                    .css({top: item.pageY+5, left: item.pageX+5})&lt;br /&gt;
                    .fadeIn(200);&lt;br /&gt;
            } else {&lt;br /&gt;
                $(&amp;quot;#class-performance-plot-tooltip&amp;quot;).hide();&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        var radioBtn = $('&amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;assignmentRound&amp;quot; value=&amp;quot;all&amp;quot; checked onclick=&amp;quot;showAggregation(\'all\')&amp;quot;/&amp;gt;All Rounds&amp;lt;/label&amp;gt;')&lt;br /&gt;
        radioBtn.appendTo('#radioBtns');&lt;br /&gt;
&lt;br /&gt;
        for (var round = 1; round &amp;lt;= &amp;lt;%= @assignment.num_review_rounds %&amp;gt;; round++) {&lt;br /&gt;
            var radioBtn = $('&amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;assignmentRound&amp;quot; onclick=&amp;quot;showAggregation(\''+round+'\')&amp;quot;/&amp;gt;Round '+round+'&amp;lt;/label&amp;gt;');&lt;br /&gt;
            radioBtn.attr(&amp;quot;value&amp;quot;,round);&lt;br /&gt;
            radioBtn.appendTo('#radioBtns');&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        window.showAggregation = function(round) {&lt;br /&gt;
            classPerformance.setData([cpdata[round]]);&lt;br /&gt;
            classPerformance.setupGrid();&lt;br /&gt;
            classPerformance.draw();&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Needed==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. Unfortunately we were unable to meet this goal, as integrating a test that could cover certain functionality without returning an error proved challenging. This is a possibility for a future team, or for future maintenance.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The tests verify that the correct frequency of raw scores is received from the database. A test is performed for rubric criteria that vary by round and one is created for an assignment where the rubric does not vary.&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
Some obsolete codes in the review_mapping_controller.rb are deleted and the previous test still works.&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores.&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://www.youtube.com/watch?v=nKu3LyFvm4M&amp;amp;feature=youtu.be Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117398</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117398"/>
		<updated>2018-05-04T10:15:48Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Class Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/twwprx9d/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/w17tdby1/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
====Code====&lt;br /&gt;
The ruby code added is below. These are additional methods in the grades controller that collects and adds the raw score counts for each team to the &amp;lt;code&amp;gt;@scores&amp;lt;/code&amp;gt; instance variable&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
  def add_scores_by_round&lt;br /&gt;
    scores_by_team_round = get_raw_scores_by_team_round(@questions)&lt;br /&gt;
    @scores[:teams].each_value do |value|&lt;br /&gt;
      team_id = value[:team][:id]&lt;br /&gt;
      value[:scores][:scores_by_round] = scores_by_team_round[:teams][team_id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_raw_scores_by_team_round(questions)&lt;br /&gt;
    scores = {}&lt;br /&gt;
&lt;br /&gt;
    scores[:teams] = {}&lt;br /&gt;
    if !questions.nil? &amp;amp;&amp;amp; !questions.empty?&lt;br /&gt;
      @assignment.teams.collect {|team| team.id}.each do |team_id|&lt;br /&gt;
        first_round_sym = (@assignment.num_review_rounds == 1) ? :review : :review1&lt;br /&gt;
        scores[:teams][team_id] = get_team_raw_scores_by_round(team_id,questions[first_round_sym][0].questionnaire.id) if !questions[first_round_sym].nil? &amp;amp;&amp;amp; !questions[first_round_sym].empty?&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    scores&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_team_raw_scores_by_round(team_id, questionnaire_id)&lt;br /&gt;
    scores = {}&lt;br /&gt;
    maps = ResponseMap.where(reviewee_id: team_id, type: &amp;quot;ReviewResponseMap&amp;quot;)&lt;br /&gt;
    assessments_by_team_id = {}&lt;br /&gt;
    res_round = {}&lt;br /&gt;
    maps.each do |m|&lt;br /&gt;
      responses = m.response.each{|r| r.response_id} # response_id is the actual response here&lt;br /&gt;
      assessments_by_team_id[team_id] = [] if assessments_by_team_id[team_id].nil?&lt;br /&gt;
      responses.each{|res| assessments_by_team_id[team_id] &amp;lt;&amp;lt; res.id if res.is_submitted} if !responses.nil? &amp;amp;&amp;amp; !responses.empty?&lt;br /&gt;
      responses.each{|res| res_round[res.id] = res.round if res.is_submitted} if !responses.nil? &amp;amp;&amp;amp; !responses.empty?&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    qData = ScoreView.find_by_sql [&amp;quot;SELECT q1_id,s_response_id, question_weight,s_score FROM score_views WHERE type in('Criterion', 'Scale') AND q1_id = ? AND s_response_id in (?)&amp;quot;, questionnaire_id, assessments_by_team_id[team_id]]&lt;br /&gt;
    scores[team_id] = {}&lt;br /&gt;
    (1..@assignment.num_review_rounds).each{|idx| scores[team_id].merge!(&amp;quot;#{idx}&amp;quot;: [0, 0, 0, 0, 0, 0])} # [num0s,num1s,num2s,num3s,num4s,num5s]&lt;br /&gt;
    qData.each do |qd|&lt;br /&gt;
      if !qd.s_score.nil? &amp;amp;&amp;amp; !res_round[qd.s_response_id].nil? # if res_round[qd.s_response_id].nil?, then not submitted&lt;br /&gt;
        scores[team_id][res_round[qd.s_response_id].to_s.to_sym][qd.s_score] = scores[team_id][res_round[qd.s_response_id].to_s.to_sym][qd.s_score] + 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    scores[team_id]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally, there was JavaScript code added to the &amp;lt;code&amp;gt;_team_charts.html.erb&amp;lt;/code&amp;gt; file. This code took the incoming &amp;lt;code&amp;gt;@scores&amp;lt;/code&amp;gt; object and converted it to a format that the Flot libraries could understand. The JavaScript code also added the radio buttons to switch between the individual rounds and all rounds as well as the tooltip for the class performance visualizaton portion of this assignment.&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
        function compileData() {&lt;br /&gt;
            var allData = &amp;lt;%= @scores.to_json.html_safe %&amp;gt;;&lt;br /&gt;
            var frequencyDataByTeam = collectFrequencyDataByTeam(allData);&lt;br /&gt;
            var aggregate = calculateAggregateFrequencies(frequencyDataByTeam);&lt;br /&gt;
            var data = convertAggregateFrequencyArraysToFlotData(aggregate);&lt;br /&gt;
&lt;br /&gt;
            return data;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function collectFrequencyDataByTeam(allData) {&lt;br /&gt;
            var frequencyData = [];&lt;br /&gt;
            for(var teamIdx in allData.teams) {&lt;br /&gt;
                var team = allData.teams[teamIdx].team;&lt;br /&gt;
                var scoresByRound = allData.teams[teamIdx].scores.scores_by_round;&lt;br /&gt;
                frequencyData.push({&lt;br /&gt;
                    team: {&lt;br /&gt;
                        id: team.id,&lt;br /&gt;
                        name: team.name&lt;br /&gt;
                    },&lt;br /&gt;
                    scoresByRound: scoresByRound&lt;br /&gt;
                });&lt;br /&gt;
            }&lt;br /&gt;
            return frequencyData;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function calculateAggregateFrequencies(frequencyData) {&lt;br /&gt;
            var aggregate = aggregateByRound(frequencyData);&lt;br /&gt;
&lt;br /&gt;
            aggregate.all = aggregateAllRounds(aggregate);&lt;br /&gt;
&lt;br /&gt;
            return aggregate;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function aggregateAllRounds(aggregate) {&lt;br /&gt;
            var all = [0,0,0,0,0,0];&lt;br /&gt;
            for(var round in aggregate) {&lt;br /&gt;
                for(var idx = 0;idx &amp;lt; aggregate[round].length;idx++) {&lt;br /&gt;
                    all[idx] += aggregate[round][idx];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            return all;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function aggregateByRound(frequencyData) {&lt;br /&gt;
            var aggregate = {};&lt;br /&gt;
&lt;br /&gt;
            for(var teamDataKey in frequencyData) {&lt;br /&gt;
                var teamData = frequencyData[teamDataKey];&lt;br /&gt;
                for(var round in teamData.scoresByRound) {&lt;br /&gt;
                    var scores = teamData.scoresByRound[round];&lt;br /&gt;
                    if(aggregate[round] == null) {&lt;br /&gt;
                        aggregate[round] = [0, 0, 0, 0, 0, 0];&lt;br /&gt;
                    }&lt;br /&gt;
                    for(var idx = 0;idx &amp;lt; scores.length;idx++) {&lt;br /&gt;
                        aggregate[round][idx] += scores[idx];&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            return aggregate;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function convertAggregateFrequencyArraysToFlotData(aggregate) {&lt;br /&gt;
            var data = {};&lt;br /&gt;
            for(var round in aggregate) {&lt;br /&gt;
                data[round] = [];&lt;br /&gt;
                for(var idx = 0;idx &amp;lt; aggregate[round].length;idx++) {&lt;br /&gt;
                    data[round].push([idx, aggregate[round][idx]]);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            return data;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).width($(&amp;quot;#class-performance-plot&amp;quot;).parent().innerWidth()*0.8);&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).height($(&amp;quot;#team-chart&amp;quot;).innerHeight());&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#radioBtns&amp;quot;).width($(&amp;quot;#radioBtns&amp;quot;).parent().innerWidth()*0.2);&lt;br /&gt;
        $(&amp;quot;#radioBtns&amp;quot;).height($(&amp;quot;#team-chart&amp;quot;).innerHeight());&lt;br /&gt;
&lt;br /&gt;
        var cpdata = compileData();&lt;br /&gt;
&lt;br /&gt;
        var classPerformance = $.plot($(&amp;quot;#class-performance-plot&amp;quot;),[cpdata.all],&lt;br /&gt;
            {&lt;br /&gt;
                grid: {&lt;br /&gt;
                    hoverable: true,&lt;br /&gt;
                    clickable: false&lt;br /&gt;
                },series: {&lt;br /&gt;
                lines: {&lt;br /&gt;
                    show: false,&lt;br /&gt;
                    fill: true,&lt;br /&gt;
                    steps: 0&lt;br /&gt;
                },&lt;br /&gt;
                bars: {&lt;br /&gt;
                    show: true,&lt;br /&gt;
                    align: 'center',&lt;br /&gt;
                    barWidth: 1&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;&amp;lt;div id='class-performance-plot-tooltip'&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;).css({&lt;br /&gt;
            position: &amp;quot;absolute&amp;quot;,&lt;br /&gt;
            display: &amp;quot;none&amp;quot;,&lt;br /&gt;
            border: &amp;quot;1px solid #fdd&amp;quot;,&lt;br /&gt;
            padding: &amp;quot;2px&amp;quot;,&lt;br /&gt;
            &amp;quot;background-color&amp;quot;: &amp;quot;#fee&amp;quot;,&lt;br /&gt;
            opacity: 0.80&lt;br /&gt;
        }).appendTo(&amp;quot;body&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        $(&amp;quot;#class-performance-plot&amp;quot;).bind(&amp;quot;plothover&amp;quot;, function (event, pos, item) {&lt;br /&gt;
&lt;br /&gt;
            if (item) {&lt;br /&gt;
                var x = item.datapoint[0],&lt;br /&gt;
                    y = item.datapoint[1];&lt;br /&gt;
&lt;br /&gt;
                $(&amp;quot;#class-performance-plot-tooltip&amp;quot;).html(&amp;quot;Score: &amp;quot; + x + &amp;quot;; Frequency: &amp;quot; + y)&lt;br /&gt;
                    .css({top: item.pageY+5, left: item.pageX+5})&lt;br /&gt;
                    .fadeIn(200);&lt;br /&gt;
            } else {&lt;br /&gt;
                $(&amp;quot;#class-performance-plot-tooltip&amp;quot;).hide();&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        var radioBtn = $('&amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;assignmentRound&amp;quot; value=&amp;quot;all&amp;quot; checked onclick=&amp;quot;showAggregation(\'all\')&amp;quot;/&amp;gt;All Rounds&amp;lt;/label&amp;gt;')&lt;br /&gt;
        radioBtn.appendTo('#radioBtns');&lt;br /&gt;
&lt;br /&gt;
        for (var round = 1; round &amp;lt;= &amp;lt;%= @assignment.num_review_rounds %&amp;gt;; round++) {&lt;br /&gt;
            var radioBtn = $('&amp;lt;label&amp;gt;&amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;assignmentRound&amp;quot; onclick=&amp;quot;showAggregation(\''+round+'\')&amp;quot;/&amp;gt;Round '+round+'&amp;lt;/label&amp;gt;');&lt;br /&gt;
            radioBtn.attr(&amp;quot;value&amp;quot;,round);&lt;br /&gt;
            radioBtn.appendTo('#radioBtns');&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        window.showAggregation = function(round) {&lt;br /&gt;
            classPerformance.setData([cpdata[round]]);&lt;br /&gt;
            classPerformance.setupGrid();&lt;br /&gt;
            classPerformance.draw();&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Done==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. In ensuring the previous tests worked, we could then be sure the private methods within the grades_controller.rb file were working properly.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The tests verify that the correct frequency of raw scores is received from the database. A test is performed for rubric criteria that vary by round and one is created for an assignment where the rubric does not vary.&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
Some obsolete codes in the review_mapping_controller.rb are deleted and the previous test still works.&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores.&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://www.youtube.com/watch?v=nKu3LyFvm4M&amp;amp;feature=youtu.be Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117396</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117396"/>
		<updated>2018-05-04T04:19:38Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Class Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/twwprx9d/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/w17tdby1/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Done==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. In ensuring the previous tests worked, we could then be sure the private methods within the grades_controller.rb file were working properly.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The tests verify that the correct frequency of raw scores is received from the database. A test is performed for rubric criteria that vary by round and one is created for an assignment where the rubric does not vary.&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
Some obsolete codes in the review_mapping_controller.rb are deleted and the previous test still works.&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores.&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://www.youtube.com/watch?v=nKu3LyFvm4M&amp;amp;feature=youtu.be Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117395</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117395"/>
		<updated>2018-05-04T04:10:39Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Rubric Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/twwprx9d/1/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Done==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. In ensuring the previous tests worked, we could then be sure the private methods within the grades_controller.rb file were working properly.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The tests verify that the correct frequency of raw scores is received from the database. A test is performed for rubric criteria that vary by round and one is created for an assignment where the rubric does not vary.&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
Some obsolete codes in the review_mapping_controller.rb are deleted and the previous test still works.&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores.&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://www.youtube.com/watch?v=nKu3LyFvm4M&amp;amp;feature=youtu.be Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117394</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117394"/>
		<updated>2018-05-04T04:08:59Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Rubric Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/twwprx9d/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Done==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. In ensuring the previous tests worked, we could then be sure the private methods within the grades_controller.rb file were working properly.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The tests verify that the correct frequency of raw scores is received from the database. A test is performed for rubric criteria that vary by round and one is created for an assignment where the rubric does not vary.&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
Some obsolete codes in the review_mapping_controller.rb are deleted and the previous test still works.&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores.&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://www.youtube.com/watch?v=nKu3LyFvm4M&amp;amp;feature=youtu.be Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117386</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117386"/>
		<updated>2018-05-03T23:04:37Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Class Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG |center]]&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
==Testing Done==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. In ensuring the previous tests worked, we could then be sure the private methods within the grades_controller.rb file were working properly.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The tests verify that the correct frequency of raw scores is received from the database. A test is performed for rubric criteria that varies by round and one is created for an assignment where the rubric does not vary.&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://github.com/expertiza/expertiza/pull/1167 Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117385</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117385"/>
		<updated>2018-05-03T23:00:19Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Future Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG |center]]&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
==Testing Done==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. In ensuring the previous tests worked, we could then be sure the private methods within the grades_controller.rb file were working properly.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
With regards to the class performance, an enhancement of showing the breakdown of weighted scores 0-100% could be shown instead of displaying the frequency of raw 0-5 scores.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our video [https://github.com/expertiza/expertiza/pull/1167 Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117383</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117383"/>
		<updated>2018-05-03T22:57:05Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Class Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires. You can also see the result below, in the picture of the graph provided.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment. In addition to implementing the flot graphical representation, we also created a tooltip which allows the instructor to see the percentage of people who scored a certain value on any rubric questions of any round.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of what the completed flot graph looks like:&lt;br /&gt;
&lt;br /&gt;
[[File:Visualization_graph_complete.JPG |center]]&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization allows the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization allows the user to switch between the preliminary round and the final round as well as view a combined view.  As with the rubric criteria visualization, hovering over a bar in the class performance visualization brings up a tooltip indicating the score and frequency of teams that earned that score.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_performance_graph.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
There some obsolete codes in review_mapping_helper.rb about Dr. Kidd's course. Those codes were intended to calculate author feedbacks of reviews and there are also some related codes in _review_report.html.erb. However, in the view part, those codes are commented and those do not work. In fact, Dr. Kidd's course is 806, which is not on Expertiza now. So those obsolete codes are removed. Since in the testing files there are no corresponding codes for those parts, the previous tests still work.&lt;br /&gt;
The new review table allows the instructor to sort the result by more options, like the number of reviews completed, the average volume and the average score. The page is given as below.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBox_Expertiza_Development_1_1_28_04_2018_23_24_38.png]]&lt;br /&gt;
&lt;br /&gt;
The remaining challenge is to integrate the author feedback to the review report page. It is hard because of multiple reasons. Some reviews have 3 rounds. The feedback of each round has multiple questions. Some are scored questions but some are not. In fact, even the author feedback report does not include the specific score.&lt;br /&gt;
&lt;br /&gt;
==Testing Done==&lt;br /&gt;
&lt;br /&gt;
===Rubric Representation===&lt;br /&gt;
In terms of ensuring correct operation of the system under the changes made, our goal was to ensure the previous tests worked, as not much was entirely changed about the view controller method. In ensuring the previous tests worked, we could then be sure the private methods within the grades_controller.rb file were working properly.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
One consideration to improve upon the work we have done, is to make it so that the visualization graph that shows participant performance on every rubric question in each round can handle assignments which vary the number of rubric questions between rounds. Currently the set-up does not support such a feature.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request]&lt;br /&gt;
Here is our video [https://github.com/expertiza/expertiza/pull/1167 Visualization for Instructors Walkthrough]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117214</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=117214"/>
		<updated>2018-04-29T03:32:55Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Class Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
In order to Improve the visualization of the rubric question data, we decided to use the flot javascript library instead of highcharts. In order to accomplish this, we constructed an adapter that took the already generate highchart data by the previous team, and converted it to a representation required by our flot graph. This is done in the highchart_to_flot_adapter method in the app/controllers/grades_controller.rb file.&lt;br /&gt;
&lt;br /&gt;
==== Color Scheme ====&lt;br /&gt;
&lt;br /&gt;
For fixing the color scheme, we used the adapter that was made to obtain the correct data, and instead of using their randomly generated colors, in the adapter there was a 6 element array with colors from red to green. This was inputted into the data series as per the correct format flot requires.&lt;br /&gt;
&lt;br /&gt;
==== Rubric Representation ====&lt;br /&gt;
&lt;br /&gt;
To implement this, in the adapter we formed the data series such that different review rounds would be separated and clustered among their own review questions. This allows an easier viewing of different review rounds in order to determine how the class improved. The data passed to the _team_charts.html.erb view file contains all of the questions for all review rounds associated with the assignment.&lt;br /&gt;
&lt;br /&gt;
===Class Performance===&lt;br /&gt;
The Class Performance visualization will allow the instructor to view a histogram of 0 to 5 scores for a particular assignment. Furthermore, the visualization will allow the user to switch between the preliminary submission and the final submission as well as view a combined view.&lt;br /&gt;
&lt;br /&gt;
===Review Performance===&lt;br /&gt;
&lt;br /&gt;
== Pending Tasks ==&lt;br /&gt;
&lt;br /&gt;
Currently our project is not complete end to end. It is our hope to complete various aspects in order have a more fruitful demo. That being said, the visualization changes are currently suffering difficulties in data formatting. For that task the front end is already complete as can be seen above.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116785</id>
		<title>File:ClassPerformanceStackedBarChartsWithToolTips.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116785"/>
		<updated>2018-04-23T02:36:24Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: uploaded a new version of &amp;amp;quot;File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116784</id>
		<title>File:ClassPerformanceStackedBarChartsWithToolTips.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116784"/>
		<updated>2018-04-23T02:34:03Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: uploaded a new version of &amp;amp;quot;File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116783</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116783"/>
		<updated>2018-04-23T02:32:51Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/90/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116679</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116679"/>
		<updated>2018-04-14T21:21:13Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:ClassPerformanceStackedBarChartsWithToolTips.JPG‎|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/89/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116678</id>
		<title>File:ClassPerformanceStackedBarChartsWithToolTips.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116678"/>
		<updated>2018-04-14T21:20:14Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: uploaded a new version of &amp;amp;quot;File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116677</id>
		<title>File:ClassPerformanceStackedBarChartsWithToolTips.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassPerformanceStackedBarChartsWithToolTips.JPG&amp;diff=116677"/>
		<updated>2018-04-14T21:16:03Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116676</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116676"/>
		<updated>2018-04-14T21:15:21Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Flot_Stacked_Bar.png|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/89/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116648</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116648"/>
		<updated>2018-04-14T03:09:26Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source web application based on [http://rubyonrails.org/ Ruby on Rails] framework,  supported by the National Science Foundation. &lt;br /&gt;
It is a place where students can submit and peer-review learning objects (assignments, codes, write ups, websites, etc). For an instructor, expertiza allows to create and customize new or existing assignments. For students, it allows to create and work on various projects and assignments. It provides a platform to peer review other students' submissions across various document types, including the URLs and wiki pages. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Design Process Flow ==&lt;br /&gt;
&lt;br /&gt;
Below you can see a flowchart representing the graphical flow of an instructor visiting the visualization page we are modifying.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Graphic_Flow.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Once the instructor visits the visualization page, they will already see a bar graph displaying how all the teams scored on each rubric criteria. Below this will be buttons or some other method by which to select the data that you want. The whole process flow involves being able to traverse the visualization page in a quick and efficient manner, since oftentimes the instructor will visit the page often. Below we will go into our intended design route for this project.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Here is a mock-up of our intended page:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''flot javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual. The last team which worked on this project used the ''highcharts javascript library'', but we have decided to move to ''flot'' due to visual clarity and the ability to easily decide which data to display.&lt;br /&gt;
&lt;br /&gt;
Another mock-up of how the UI could be designed, is that by visiting the visualization page, the instructor will see a graph followed by an array of buttons.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Flot_Stacked_Bar.png|frame|center|alt=Stacked Bar|&amp;lt;div style=&amp;quot;text-align: center&amp;quot;&amp;gt;The source for this graph is at [https://jsfiddle.net/aspandit/ap3ba5gu/45/ jsfiddle] &amp;lt;/div&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
The chart above shows stacked bar charts of a single submission. Each bar represents a question from the submission and the colors represent the percentage of teams that earned a 0(red) through 5(green) on the submission.&lt;br /&gt;
&lt;br /&gt;
[[File:Final_Project_Buttons.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we plan on implementing an array of buttons to carry out simple manipulations to data and to display only the data the instructor wants to. We plan on implementing buttons to change the graphic that is displayed, so that if an instructor wishes to see a pie chart or histogram, they can click the button and see the data in a different form. Below those buttons, there will be other ones which will direct the page on what type of table to display and with which information. The reason for these adjustments are that in the last semester's implementation, the table was quite lengthy, and this will make it more manageable by the instructor.&lt;br /&gt;
&lt;br /&gt;
It is possible that if we are able to, we plan on implementing a drop down functionality like in the mock-up further up the page where you can be even more selective about the data you wish to display in the tables or in the graphics.&lt;br /&gt;
&lt;br /&gt;
==Modified Files==&lt;br /&gt;
Generally we plan on modifying the same files as the previous group did. The controllers of grade and assignment are involved. For the view part, we will modify the view of grade and review_mapping. We may also create new view files.&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/views/grades/view.html.erb (partials below)&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;
== Testing Plan ==&lt;br /&gt;
Since it is based on a previous project, we need to refactor some previous code while making sure the previous test files ('''assignments_controller_spec.rb''' and '''grades_controller_spec.rb''') still work. We are going to test new features we add in the future. &lt;br /&gt;
&lt;br /&gt;
It is beyond the scope of the course to test the graphs. We will only test the Ruby code.The tests will most likely use RSpec and the existing factories in Expertiza.&lt;br /&gt;
&lt;br /&gt;
As we will use Javascript to achieve an interactive visualization, we will test the functionality of Javascript codes manually.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116382</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116382"/>
		<updated>2018-04-08T23:22:54Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Preliminary Design ==&lt;br /&gt;
&lt;br /&gt;
A mock-up of our potential implementation of the graphic visual may be seen below.&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''highcharts javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual.&lt;br /&gt;
&lt;br /&gt;
As denoted in the problem statement, we will also address the table of review data. Currently it is overwhelming and we would like to simplify it by maintaining the ability to inspect the data. We will devise a method to sort the table contents and to only display what is requested.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Here is our project [https://github.com/aspandit/expertiza repo] &amp;lt;br /&amp;gt;&lt;br /&gt;
Here is our created [https://github.com/expertiza/expertiza/pull/1167 Pull Request]&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116223</id>
		<title>CSC/ECE 517 Spring 2018- Project E1816: Visualization for Instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1816:_Visualization_for_Instructors&amp;diff=116223"/>
		<updated>2018-04-07T05:48:53Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Preliminary Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
===Team Members===&lt;br /&gt;
Daniel Burcal (djburcal@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Patrick Francisco Poggi (pfpoggi@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Ambareesh Pandit (aspandit@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Minghao Pan (mpan2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
A previous team has worked on creating this visualization graphic for Instructors, which can be found [https://docs.google.com/document/d/1ybg9CK03_j3QtLI9R6vJqYunz8_I_pO9BX7iPGNe95o/edit# here]. We are tasked with building upon the work they have performed as well as improving the visualization aspect for instructors. Specifically we can narrow the goals of this project as follows:&lt;br /&gt;
&lt;br /&gt;
:#The Visualization of the compiled metrics is confusing. We will aim to use a more coherent color scheme from red to green for the graph. We want to allow the instructor to dynamically generate graphs with the data they request. We will separate the table into partials or use a scheme to only show the sections of the table the instructor requests&lt;br /&gt;
:#There are ways to compile review data together such that it is even easier for the instructor to identify weaknesses and strengths. To that end, we would like to integrate review performance by compiling various feedback data that is collected. This would include the number of reviews performed, the length of the reviews, the summary of the reviews, whether or not the reviewers uploaded a file in their review, the average ratings the reviewers received from authors.&lt;br /&gt;
:#Another useful feature would be the ability to visualize class performance on a certain rubric criteria. Further, if these criteria are common ones used between projects, it would be very helpful to be able to compare performance between assignments on the common criteria.&lt;br /&gt;
&lt;br /&gt;
== Preliminary Design ==&lt;br /&gt;
&lt;br /&gt;
A mock-up of our potential implementation of the graphic visual may be seen below.&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_Shot_2018-04-06_at_5.14.11_PM.png]]&lt;br /&gt;
&lt;br /&gt;
As you can see, we will have menu options by which the instructor can choose which data members to show and likewise the type of graphic visual they would like to produce. This will make it so that the instructors can visualize only the data they want to, and in the form that gives them the most relevant information. We plan on using the ''highcharts javascript library'' to implement the graphic visuals, which will provide an easy and clear visual of the requested data. Under the visual, we will have a way to select between teams and individual students' data to further target the desired visual.&lt;br /&gt;
&lt;br /&gt;
As denoted in the problem statement, we will also address the table of review data. Currently it is overwhelming and we would like to simplify it by maintaining the ability to inspect the data. We will devise a method to sort the table contents and to only display what is requested.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentAssignmentsList.jpg&amp;diff=115967</id>
		<title>File:StudentAssignmentsList.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentAssignmentsList.jpg&amp;diff=115967"/>
		<updated>2018-04-03T04:17:48Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:AssignmentMenu.jpg&amp;diff=115966</id>
		<title>File:AssignmentMenu.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:AssignmentMenu.jpg&amp;diff=115966"/>
		<updated>2018-04-03T04:17:14Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SignupSheet.jpg&amp;diff=115965</id>
		<title>File:SignupSheet.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SignupSheet.jpg&amp;diff=115965"/>
		<updated>2018-04-03T04:16:55Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115964</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115964"/>
		<updated>2018-04-03T04:16:24Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Sign up for a topic as a student */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#:[[File:ToBeDeleted.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[File:DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
To edit a topic to an assignment,&lt;br /&gt;
#Select the [[File:editButton.jpg]] on the desired topic of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Edit Dialog, make the desired edits and click Save.&lt;br /&gt;
#:[[File:EditDialog.jpg]]&lt;br /&gt;
#The newly editted topic will appear with the new value(s).&lt;br /&gt;
#:[[File:NewlyEdittedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;OSS project/Writing assignment 2&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:FinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the unavailable actions(add,edit,delete) and bookmarks absent for each unfinished topics.&lt;br /&gt;
#:[[File:FinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
#Log in as &amp;quot;student5918&amp;quot; with the password &amp;quot;password&amp;quot; at &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt;.&lt;br /&gt;
#Select &amp;quot;Final Project (and Design Document)&amp;quot; from the assignments list.&lt;br /&gt;
#:[[File:StudentAssignmentsList.jpg]]&lt;br /&gt;
#Select &amp;quot;Signup sheet&amp;quot; from the assignment menu.&lt;br /&gt;
#:[[File:AssignmentMenu.jpg]]&lt;br /&gt;
#Select the check icon next to the desired topic.&lt;br /&gt;
#:[[File:SignupSheet.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115963</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115963"/>
		<updated>2018-04-03T04:16:09Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Sign up for a topic as a student */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#:[[File:ToBeDeleted.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[File:DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
To edit a topic to an assignment,&lt;br /&gt;
#Select the [[File:editButton.jpg]] on the desired topic of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Edit Dialog, make the desired edits and click Save.&lt;br /&gt;
#:[[File:EditDialog.jpg]]&lt;br /&gt;
#The newly editted topic will appear with the new value(s).&lt;br /&gt;
#:[[File:NewlyEdittedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;OSS project/Writing assignment 2&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:FinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the unavailable actions(add,edit,delete) and bookmarks absent for each unfinished topics.&lt;br /&gt;
#:[[File:FinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
#Log in as &amp;quot;student5918&amp;quot; with the password &amp;quot;password&amp;quot; at &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt;.&lt;br /&gt;
#Select &amp;quot;Final Project (and Design Document)&amp;quot; from the assignments list.&lt;br /&gt;
#:[[File:StudentAssignmentsList.jpg]]&lt;br /&gt;
#Select &amp;quot;Signup sheet&amp;quot; from the assignment menu.&lt;br /&gt;
#:[[File:AssignmentMenu.jpg]]&lt;br /&gt;
#Select the check icon next to the desired topic.&lt;br /&gt;
#:[File:SignupSheet.jpg]&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:FinishedAssignmentsTabs.JPG&amp;diff=115957</id>
		<title>File:FinishedAssignmentsTabs.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:FinishedAssignmentsTabs.JPG&amp;diff=115957"/>
		<updated>2018-04-03T04:10:11Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115956</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115956"/>
		<updated>2018-04-03T04:09:59Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Navigate to finished assignment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#:[[File:ToBeDeleted.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[File:DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
To edit a topic to an assignment,&lt;br /&gt;
#Select the [[File:editButton.jpg]] on the desired topic of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Edit Dialog, make the desired edits and click Save.&lt;br /&gt;
#:[[File:EditDialog.jpg]]&lt;br /&gt;
#The newly editted topic will appear with the new value(s).&lt;br /&gt;
#:[[File:NewlyEdittedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;OSS project/Writing assignment 2&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:FinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the unavailable actions(add,edit,delete) and bookmarks absent for each unfinished topics.&lt;br /&gt;
#:[[File:FinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:FinishedAssignmentTopicsTab.JPG&amp;diff=115955</id>
		<title>File:FinishedAssignmentTopicsTab.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:FinishedAssignmentTopicsTab.JPG&amp;diff=115955"/>
		<updated>2018-04-03T04:08:59Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115952</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115952"/>
		<updated>2018-04-03T04:08:28Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Navigate to finished assignment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#:[[File:ToBeDeleted.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[File:DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
To edit a topic to an assignment,&lt;br /&gt;
#Select the [[File:editButton.jpg]] on the desired topic of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Edit Dialog, make the desired edits and click Save.&lt;br /&gt;
#:[[File:EditDialog.jpg]]&lt;br /&gt;
#The newly editted topic will appear with the new value(s).&lt;br /&gt;
#:[[File:NewlyEdittedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;OSS project/Writing assignment 2&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the unavailable actions(add,edit,delete) and bookmarks absent for each unfinished topics.&lt;br /&gt;
#:[[File:FinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:NewlyEdittedTopic.jpg&amp;diff=115943</id>
		<title>File:NewlyEdittedTopic.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:NewlyEdittedTopic.jpg&amp;diff=115943"/>
		<updated>2018-04-03T04:02:45Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditDialog.jpg&amp;diff=115941</id>
		<title>File:EditDialog.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditDialog.jpg&amp;diff=115941"/>
		<updated>2018-04-03T04:02:22Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditButton.jpg&amp;diff=115939</id>
		<title>File:EditButton.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditButton.jpg&amp;diff=115939"/>
		<updated>2018-04-03T04:02:05Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115927</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115927"/>
		<updated>2018-04-03T03:55:32Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Edit topic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#:[[File:ToBeDeleted.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[File:DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
To edit a topic to an assignment,&lt;br /&gt;
#Select the [[File:editButton.jpg]] on the desired topic of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Edit Dialog, make the desired edits and click Save.&lt;br /&gt;
#:[[File:EditDialog.jpg]]&lt;br /&gt;
#The newly editted topic will appear with the new value(s).&lt;br /&gt;
#:[[File:NewlyEdittedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115925</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115925"/>
		<updated>2018-04-03T03:52:43Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Delete topic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#:[[File:ToBeDeleted.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[File:DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:DeletedTopic.jpg&amp;diff=115924</id>
		<title>File:DeletedTopic.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:DeletedTopic.jpg&amp;diff=115924"/>
		<updated>2018-04-03T03:51:04Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ToBeDeleted.jpg&amp;diff=115922</id>
		<title>File:ToBeDeleted.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ToBeDeleted.jpg&amp;diff=115922"/>
		<updated>2018-04-03T03:49:46Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:DeleteConfirmation.jpg&amp;diff=115921</id>
		<title>File:DeleteConfirmation.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:DeleteConfirmation.jpg&amp;diff=115921"/>
		<updated>2018-04-03T03:49:30Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:DeleteButton.jpg&amp;diff=115920</id>
		<title>File:DeleteButton.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:DeleteButton.jpg&amp;diff=115920"/>
		<updated>2018-04-03T03:49:09Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115919</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115919"/>
		<updated>2018-04-03T03:48:59Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Delete topic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#:[[File:ToBeDeleted.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115917</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115917"/>
		<updated>2018-04-03T03:45:22Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Delete topic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
To Delete a topic from the Topics tab,&lt;br /&gt;
#Select the [[File:DeleteButton.jpg]] for the topic you wish to delete.&lt;br /&gt;
#Confirm that you would like to delete the selected topic.&lt;br /&gt;
#:[[File:DeleteConfirmation.jpg]]&lt;br /&gt;
#Note that the topic is no longer in the table.&lt;br /&gt;
#:[[DeletedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:NewlyAddedTopic.jpg&amp;diff=115914</id>
		<title>File:NewlyAddedTopic.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:NewlyAddedTopic.jpg&amp;diff=115914"/>
		<updated>2018-04-03T03:42:21Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:AddDialog.jpg&amp;diff=115913</id>
		<title>File:AddDialog.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:AddDialog.jpg&amp;diff=115913"/>
		<updated>2018-04-03T03:41:59Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:AddButton.jpg&amp;diff=115912</id>
		<title>File:AddButton.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:AddButton.jpg&amp;diff=115912"/>
		<updated>2018-04-03T03:41:38Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115911</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115911"/>
		<updated>2018-04-03T03:41:25Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Add topic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
To add a topic to an assignment,&lt;br /&gt;
#Select the [[File:addButton.jpg]] on the Topics tab of the unfinished assignment that was navigated to in the first section.&lt;br /&gt;
#In the subsequent Add Dialog, enter values for the Topic id, Topic name and Number of slots and click Save.&lt;br /&gt;
#:[[File:AddDialog.jpg]]&lt;br /&gt;
#The newly added topic will appear in the table sorted by Topic #.&lt;br /&gt;
#:[[File:NewlyAddedTopic.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115906</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115906"/>
		<updated>2018-04-03T03:32:23Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Navigate to unfinished assignment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.JPG]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.JPG]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.JPG]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115905</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115905"/>
		<updated>2018-04-03T03:28:21Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Navigate to unfinished assignment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
#Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
#Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
#:[[File:ManageAssignments.jpg]]&lt;br /&gt;
#Click the [[File:EditPencilIcon.jpg]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
#Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
#:[[File:UnfinishedAssignmentsTabs.jpg]]&lt;br /&gt;
#Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
#:[[File:UnfinishedAssignmentTopicsTab.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115890</id>
		<title>CSC/ECE 517 Spring 2018- Project E1804: OSS project Yellow: Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1804:_OSS_project_Yellow:_Topic_management&amp;diff=115890"/>
		<updated>2018-04-03T03:16:34Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: /* Navigate to unfinished assignment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of our Expertiza project.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RUN &amp;quot;./setup.sh&amp;quot; BEFORE RUNNING APP; CONTENTS OF &amp;quot;bower.json&amp;quot; HAVE CHANGED &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;'''&lt;br /&gt;
&lt;br /&gt;
== Important links ==&lt;br /&gt;
* '''Deployed app: https://vast-bastion-53966.herokuapp.com/'''&lt;br /&gt;
* Github repo: https://github.com/dburcal/expertiza&lt;br /&gt;
* Github pull request: https://github.com/expertiza/expertiza/pull/1144&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== '''Expertiza Background''' ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web-based framework designed in Ruby on Rails to serve as a medium for students and professors to interact, provide feedback, and manage their assignments. It facilitates all of the electronic turn-ins and provides a good place to review your peers' work.&lt;br /&gt;
&lt;br /&gt;
=== '''Problem Statement''' ===&lt;br /&gt;
To enhance topic management for instructors and students.&lt;br /&gt;
* '''Issue 971''': Change create topic UI to AJAX&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 926''': Sort topics by topic number in assignment#edit&lt;br /&gt;
::&lt;br /&gt;
* '''Issue 718''': Allow instructors to give feedback when accepting or rejecting suggestions,add comments on those suggestions.&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
=== '''Our Goals''' ===&lt;br /&gt;
We planned to improve the functionality such that when instructors have to manage the topics for an assignment, they can do so much quicker and more reliably.&lt;br /&gt;
&lt;br /&gt;
=== '''Files Edited''' ===&lt;br /&gt;
&lt;br /&gt;
* app/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
* app/spec/features/topic_suggestion_spec.rb&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/assets/stylesheets/signup.scss.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_topic.html.erb&lt;br /&gt;
* app/views/signup/signup_topics.html.erb&lt;br /&gt;
* app/views/suggestion/show.html.erb&lt;br /&gt;
* app/views/suggestion/update_comment.html.erb&lt;br /&gt;
* app/views/suggestion/edit_comment.html.erb&lt;br /&gt;
* app/views/suggestion/_form_comment.html.erb&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* bower.json&lt;br /&gt;
&lt;br /&gt;
== Issue 971 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::The implementation of this functionality was started using &amp;lt; http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2017/E1781_Topic_Management &amp;gt; as a baseline.  This issue calls for the replacement of the html table with a javascript table using jsGrid. The use of jsGrid in conjunction with AJAX calls allow for the user to complete actions such as edit and add for topics from a single page.&lt;br /&gt;
&lt;br /&gt;
::Furthermore, replacing the html table with a dynamic table should not disrupt the html table for topic signup available to the student.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::Addition of advertisements is pending. Values for formatting the width of the table columns to enable the table to fit the jQuery UI tab is present, but not fully operational.&lt;br /&gt;
&lt;br /&gt;
==== '''Functionality walkthroughs''' ====&lt;br /&gt;
::The functionality below is for an instructor user unless mentioned otherwise.&lt;br /&gt;
&lt;br /&gt;
===== '''Navigate to unfinished assignment''' =====&lt;br /&gt;
# Log in to &amp;lt; https://vast-bastion-53966.herokuapp.com &amp;gt; using the username &amp;quot;instructor6&amp;quot; and password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Select &amp;quot;Manage...&amp;quot; -&amp;gt; &amp;quot;Assignments&amp;quot; from the dropdown at the top.&lt;br /&gt;
[[File:ManageAssignments.jpg]]&lt;br /&gt;
# Click the [[File:PencilEditIcon.jpg]] for the &amp;quot;Final Project (and Design Document)&amp;quot; assignment.&lt;br /&gt;
# Select the &amp;quot;Topics&amp;quot; tab for the assignment.&lt;br /&gt;
[[File:UnfinishedAssignmentsTabs.jpg]]&lt;br /&gt;
# Note the available actions(add,edit,delete) and bookmarks available for each unfinished topic.&lt;br /&gt;
[[File:UnfinishedAssignmentTopicsTab.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== '''Add topic''' =====&lt;br /&gt;
===== '''Delete topic''' =====&lt;br /&gt;
===== '''Edit topic''' =====&lt;br /&gt;
===== '''Navigate to finished assignment''' =====&lt;br /&gt;
===== '''Sign up for a topic as a student''' =====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
===== '''Automatic Testing''' =====&lt;br /&gt;
&lt;br /&gt;
::For testing the new functionality of  methods in the sign_up_sheet_controller, we tested that JSON was correctly rendered from the load_add_signup_topics method, which loads the topics into the edit assignment table&lt;br /&gt;
::* There were four JSON outputs which were tested:&lt;br /&gt;
::**slots_waitlisted is correctly outputted as JSON&lt;br /&gt;
::**slots_filled_value is correctly outputted as JSON&lt;br /&gt;
::**slots_available is correctly outputted as JSON&lt;br /&gt;
::**participants is correctly outputted as JSON&lt;br /&gt;
::'''app/spec/controllers/sign_up_sheet_controller_spec.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe'#load_add_signup_topics' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(SignUpTopic).to receive(:where).with(&amp;quot;assignment_id = ?&amp;quot;, &amp;quot;1&amp;quot;).and_return([topic])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_filled).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignUpTopic).to receive(:find_slots_waitlisted).with(&amp;quot;1&amp;quot;).and_return([double('SignedUpTeam', count: 0,topic_id: 1)])&lt;br /&gt;
      allow(SignedUpTeam).to receive(:find_team_participants).with(&amp;quot;1&amp;quot;).and_return([double('User', topic_id: 0)])&lt;br /&gt;
      params = {id: 1, topic_id: 1}&lt;br /&gt;
      get :load_add_signup_topics, params&lt;br /&gt;
      @parsed_response = JSON.parse( response.body )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_waitlisted correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_waitlisted&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_filled_value correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_filled_value&amp;quot;]).to eq(0)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns slots_available correctly as JSON' do&lt;br /&gt;
      expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;slots_available&amp;quot;]).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'There are no participants' do&lt;br /&gt;
      it 'returns participants as empty as JSON' do&lt;br /&gt;
        expect(@parsed_response[&amp;quot;sign_up_topics&amp;quot;][0][&amp;quot;participants&amp;quot;]).to be_empty&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Testing Walkthrough''' ====&lt;br /&gt;
::In order to test this area of the project, you need to:&lt;br /&gt;
::*Install the environment using ./setup.sh&lt;br /&gt;
::*run bundle install&lt;br /&gt;
::*run 'rspec spec/controllers/sign_up_sheet_controller_spec.rb'&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::Overall there are a few more outputs from the method that could be tested. These are values that are pivotal to the table and so testing them is important, so if we are able to, we would like to add those to the project as well, but besides that are proud of the tests that do work.&lt;br /&gt;
&lt;br /&gt;
== Issue 926 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We let JSGrid handle the sorting of topics by the headers in the table. We altered the AJAX controller to enable this sorting.&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
::While the table is able to be sorted by the header row, whenever you make a new topic the initial list of topics is not resorted right away. This leads to say E1502, a new topic just made, to be at the bottom of the list when it would normally precede say E1700, if it were in the same topic list.&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
::There is no testing required in this aspect, since sorting is a feature of the AJAX table itself, and therefore it wouldn't make sense to test the implementation.&lt;br /&gt;
&lt;br /&gt;
== Issue 718 ==&lt;br /&gt;
==== '''Implementation''' ====&lt;br /&gt;
::We implemented the functionality for approving and rejecting any topic suggestions made by the students. Furthermore we have included comments which the instructor can give for a particular topic suggestion. Some tests have been added to verify the above functionality. The functionality of editing comments also has been correctly implemented.&lt;br /&gt;
::'''Goals achieved according to the spec file:'''&lt;br /&gt;
::1. Implement approving and rejecting suggestions.&lt;br /&gt;
::2. Adding comments to the suggestions(can be multiple).&lt;br /&gt;
::'''Additional Goals achieved:'''&lt;br /&gt;
::1. Editing comments in the suggestions view.&lt;br /&gt;
::2. Removing redundant Approve and Reject suggestion button which were present on the suggestion screen.&lt;br /&gt;
::'''Files which have been changed to reflect the changes:'''&lt;br /&gt;
::1. '''app/view/suggestion/show.html.erb'''&lt;br /&gt;
::*To see all the comments and to edit individual comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;colgroup&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=15% /&amp;gt;&lt;br /&gt;
      &amp;lt;col width=25% /&amp;gt;&lt;br /&gt;
    &amp;lt;/colgroup&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Commenter&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Vote&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Comment&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestioncomment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestioncomment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%if suggestioncomment.vote == 'Y' %&amp;gt;&lt;br /&gt;
                Yes&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'N'%&amp;gt;&lt;br /&gt;
                No&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'R'%&amp;gt;&lt;br /&gt;
                Revise&lt;br /&gt;
                &amp;lt;!-- Two more crieteria for displaying comments. During Approval and Denial. Issue #1781-718 --&amp;gt;&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'A'%&amp;gt;&lt;br /&gt;
                Approved&lt;br /&gt;
            &amp;lt;%elsif suggestioncomment.vote == 'D'%&amp;gt;&lt;br /&gt;
                Denied&lt;br /&gt;
            &amp;lt;%else%&amp;gt;&lt;br /&gt;
                --&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td class=&amp;quot;listingRow&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= suggestioncomment.comments%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Edit Comment&amp;quot;,{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;edit_comment&amp;quot;,:suggestioncomment=&amp;gt;suggestioncomment}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*To add a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' %&amp;gt;&lt;br /&gt;
  &amp;lt;b&amp;gt;Add new comment and vote&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  &amp;lt;%= form_tag :action =&amp;gt; 'submit', :id =&amp;gt; @suggestion do %&amp;gt;&lt;br /&gt;
    &amp;lt;%= text_area &amp;quot;suggestion_comment&amp;quot;, &amp;quot;comments&amp;quot;, :rows =&amp;gt; 5, :cols =&amp;gt; 50 %&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;%= &amp;quot;Vote&amp;quot;%&amp;gt;&lt;br /&gt;
      &amp;lt;%= select(&amp;quot;suggestion_comment&amp;quot;,&amp;quot;vote&amp;quot;,{&amp;quot;Yes&amp;quot; =&amp;gt;&amp;quot;Y&amp;quot;,&amp;quot;No&amp;quot;=&amp;gt;&amp;quot;N&amp;quot;,&amp;quot;Revise&amp;quot;=&amp;gt;&amp;quot;R&amp;quot;}) %&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Submit vote&amp;quot;, :name =&amp;gt; 'add_comment' %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::2. '''app/views/suggestion/edit_comment.html.erb'''&lt;br /&gt;
::*Link to form for editing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt; Editing suggestion comments&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt;&amp;quot;form_comment&amp;quot;, suggestion_comment: @suggestioncomment %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%#= link_to 'Back', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::3. '''app/views/suggestion/_form_comment.html.erb'''&lt;br /&gt;
::*Form for editing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for :suggestioncomment,:url=&amp;gt;{:controller=&amp;gt;&amp;quot;suggestion&amp;quot;,:action=&amp;gt;&amp;quot;update_comment&amp;quot;,:id=&amp;gt;@suggestioncomment.id},:method=&amp;gt;&amp;quot;post&amp;quot;  do |form|%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :comments %&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_area :comments,value: @suggestioncomment.comments,:rows =&amp;gt; 5, :cols =&amp;gt; 50%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div class = &amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.label :vote%&amp;gt;&lt;br /&gt;
      &amp;lt;%= form.text_field :vote,value: @suggestioncomment.vote %&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :suggestioncomment,value: @suggestioncomment%&amp;gt;&lt;br /&gt;
    &amp;lt;%= form.hidden_field :id,value: @suggestioncomment.suggestion_id%&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;actions&amp;quot;&amp;gt;&lt;br /&gt;
      Click to Update&lt;br /&gt;
      &amp;lt;%= form.submit%&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;%= link_to 'Back',:controller=&amp;gt;&amp;quot;suggestion&amp;quot;, :action =&amp;gt; &amp;quot;show&amp;quot;,:id =&amp;gt; @suggestioncomment.suggestion_id %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::4. '''app/controllers/suggestion_controller.rb'''&lt;br /&gt;
&lt;br /&gt;
::*For approving and rejecting suggestions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def approve_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of approval as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when approval is made and saving those in&lt;br /&gt;
    # Database with Vote type as A - meaning approval&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
    end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Accepted')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully accepted.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when accepting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def reject_suggestion&lt;br /&gt;
    # 1781 - 718 issue&lt;br /&gt;
    # The Instructor should be able to give feed backs during the times of rejection as well.&lt;br /&gt;
    # Thus we are getting the comments through the request when denial is made and saving those in&lt;br /&gt;
    # Database with Vote type as D - meaning reject&lt;br /&gt;
    if params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot;&lt;br /&gt;
      @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
      @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
      @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
      @suggestioncomment.save&lt;br /&gt;
      end&lt;br /&gt;
    @suggestion = Suggestion.find(params[:id])&lt;br /&gt;
&lt;br /&gt;
    if @suggestion.update_attribute('status', 'Rejected')&lt;br /&gt;
      flash[:notice] = 'The suggestion has been successfully rejected.'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = 'An error occurred when rejecting the suggestion.'&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'show', id: @suggestion&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For adding a comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.new(vote: params[:suggestion_comment][:vote], comments: params[:suggestion_comment][:comments])&lt;br /&gt;
    @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
    @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
    if @suggestioncomment.save&lt;br /&gt;
      flash[:notice] = &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;There was an error in adding your comment.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if current_role_name.eql? 'Student'&lt;br /&gt;
      redirect_to action: &amp;quot;student_view&amp;quot;, id: params[:id]&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: &amp;quot;show&amp;quot;, id: params[:id]&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For editing comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def edit_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:suggestioncomment])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
::*For updating comments:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def update_comment&lt;br /&gt;
    @suggestioncomment = SuggestionComment.find(params[:id])&lt;br /&gt;
    @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
    #if @suggestioncomment.update(suggestioncomment_params)&lt;br /&gt;
      #redirect_to :action=&amp;gt;&amp;quot;show&amp;quot;,:id=&amp;gt;@suggestioncomment.suggestion_id&lt;br /&gt;
    #end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Images showing the jist for testing&lt;br /&gt;
&lt;br /&gt;
==== '''Further Implementation Required''' ====&lt;br /&gt;
&lt;br /&gt;
==== '''Testing''' ====&lt;br /&gt;
&lt;br /&gt;
===== '''UI Testing''' =====&lt;br /&gt;
::''''The following steps should be followed to test the functionality:''''&lt;br /&gt;
::''''1. Login as a student2065/2064/2066 with password:password''''&lt;br /&gt;
::''''2. Select any assignment,for example Click on view(RHS of the assignment)&amp;quot;wiki Textbook&amp;quot; and then click on &amp;quot;suggest a topic&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturestu_1.png|frame|center|x|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz_capturestu_2.png|frame|center|x|]]&lt;br /&gt;
::''''3. Add your suggestion.''''&lt;br /&gt;
[[File:Rsz_1capturestu_3.png|frame|center|x|]]&lt;br /&gt;
::''''4. Login as instructor6 and password:password.''''&lt;br /&gt;
::''''5. Go to assignments and search for &amp;quot;wiki textbook&amp;quot;.''''&lt;br /&gt;
[[File:Rsz_capturea.png|frame|center|x|]]&lt;br /&gt;
::''''6. Click on the &amp;quot;view suggestion&amp;quot; icon on the right side of the screen.''''&lt;br /&gt;
::''''7. Add a comment on that suggestion and submit.''''&lt;br /&gt;
[[File:Rsz_capturesugg_comm.png|frame|center|x|]]&lt;br /&gt;
::''''8. Can edit the comment by clicking on the &amp;quot;Edit Comment&amp;quot; button.''''&lt;br /&gt;
[[File:Rsz_captureedit.png|frame|center|x|]]&lt;br /&gt;
::''''9. Login as student and you can see the comment when you go to the assignment and associated topic.''''&lt;br /&gt;
::&lt;br /&gt;
::&lt;br /&gt;
::Tests have been added to the spec for testing the above functionality.The following changes are made to the related spec files.&lt;br /&gt;
::'''spec/features/topic_suggestion_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
===== '''Automatic Testing''' ======&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#part 2###########################&lt;br /&gt;
      #######part 2#####################&lt;br /&gt;
      #############part 2###############issue 718&lt;br /&gt;
      ###################part 2#########&lt;br /&gt;
      #########################part 2###&lt;br /&gt;
      describe &amp;quot;topic_suggestion&amp;quot; do&lt;br /&gt;
        it &amp;quot;Instructor set an assignment which allow student suggest topic and register student2066&amp;quot; do&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2066 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          # DUE date need to be added here&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        it &amp;quot; student2066 hold suggest topic and suggest a new one and student2064 enroll on waitlist of suggested topic&amp;quot;, js: true do&lt;br /&gt;
          # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # student2064 suggest topic&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          click_link('View',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          # case 2 student already have topic switch to new topic&lt;br /&gt;
          # need two students one to be on the waitlist of previous suggested topic,&lt;br /&gt;
          # the other one (student2064) is holding it and suggest another topic and wish to switch to the new one&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          first(&amp;quot;img[title='Signup']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # log in student2064&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
          click_link('Suggest a topic',match: :first)&lt;br /&gt;
          fill_in 'suggestion_title', with: 'suggested_topic2_will_switch'&lt;br /&gt;
          fill_in 'suggestion_description', with: 'suggested_description_2'&lt;br /&gt;
          click_button 'Submit',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login_as instructor6 to approve the 2nd suggested topic&lt;br /&gt;
          user = User.find_by(name: 'instructor6')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
          # instructor approve the suggestion topic&lt;br /&gt;
          visit '/tree_display/list'&lt;br /&gt;
          visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
          expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          # find link for new suggested view&lt;br /&gt;
          visit '/suggestion/2'&lt;br /&gt;
          # click_link('View')&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
          click_button 'Approve suggestion',match: :first&lt;br /&gt;
          expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as student 2064 to switch to new approved topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
          click_link('Signup sheet',match: :first)&lt;br /&gt;
          expect(page).to have_content &amp;quot;Your approved suggested topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
          first(&amp;quot;img[title='Switch Topic']&amp;quot;).click&lt;br /&gt;
&lt;br /&gt;
          # login as student 2066 to see if it's holding the topic rather than on the wait list&lt;br /&gt;
          user = User.find_by(name: 'student2066')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
          # login as studnet 2064 to see if it's already shifted to the new suggested topic&lt;br /&gt;
          user = User.find_by(name: 'student2064')&lt;br /&gt;
          stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
          visit '/student_task/list'&lt;br /&gt;
          expect(page).to have_content &amp;quot;suggested_topic2_will_switch&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ########################################&lt;br /&gt;
    # Case 3:&lt;br /&gt;
    # One team is holding a topic. They sent a suggestion for new topic, and keep themselves in old topic&lt;br /&gt;
    ########################################&lt;br /&gt;
    it &amp;quot;student2066 hold suggest topic and suggest a new one, but wish to stay in the old topic&amp;quot;, js: true do&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      # DUE date need to be added here&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      ######################################&lt;br /&gt;
      # One team is holding a topic. They sent a suggestion for new topic&lt;br /&gt;
      ######################################&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2066 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic2_without_switch'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description2_without_switch'&lt;br /&gt;
      find('#suggestion_signup_preference').find(:xpath, 'option[2]').select_option&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;Thank you for your suggestion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;instructor6&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/tree_display/list'&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, text: 'View').click&lt;br /&gt;
      # click_link('View')&lt;br /&gt;
&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description2_without_switch&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2066&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2066')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      # click_link('publish_approved_suggested_topic')&lt;br /&gt;
      visit '/sign_up_sheet/publish_approved_suggested_topic/2?assignment_id=1'&lt;br /&gt;
      # find(:xpath, &amp;quot;//tr[contains(.,'suggested_topic2_without_switch')]/td/a&amp;quot;, :figure=&amp;gt;&amp;quot;Publish Topic&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
      click_link('Signup sheet',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
      find(:xpath, &amp;quot;(//img[@title='Signup'])[2]&amp;quot;).click&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot; suggested_topic2_without_switch&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;professor could approve anonymous suggestion topic&amp;quot; do&lt;br /&gt;
      # login_as &amp;quot;student2064&amp;quot;&lt;br /&gt;
      user = User.find_by(name: 'student2064')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      visit '/student_task/list'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Assignment_suggest_topic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      # student2064 suggest topic&lt;br /&gt;
      click_link('Assignment_suggest_topic',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggest a topic&amp;quot;&lt;br /&gt;
      click_link('Suggest a topic',match: :first)&lt;br /&gt;
      fill_in 'suggestion_title', with: 'suggested_topic'&lt;br /&gt;
      fill_in 'suggestion_description', with: 'suggested_description'&lt;br /&gt;
      find(:xpath, &amp;quot;//input[@name='suggestion_anonymous']&amp;quot;).click&lt;br /&gt;
      click_button 'Submit',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;You have submitted an anonymous suggestion.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      user = User.find_by(name: 'instructor6')&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
&lt;br /&gt;
      # instructor approve the suggestion topic&lt;br /&gt;
      visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
      expect(page).to have_content &amp;quot;Suggested topics for Assignment_suggest_topic&amp;quot;&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_topic&amp;quot;&lt;br /&gt;
      click_link('View',match: :first)&lt;br /&gt;
      expect(page).to have_content &amp;quot;suggested_description&amp;quot;&lt;br /&gt;
      click_button 'Approve suggestion',match: :first&lt;br /&gt;
      expect(page).to have_content &amp;quot;The suggestion was successfully approved.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Further Testing Required''' ====&lt;br /&gt;
::More tests need to be added to test whether an instructor can edit a comment or not.&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UnfinishedAssignmentTopicsTab.JPG&amp;diff=115888</id>
		<title>File:UnfinishedAssignmentTopicsTab.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UnfinishedAssignmentTopicsTab.JPG&amp;diff=115888"/>
		<updated>2018-04-03T03:09:54Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UnfinishedAssignmentsTabs.JPG&amp;diff=115887</id>
		<title>File:UnfinishedAssignmentsTabs.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UnfinishedAssignmentsTabs.JPG&amp;diff=115887"/>
		<updated>2018-04-03T03:09:44Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditPencilIcon.JPG&amp;diff=115886</id>
		<title>File:EditPencilIcon.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditPencilIcon.JPG&amp;diff=115886"/>
		<updated>2018-04-03T03:09:10Z</updated>

		<summary type="html">&lt;p&gt;Aspandit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aspandit</name></author>
	</entry>
</feed>