<?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=Aarnav</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=Aarnav"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Aarnav"/>
	<updated>2026-06-02T10:30:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119030</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119030"/>
		<updated>2018-11-09T05:59:55Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link: https://www.youtube.com/watch?v=_0UU0r4IOf4&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
* app/views/suggestion/list.html.erb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
* db/migrate/20181027001119_add_feedback_to_suggestion.rb&lt;br /&gt;
&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
We should allow instructors to give feedback when accepting or rejecting topic suggestions. As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/suggestion/list.html.erb''',added an additional editable textbox and a submit button. On click of the button the feedback provided in the text box is saved to the database in a table name suggestions, column name feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 width=100% border=1&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Submitter's user name&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Action&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Feedback&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Save&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestion in @suggestions %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;%= form_for :suggestion, :url =&amp;gt; update_feedback_suggestion_index_path(:suggestion_id =&amp;gt; suggestion.id, :id =&amp;gt; params[:id], :type =&amp;gt; params[:type])   	do |f| %&amp;gt;&lt;br /&gt;
        &amp;lt;td style=&amp;quot;max-width: 200px&amp;quot;&amp;gt;&amp;lt;%=h suggestion.title %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.status %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.unityID %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to 'View', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	 &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.text_field :feedback %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.submit 'Save Feedback' %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;% end %&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;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;
&lt;br /&gt;
On the file '''app/controllers/suggestion_controller.rb''' ,added an additional method to save the changes in the feedback text box to database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  def update_feedback&lt;br /&gt;
    Suggestion.find(params[:suggestion_id]).update_attributes(feedback: params[:suggestion][:feedback])&lt;br /&gt;
    redirect_to list_suggestion_index_path(:id =&amp;gt; params[:id], :type =&amp;gt; params[:type])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''db/migrate/20181027001119_add_feedback_to_suggestion.rb''' ,added migration scripts. Script is adding a column name &amp;quot;feedback&amp;quot; in the suggestions table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  class AddFeedbackToSuggestion &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def change&lt;br /&gt;
    add_column :suggestions, :feedback, :string&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''expertiza/db/schema.rb''' ,schema changes as effect of adding column in table suggestions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  create_table &amp;quot;suggestions&amp;quot;, force: :cascade do |t|&lt;br /&gt;
    t.integer &amp;quot;assignment_id&amp;quot;,     limit: 4&lt;br /&gt;
    t.string  &amp;quot;title&amp;quot;,             limit: 255&lt;br /&gt;
    t.text    &amp;quot;description&amp;quot;,       limit: 65535&lt;br /&gt;
    t.string  &amp;quot;status&amp;quot;,            limit: 255&lt;br /&gt;
    t.string  &amp;quot;unityID&amp;quot;,           limit: 255&lt;br /&gt;
    t.string  &amp;quot;signup_preference&amp;quot;, limit: 255&lt;br /&gt;
    t.string  &amp;quot;feedback&amp;quot;,          limit: 255&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:AfterFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
===== Issue #971: Change create topic UI into AJAX =====&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a table format. Click on add icon on the right side corner of the table header&lt;br /&gt;
# Fill in the details and click save topic&lt;br /&gt;
&lt;br /&gt;
If a user tries to set number of slots as zero, a warning pops up and prohibits the user from doing so.&lt;br /&gt;
===== Warning message when max_choosers is set to zero =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_5.png]]&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119029</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119029"/>
		<updated>2018-11-09T05:59:24Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link: https://www.youtube.com/watch?v=_0UU0r4IOf4&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
* app/views/suggestion/list.html.erb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
* db/migrate/20181027001119_add_feedback_to_suggestion.rb&lt;br /&gt;
&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
We should allow instructors to give feedback when accepting or rejecting topic suggestions. As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/suggestion/list.html.erb''',added an additional editable textbox and a submit button. On click of the button the feedback provided in the text box is saved to the database in a table name suggestions, column name feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 width=100% border=1&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Submitter's user name&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Action&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Feedback&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Save&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestion in @suggestions %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;%= form_for :suggestion, :url =&amp;gt; update_feedback_suggestion_index_path(:suggestion_id =&amp;gt; suggestion.id, :id =&amp;gt; params[:id], :type =&amp;gt; params[:type])   	do |f| %&amp;gt;&lt;br /&gt;
        &amp;lt;td style=&amp;quot;max-width: 200px&amp;quot;&amp;gt;&amp;lt;%=h suggestion.title %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.status %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.unityID %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to 'View', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	 &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.text_field :feedback %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.submit 'Save Feedback' %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;% end %&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;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;
&lt;br /&gt;
On the file '''app/controllers/suggestion_controller.rb''' ,added an additional method to save the changes in the feedback text box to database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  def update_feedback&lt;br /&gt;
    Suggestion.find(params[:suggestion_id]).update_attributes(feedback: params[:suggestion][:feedback])&lt;br /&gt;
    redirect_to list_suggestion_index_path(:id =&amp;gt; params[:id], :type =&amp;gt; params[:type])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''db/migrate/20181027001119_add_feedback_to_suggestion.rb''' ,added migration scripts. Script is adding a column name &amp;quot;feedback&amp;quot; in the suggestions table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  class AddFeedbackToSuggestion &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def change&lt;br /&gt;
    add_column :suggestions, :feedback, :string&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''expertiza/db/schema.rb''' ,schema changes as effect of adding column in table suggestions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  create_table &amp;quot;suggestions&amp;quot;, force: :cascade do |t|&lt;br /&gt;
    t.integer &amp;quot;assignment_id&amp;quot;,     limit: 4&lt;br /&gt;
    t.string  &amp;quot;title&amp;quot;,             limit: 255&lt;br /&gt;
    t.text    &amp;quot;description&amp;quot;,       limit: 65535&lt;br /&gt;
    t.string  &amp;quot;status&amp;quot;,            limit: 255&lt;br /&gt;
    t.string  &amp;quot;unityID&amp;quot;,           limit: 255&lt;br /&gt;
    t.string  &amp;quot;signup_preference&amp;quot;, limit: 255&lt;br /&gt;
    t.string  &amp;quot;feedback&amp;quot;,          limit: 255&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:AfterFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Issue #971: Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a table format. Click on add icon on the right side corner of the table header&lt;br /&gt;
# Fill in the details and click save topic&lt;br /&gt;
&lt;br /&gt;
If a user tries to set number of slots as zero, a warning pops up and prohibits the user from doing so.&lt;br /&gt;
===== Warning message when max_choosers is set to zero =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_5.png]]&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119028</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119028"/>
		<updated>2018-11-09T05:58:53Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Warning message when max_choosers is set to zero */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link: https://www.youtube.com/watch?v=_0UU0r4IOf4&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
* app/views/suggestion/list.html.erb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
* db/migrate/20181027001119_add_feedback_to_suggestion.rb&lt;br /&gt;
&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
We should allow instructors to give feedback when accepting or rejecting topic suggestions. As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/suggestion/list.html.erb''',added an additional editable textbox and a submit button. On click of the button the feedback provided in the text box is saved to the database in a table name suggestions, column name feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 width=100% border=1&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Submitter's user name&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Action&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Feedback&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Save&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestion in @suggestions %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;%= form_for :suggestion, :url =&amp;gt; update_feedback_suggestion_index_path(:suggestion_id =&amp;gt; suggestion.id, :id =&amp;gt; params[:id], :type =&amp;gt; params[:type])   	do |f| %&amp;gt;&lt;br /&gt;
        &amp;lt;td style=&amp;quot;max-width: 200px&amp;quot;&amp;gt;&amp;lt;%=h suggestion.title %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.status %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.unityID %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to 'View', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	 &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.text_field :feedback %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.submit 'Save Feedback' %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;% end %&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;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;
&lt;br /&gt;
On the file '''app/controllers/suggestion_controller.rb''' ,added an additional method to save the changes in the feedback text box to database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  def update_feedback&lt;br /&gt;
    Suggestion.find(params[:suggestion_id]).update_attributes(feedback: params[:suggestion][:feedback])&lt;br /&gt;
    redirect_to list_suggestion_index_path(:id =&amp;gt; params[:id], :type =&amp;gt; params[:type])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''db/migrate/20181027001119_add_feedback_to_suggestion.rb''' ,added migration scripts. Script is adding a column name &amp;quot;feedback&amp;quot; in the suggestions table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  class AddFeedbackToSuggestion &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def change&lt;br /&gt;
    add_column :suggestions, :feedback, :string&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''expertiza/db/schema.rb''' ,schema changes as effect of adding column in table suggestions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  create_table &amp;quot;suggestions&amp;quot;, force: :cascade do |t|&lt;br /&gt;
    t.integer &amp;quot;assignment_id&amp;quot;,     limit: 4&lt;br /&gt;
    t.string  &amp;quot;title&amp;quot;,             limit: 255&lt;br /&gt;
    t.text    &amp;quot;description&amp;quot;,       limit: 65535&lt;br /&gt;
    t.string  &amp;quot;status&amp;quot;,            limit: 255&lt;br /&gt;
    t.string  &amp;quot;unityID&amp;quot;,           limit: 255&lt;br /&gt;
    t.string  &amp;quot;signup_preference&amp;quot;, limit: 255&lt;br /&gt;
    t.string  &amp;quot;feedback&amp;quot;,          limit: 255&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:AfterFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Issue #971: Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a table format. Click on add icon on the right side corner of the table header&lt;br /&gt;
# Fill in the details and click save topic&lt;br /&gt;
&lt;br /&gt;
If a user tries to set number of slots as zero, a warning pops up and prohibits the user from doing so.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119027</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119027"/>
		<updated>2018-11-09T05:58:33Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link: https://www.youtube.com/watch?v=_0UU0r4IOf4&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
* app/views/suggestion/list.html.erb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
* db/migrate/20181027001119_add_feedback_to_suggestion.rb&lt;br /&gt;
&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
===== Warning message when max_choosers is set to zero =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_5.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
We should allow instructors to give feedback when accepting or rejecting topic suggestions. As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/suggestion/list.html.erb''',added an additional editable textbox and a submit button. On click of the button the feedback provided in the text box is saved to the database in a table name suggestions, column name feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 width=100% border=1&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Submitter's user name&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Action&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Feedback&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Save&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestion in @suggestions %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;%= form_for :suggestion, :url =&amp;gt; update_feedback_suggestion_index_path(:suggestion_id =&amp;gt; suggestion.id, :id =&amp;gt; params[:id], :type =&amp;gt; params[:type])   	do |f| %&amp;gt;&lt;br /&gt;
        &amp;lt;td style=&amp;quot;max-width: 200px&amp;quot;&amp;gt;&amp;lt;%=h suggestion.title %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.status %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.unityID %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to 'View', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	 &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.text_field :feedback %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.submit 'Save Feedback' %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;% end %&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;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;
&lt;br /&gt;
On the file '''app/controllers/suggestion_controller.rb''' ,added an additional method to save the changes in the feedback text box to database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  def update_feedback&lt;br /&gt;
    Suggestion.find(params[:suggestion_id]).update_attributes(feedback: params[:suggestion][:feedback])&lt;br /&gt;
    redirect_to list_suggestion_index_path(:id =&amp;gt; params[:id], :type =&amp;gt; params[:type])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''db/migrate/20181027001119_add_feedback_to_suggestion.rb''' ,added migration scripts. Script is adding a column name &amp;quot;feedback&amp;quot; in the suggestions table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  class AddFeedbackToSuggestion &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def change&lt;br /&gt;
    add_column :suggestions, :feedback, :string&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''expertiza/db/schema.rb''' ,schema changes as effect of adding column in table suggestions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  create_table &amp;quot;suggestions&amp;quot;, force: :cascade do |t|&lt;br /&gt;
    t.integer &amp;quot;assignment_id&amp;quot;,     limit: 4&lt;br /&gt;
    t.string  &amp;quot;title&amp;quot;,             limit: 255&lt;br /&gt;
    t.text    &amp;quot;description&amp;quot;,       limit: 65535&lt;br /&gt;
    t.string  &amp;quot;status&amp;quot;,            limit: 255&lt;br /&gt;
    t.string  &amp;quot;unityID&amp;quot;,           limit: 255&lt;br /&gt;
    t.string  &amp;quot;signup_preference&amp;quot;, limit: 255&lt;br /&gt;
    t.string  &amp;quot;feedback&amp;quot;,          limit: 255&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:AfterFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Issue #971: Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a table format. Click on add icon on the right side corner of the table header&lt;br /&gt;
# Fill in the details and click save topic&lt;br /&gt;
&lt;br /&gt;
If a user tries to set number of slots as zero, a warning pops up and prohibits the user from doing so.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119026</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119026"/>
		<updated>2018-11-09T05:54:22Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link: https://www.youtube.com/watch?v=_0UU0r4IOf4&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
* app/views/suggestion/list.html.erb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
* db/migrate/20181027001119_add_feedback_to_suggestion.rb&lt;br /&gt;
&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
===== Warning message when max_choosers is set to zero =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_5.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
We should allow instructors to give feedback when accepting or rejecting topic suggestions. As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/suggestion/list.html.erb''',added an additional editable textbox and a submit button. On click of the button the feedback provided in the text box is saved to the database in a table name suggestions, column name feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 width=100% border=1&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Submitter's user name&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Action&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Feedback&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Save&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestion in @suggestions %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;%= form_for :suggestion, :url =&amp;gt; update_feedback_suggestion_index_path(:suggestion_id =&amp;gt; suggestion.id, :id =&amp;gt; params[:id], :type =&amp;gt; params[:type])   	do |f| %&amp;gt;&lt;br /&gt;
        &amp;lt;td style=&amp;quot;max-width: 200px&amp;quot;&amp;gt;&amp;lt;%=h suggestion.title %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.status %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.unityID %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to 'View', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	 &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.text_field :feedback %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.submit 'Save Feedback' %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;% end %&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;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;
&lt;br /&gt;
On the file '''app/controllers/suggestion_controller.rb''' ,added an additional method to save the changes in the feedback text box to database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  def update_feedback&lt;br /&gt;
    Suggestion.find(params[:suggestion_id]).update_attributes(feedback: params[:suggestion][:feedback])&lt;br /&gt;
    redirect_to list_suggestion_index_path(:id =&amp;gt; params[:id], :type =&amp;gt; params[:type])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''db/migrate/20181027001119_add_feedback_to_suggestion.rb''' ,added migration scripts. Script is adding a column name &amp;quot;feedback&amp;quot; in the suggestions table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  class AddFeedbackToSuggestion &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def change&lt;br /&gt;
    add_column :suggestions, :feedback, :string&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''expertiza/db/schema.rb''' ,schema changes as effect of adding column in table suggestions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  create_table &amp;quot;suggestions&amp;quot;, force: :cascade do |t|&lt;br /&gt;
    t.integer &amp;quot;assignment_id&amp;quot;,     limit: 4&lt;br /&gt;
    t.string  &amp;quot;title&amp;quot;,             limit: 255&lt;br /&gt;
    t.text    &amp;quot;description&amp;quot;,       limit: 65535&lt;br /&gt;
    t.string  &amp;quot;status&amp;quot;,            limit: 255&lt;br /&gt;
    t.string  &amp;quot;unityID&amp;quot;,           limit: 255&lt;br /&gt;
    t.string  &amp;quot;signup_preference&amp;quot;, limit: 255&lt;br /&gt;
    t.string  &amp;quot;feedback&amp;quot;,          limit: 255&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:AfterFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
* Issue #971: Change create topic UI into AJAX&lt;br /&gt;
Login as an instructor. It will automatically go to the manage courses page&lt;br /&gt;
Click Assignments tab next to Courses&lt;br /&gt;
Select the assignment for which a new topic has to be added&lt;br /&gt;
Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119025</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=119025"/>
		<updated>2018-11-09T05:51:08Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link: https://www.youtube.com/watch?v=_0UU0r4IOf4&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
* app/views/suggestion/list.html.erb&lt;br /&gt;
* app/controllers/suggestion_controller.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
* db/migrate/20181027001119_add_feedback_to_suggestion.rb&lt;br /&gt;
&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
===== Warning message when max_choosers is set to zero =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_5.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
We should allow instructors to give feedback when accepting or rejecting topic suggestions. As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/suggestion/list.html.erb''',added an additional editable textbox and a submit button. On click of the button the feedback provided in the text box is saved to the database in a table name suggestions, column name feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;general&amp;quot; cellpadding=5 width=100% border=1&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Submitter's user name&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Action&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Feedback&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Save&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% for suggestion in @suggestions %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;%= form_for :suggestion, :url =&amp;gt; update_feedback_suggestion_index_path(:suggestion_id =&amp;gt; suggestion.id, :id =&amp;gt; params[:id], :type =&amp;gt; params[:type])   	do |f| %&amp;gt;&lt;br /&gt;
        &amp;lt;td style=&amp;quot;max-width: 200px&amp;quot;&amp;gt;&amp;lt;%=h suggestion.title %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.status %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=h suggestion.unityID %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to 'View', :action =&amp;gt; 'show', :id =&amp;gt; suggestion %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	 &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.text_field :feedback %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= f.submit 'Save Feedback' %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;% end %&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;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;
&lt;br /&gt;
On the file '''app/controllers/suggestion_controller.rb''' ,added an additional method to save the changes in the feedback text box to database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  def update_feedback&lt;br /&gt;
    Suggestion.find(params[:suggestion_id]).update_attributes(feedback: params[:suggestion][:feedback])&lt;br /&gt;
    redirect_to list_suggestion_index_path(:id =&amp;gt; params[:id], :type =&amp;gt; params[:type])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''db/migrate/20181027001119_add_feedback_to_suggestion.rb''' ,added migration scripts. Script is adding a column name &amp;quot;feedback&amp;quot; in the suggestions table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  class AddFeedbackToSuggestion &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def change&lt;br /&gt;
    add_column :suggestions, :feedback, :string&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''expertiza/db/schema.rb''' ,schema changes as effect of adding column in table suggestions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  create_table &amp;quot;suggestions&amp;quot;, force: :cascade do |t|&lt;br /&gt;
    t.integer &amp;quot;assignment_id&amp;quot;,     limit: 4&lt;br /&gt;
    t.string  &amp;quot;title&amp;quot;,             limit: 255&lt;br /&gt;
    t.text    &amp;quot;description&amp;quot;,       limit: 65535&lt;br /&gt;
    t.string  &amp;quot;status&amp;quot;,            limit: 255&lt;br /&gt;
    t.string  &amp;quot;unityID&amp;quot;,           limit: 255&lt;br /&gt;
    t.string  &amp;quot;signup_preference&amp;quot;, limit: 255&lt;br /&gt;
    t.string  &amp;quot;feedback&amp;quot;,          limit: 255&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
===== Suggestions list page after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:AfterFeedbackPage.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118112</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118112"/>
		<updated>2018-11-02T20:17:00Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
===== Warning message when max_choosers is set to zero =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_5.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_5.png&amp;diff=118111</id>
		<title>File:Topic 5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_5.png&amp;diff=118111"/>
		<updated>2018-11-02T20:15:59Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118110</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118110"/>
		<updated>2018-11-02T20:14:14Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
===== Topics table after changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_4.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_4.png&amp;diff=118109</id>
		<title>File:Topic 4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_4.png&amp;diff=118109"/>
		<updated>2018-11-02T20:13:25Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118108</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118108"/>
		<updated>2018-11-02T20:10:55Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Topics table before changes =====&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118107</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118107"/>
		<updated>2018-11-02T20:09:03Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:topic_3.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_3.png&amp;diff=118106</id>
		<title>File:Topic 3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_3.png&amp;diff=118106"/>
		<updated>2018-11-02T20:08:47Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118104</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118104"/>
		<updated>2018-11-02T20:08:03Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:topic_2.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_2.png&amp;diff=118103</id>
		<title>File:Topic 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_2.png&amp;diff=118103"/>
		<updated>2018-11-02T20:07:46Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118102</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118102"/>
		<updated>2018-11-02T20:06:21Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:topic_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is added using Tablesorter css, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
To use Tablesorter in app/views/sign_up_sheet/_add_signup_topics.html.erb, we added this script:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
  $(function () {&lt;br /&gt;
    /*Function for sorting the table */&lt;br /&gt;
    $(&amp;quot;.sortable&amp;quot;).tablesorter({&lt;br /&gt;
      sortList: [[0,0]] //sort First Column by default when page loads&lt;br /&gt;
    });&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And made this change to the current table in html:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-striped sortable&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;thead&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;	      &lt;br /&gt;
      &amp;lt;tr&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/table_header' %&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/thead&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to make Topic to be sortable, we added this in app/views/sign_up_sheet/_table_header.html.erb:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th class=&amp;quot;sorter-true&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;Topic #&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_1.png&amp;diff=118101</id>
		<title>File:Topic 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic_1.png&amp;diff=118101"/>
		<updated>2018-11-02T20:05:28Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118095</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118095"/>
		<updated>2018-11-02T19:53:31Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline;width: 220px;&amp;gt;&lt;br /&gt;
[[Image:Topic1.PNG|800px|Image: 800 pixels]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118094</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118094"/>
		<updated>2018-11-02T19:53:09Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline;width: 220px;&amp;gt;&lt;br /&gt;
[[Image:Topic1.PNG|400px|Image: 400 pixels]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118093</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118093"/>
		<updated>2018-11-02T19:52:20Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline;width: 220px;&amp;gt;&lt;br /&gt;
[[Image:Topic1.PNG|200px|Image: 200 pixels]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118092</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118092"/>
		<updated>2018-11-02T19:52:00Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline;width: 220px;&amp;gt;&lt;br /&gt;
[[File:Topic1.PNG|200px|Image: 200 pixels]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118091</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118091"/>
		<updated>2018-11-02T19:50:26Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline;width: 220px;&amp;gt;&lt;br /&gt;
[[File:Topic1.PNG]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118090</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118090"/>
		<updated>2018-11-02T19:49:49Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 220px;&amp;gt;&lt;br /&gt;
[[File:Topic1.PNG]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118089</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118089"/>
		<updated>2018-11-02T19:49:27Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: inline; width: 220px; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Topic1.PNG]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118088</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118088"/>
		<updated>2018-11-02T19:48:40Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Topic1.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118087</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118087"/>
		<updated>2018-11-02T19:47:30Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Topic1.PNG|250 px|]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118086</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118086"/>
		<updated>2018-11-02T19:47:07Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Topic1.PNG|50 px|]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118085</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118085"/>
		<updated>2018-11-02T19:45:55Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Topic1.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118084</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118084"/>
		<updated>2018-11-02T19:45:19Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Topic1.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
'''Sorting in ascending order''':-&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sorting in descending order''':-&lt;br /&gt;
[[File:Edit_descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic1.PNG&amp;diff=118081</id>
		<title>File:Topic1.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Topic1.PNG&amp;diff=118081"/>
		<updated>2018-11-02T19:44:32Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118075</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118075"/>
		<updated>2018-11-02T19:39:01Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
Sorting in ascending order&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
Sorting in decending order:-&lt;br /&gt;
[[File:Edit_descending]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118072</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118072"/>
		<updated>2018-11-02T19:36:28Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: /* Issue #971 Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
Sorting in ascending order&lt;br /&gt;
[[File:Edit_ascending.png]]&lt;br /&gt;
Sorting in decending order:-&lt;br /&gt;
[[File:Edit_decending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture.PNG&amp;diff=118071</id>
		<title>File:Capture.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture.PNG&amp;diff=118071"/>
		<updated>2018-11-02T19:35:27Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: uploaded a new version of &amp;amp;quot;File:Capture.PNG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118068</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118068"/>
		<updated>2018-11-02T19:27:43Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118063</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118063"/>
		<updated>2018-11-02T19:21:03Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_add_signup_topics.html.erb''' we initialize the new topic with max_choosers as 1.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;% @sign_up_topic = SignUpTopic.new %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic = @sign_up_topic %&amp;gt;&lt;br /&gt;
  &amp;lt;% @topic.max_choosers=1 %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
The task is to sort the Topics according to the topic number. This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
[[File:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118060</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118060"/>
		<updated>2018-11-02T19:17:31Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/_table_header.html.erb''' we added an additional editable &amp;lt;th&amp;gt; table element which adds a add topic button which toggles the editable row for creating topics.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;3%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;myLink&amp;quot; title=&amp;quot;Add&amp;quot;&lt;br /&gt;
         href=&amp;quot;#&amp;quot; style=&amp;quot;color: #00aa00; font-size: 26px;&amp;quot; onclick=&amp;quot;addCreateTopicSection();return false;&amp;quot;&amp;gt;+&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118057</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118057"/>
		<updated>2018-11-02T19:13:03Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118056</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118056"/>
		<updated>2018-11-02T19:12:03Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118055</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118055"/>
		<updated>2018-11-02T19:11:24Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
----&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
----&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
On the file '''app/views/assignments/edit.html.erb''' we added an additional editable &amp;lt;tr&amp;gt; table element which is appended to the table when the add button is clicked in the topics table.&lt;br /&gt;
It submits a ajax request when the 'save topic button is clicked'&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118054</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118054"/>
		<updated>2018-11-02T19:06:26Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
----&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
----&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;tr id=&amp;quot;add_topic&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;%= form_for :topic, :url =&amp;gt; sign_up_sheet_index_path(:id =&amp;gt; @assignment_form.assignment.id),:html =&amp;gt; { :onsubmit =&amp;gt; &amp;quot;return showZeroSlotWarning()&amp;quot;,autocomplete: &amp;quot;off&amp;quot;  }  do |f| %&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.text_field :topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.number_field :max_choosers, min: 0 %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= f.submit %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    function showZeroSlotWarning(){&lt;br /&gt;
        if ($('#topic_max_choosers').val() == 0){&lt;br /&gt;
            alert(&amp;quot;If you create a topic with 0 slots,  students cannot assign this topic.&amp;quot;);&lt;br /&gt;
            return false;&lt;br /&gt;
        }&lt;br /&gt;
    };&lt;br /&gt;
    function addCreateTopicSection(){&lt;br /&gt;
        $(&amp;quot;#topic_table_header&amp;quot;).after($(&amp;quot;#add_topic&amp;quot;));&lt;br /&gt;
        $(&amp;quot;#add_topic&amp;quot;).toggle();&lt;br /&gt;
    };&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118053</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118053"/>
		<updated>2018-11-02T18:51:17Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
----&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/controllers/assignments_controller.rb&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
----&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118052</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118052"/>
		<updated>2018-11-02T18:43:56Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
----&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
----&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118051</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118051"/>
		<updated>2018-11-02T18:42:31Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
----&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
----&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118050</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118050"/>
		<updated>2018-11-02T18:40:27Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
&lt;br /&gt;
== Files modified ==&lt;br /&gt;
----&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
*app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
*app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
*app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
----&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118048</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118048"/>
		<updated>2018-11-02T18:39:25Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
----&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
*app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
----&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118043</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118043"/>
		<updated>2018-11-02T18:26:53Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;br /&gt;
----&lt;br /&gt;
== Files modified ==&lt;br /&gt;
The following files were modified&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
----&lt;br /&gt;
== Solutions Implemented ==&lt;br /&gt;
=== Issue #971 Change create topic UI into AJAX ===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
=== Issue #926 We need a way to sort topics by topic number in assignment#edit page.  ===&lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
=== We should allow instructors to give feedback when accepting or rejecting topic suggestions.  ===&lt;br /&gt;
As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118041</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118041"/>
		<updated>2018-11-02T18:15:27Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX.&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118040</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118040"/>
		<updated>2018-11-02T18:13:46Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
The following credentials are recommended for testing the changes:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;br /&gt;
----&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic. We identified several ideas that can improve user experience when managing the topics. Thus, we would like you to introduce new features to implement these ideas.&lt;br /&gt;
&lt;br /&gt;
===== What needs to be done?: =====&lt;br /&gt;
&lt;br /&gt;
* Issue #971 Change create topic UI into AJAX &lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page (views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). This should be done via AJAX so that the adding a new topic can be done through an editable grid or a popup form without leaving the list of topic page. Then and the list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb must be modified so that it renders JSON to handle the table/form. &lt;br /&gt;
In addition, when adding a topic, the default slot should be 1 instead of 0. the current warning message that shows up when the slot is 0, can't be closed properly and should be fixed (if the form is made popup in the future, the warning should be on the same page as the form e.g., highlight the field and print an instruction to change the # of slot).&lt;br /&gt;
&lt;br /&gt;
* Issue #926 We need a way to sort topics by topic number in assignment#edit page. &lt;br /&gt;
Use the TableSorter css that is already used by several tables in Expertiza (see its documentation here) to enable sorting of the topics by the table headers in views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb.&lt;br /&gt;
&lt;br /&gt;
* Issue #718 We should allow instructors to give feedback when accepting or rejecting topic suggestions. As it is, one can give feedback on topics suggested by students only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
A possible solution would be to add a column in the views&amp;gt;suggestion&amp;gt;list.html.erb with a textbox in the table and “send” button and handle sending the comments when the send button is pressed in suggestion_controller.rb. Add an extra column called “feedback” in the suggestion table to store instructor’s comments to the suggested topics.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118039</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118039"/>
		<updated>2018-11-02T18:07:33Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;br /&gt;
----&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
&lt;br /&gt;
* Instructor Login: username: instructor6 password: password&lt;br /&gt;
* Youtube link:&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118036</id>
		<title>E1827 Topic management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1827_Topic_management&amp;diff=118036"/>
		<updated>2018-11-02T18:02:30Z</updated>

		<summary type="html">&lt;p&gt;Aarnav: Created page with &amp;quot;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1827 OSS assignment for Fall 2018.&lt;/div&gt;</summary>
		<author><name>Aarnav</name></author>
	</entry>
</feed>