<?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=Tcao</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=Tcao"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Tcao"/>
	<updated>2026-07-17T20:49:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129652</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129652"/>
		<updated>2019-11-24T21:58:11Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Actual Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Actual Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off_mini4.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1354====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue#1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
 @@ -16,7 +16,7 @@&lt;br /&gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-7&amp;quot; id=&amp;quot;Badges&amp;quot;&amp;gt;Badges&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!--issue#1384, &amp;quot;other stuff&amp;quot; tab should be renamed to “Etc. …”--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;Etc. …&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
 @@ -50,6 +50,7 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
@@ -292,7 +292,8 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/import_file_helper.rb &lt;br /&gt;
&lt;br /&gt;
@@ -11,6 +11,7 @@ def self.define_attributes(row_hash)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
@@ -22,6 +22,7 @@ def self.define_attributes(line_split, config)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/participant.rb&lt;br /&gt;
&lt;br /&gt;
@@ -136,6 +136,7 @@ def self.export(csv, parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(part.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/bre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
@@ -231,6 +231,7 @@ def initialize(attributes = nil)&lt;br /&gt;
    @email_on_submission = true&lt;br /&gt;
    @email_on_review_of_review = true&lt;br /&gt;
    @copy_of_emails = false&lt;br /&gt;
    @action_enable = true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.export(csv, _parent_id, options)&lt;br /&gt;
@@ -241,6 +242,7 @@ def self.export(csv, _parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review, user.copy_of_emails) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/profile/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
@@ -10,6 +10,7 @@&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/email' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/institutions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/prefs' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/actions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'handle' %&amp;gt;&lt;br /&gt;
  &amp;lt;% if @user.role.parent_id != nil %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'limit' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/users/_actions.html.erb &lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,18 @@&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
  &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;!-- E1976   add action enable at instructor profile page--&amp;gt;&lt;br /&gt;
    &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if @user.role_id == 2 %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Action options&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;Check the boxes representing that whether to see assignment actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;action_enables&amp;quot;&amp;gt;I want to view the assignment &amp;lt;strong&amp;gt;Actions&amp;lt;/strong&amp;gt; on homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'action_enable'%&amp;gt;&amp;lt;/td&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;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db/migrate/20191117015928_add_actions_enable_to_users.rb&lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,5 @@&lt;br /&gt;
class AddActionsEnableToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :action_enable, :boolean, default: true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/controllers/users_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -163,7 +163,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
      post :create, params, session&lt;br /&gt;
      allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;chenzy@gmail.com&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
@@ -193,7 +194,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
@@ -224,7 +226,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
@@ -53,6 +53,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :superadmin, class: User do&lt;br /&gt;
@@ -75,6 +76,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :student, class: User do&lt;br /&gt;
@@ -98,6 +100,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :instructor, class: Instructor do&lt;br /&gt;
@@ -120,6 +123,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :teaching_assistant, class: Ta do&lt;br /&gt;
@@ -142,6 +146,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -1,7 +1,7 @@&lt;br /&gt;
describe User do&lt;br /&gt;
  let(:user) do&lt;br /&gt;
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',&lt;br /&gt;
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle', action_enable: 1&lt;br /&gt;
  end&lt;br /&gt;
  let(:user1) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
  let(:user2) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini4.png&amp;diff=129651</id>
		<title>File:Action enable off mini4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini4.png&amp;diff=129651"/>
		<updated>2019-11-24T21:57:22Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini3.png&amp;diff=129650</id>
		<title>File:Action enable off mini3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini3.png&amp;diff=129650"/>
		<updated>2019-11-24T21:56:16Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini2.png&amp;diff=129649</id>
		<title>File:Action enable off mini2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini2.png&amp;diff=129649"/>
		<updated>2019-11-24T21:55:02Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini.png&amp;diff=129648</id>
		<title>File:Action enable off mini.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off_mini.png&amp;diff=129648"/>
		<updated>2019-11-24T21:53:37Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129646</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129646"/>
		<updated>2019-11-24T20:34:31Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Actual Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1354====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue#1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
 @@ -16,7 +16,7 @@&lt;br /&gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-7&amp;quot; id=&amp;quot;Badges&amp;quot;&amp;gt;Badges&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!--issue#1384, &amp;quot;other stuff&amp;quot; tab should be renamed to “Etc. …”--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;Etc. …&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
 @@ -50,6 +50,7 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
@@ -292,7 +292,8 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/import_file_helper.rb &lt;br /&gt;
&lt;br /&gt;
@@ -11,6 +11,7 @@ def self.define_attributes(row_hash)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
@@ -22,6 +22,7 @@ def self.define_attributes(line_split, config)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/participant.rb&lt;br /&gt;
&lt;br /&gt;
@@ -136,6 +136,7 @@ def self.export(csv, parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(part.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/bre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
@@ -231,6 +231,7 @@ def initialize(attributes = nil)&lt;br /&gt;
    @email_on_submission = true&lt;br /&gt;
    @email_on_review_of_review = true&lt;br /&gt;
    @copy_of_emails = false&lt;br /&gt;
    @action_enable = true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.export(csv, _parent_id, options)&lt;br /&gt;
@@ -241,6 +242,7 @@ def self.export(csv, _parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review, user.copy_of_emails) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/profile/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
@@ -10,6 +10,7 @@&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/email' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/institutions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/prefs' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/actions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'handle' %&amp;gt;&lt;br /&gt;
  &amp;lt;% if @user.role.parent_id != nil %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'limit' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/users/_actions.html.erb &lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,18 @@&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
  &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;!-- E1976   add action enable at instructor profile page--&amp;gt;&lt;br /&gt;
    &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if @user.role_id == 2 %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Action options&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;Check the boxes representing that whether to see assignment actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;action_enables&amp;quot;&amp;gt;I want to view the assignment &amp;lt;strong&amp;gt;Actions&amp;lt;/strong&amp;gt; on homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'action_enable'%&amp;gt;&amp;lt;/td&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;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db/migrate/20191117015928_add_actions_enable_to_users.rb&lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,5 @@&lt;br /&gt;
class AddActionsEnableToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :action_enable, :boolean, default: true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/controllers/users_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -163,7 +163,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
      post :create, params, session&lt;br /&gt;
      allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;chenzy@gmail.com&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
@@ -193,7 +194,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
@@ -224,7 +226,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
@@ -53,6 +53,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :superadmin, class: User do&lt;br /&gt;
@@ -75,6 +76,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :student, class: User do&lt;br /&gt;
@@ -98,6 +100,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :instructor, class: Instructor do&lt;br /&gt;
@@ -120,6 +123,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :teaching_assistant, class: Ta do&lt;br /&gt;
@@ -142,6 +146,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -1,7 +1,7 @@&lt;br /&gt;
describe User do&lt;br /&gt;
  let(:user) do&lt;br /&gt;
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',&lt;br /&gt;
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle', action_enable: 1&lt;br /&gt;
  end&lt;br /&gt;
  let(:user1) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
  let(:user2) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129624</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129624"/>
		<updated>2019-11-18T01:56:07Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1354====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue#1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
 @@ -16,7 +16,7 @@&lt;br /&gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-7&amp;quot; id=&amp;quot;Badges&amp;quot;&amp;gt;Badges&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!--issue#1384, &amp;quot;other stuff&amp;quot; tab should be renamed to “Etc. …”--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;Etc. …&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
 @@ -50,6 +50,7 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
@@ -292,7 +292,8 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/import_file_helper.rb &lt;br /&gt;
&lt;br /&gt;
@@ -11,6 +11,7 @@ def self.define_attributes(row_hash)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
@@ -22,6 +22,7 @@ def self.define_attributes(line_split, config)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/participant.rb&lt;br /&gt;
&lt;br /&gt;
@@ -136,6 +136,7 @@ def self.export(csv, parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(part.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/bre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
@@ -231,6 +231,7 @@ def initialize(attributes = nil)&lt;br /&gt;
    @email_on_submission = true&lt;br /&gt;
    @email_on_review_of_review = true&lt;br /&gt;
    @copy_of_emails = false&lt;br /&gt;
    @action_enable = true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.export(csv, _parent_id, options)&lt;br /&gt;
@@ -241,6 +242,7 @@ def self.export(csv, _parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review, user.copy_of_emails) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/profile/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
@@ -10,6 +10,7 @@&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/email' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/institutions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/prefs' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/actions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'handle' %&amp;gt;&lt;br /&gt;
  &amp;lt;% if @user.role.parent_id != nil %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'limit' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/users/_actions.html.erb &lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,18 @@&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
  &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;!-- E1976   add action enable at instructor profile page--&amp;gt;&lt;br /&gt;
    &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if @user.role_id == 2 %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Action options&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;Check the boxes representing that whether to see assignment actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;action_enables&amp;quot;&amp;gt;I want to view the assignment &amp;lt;strong&amp;gt;Actions&amp;lt;/strong&amp;gt; on homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'action_enable'%&amp;gt;&amp;lt;/td&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;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db/migrate/20191117015928_add_actions_enable_to_users.rb&lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,5 @@&lt;br /&gt;
class AddActionsEnableToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :action_enable, :boolean, default: true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/controllers/users_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -163,7 +163,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
      post :create, params, session&lt;br /&gt;
      allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;chenzy@gmail.com&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
@@ -193,7 +194,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
@@ -224,7 +226,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
@@ -53,6 +53,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :superadmin, class: User do&lt;br /&gt;
@@ -75,6 +76,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :student, class: User do&lt;br /&gt;
@@ -98,6 +100,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :instructor, class: Instructor do&lt;br /&gt;
@@ -120,6 +123,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :teaching_assistant, class: Ta do&lt;br /&gt;
@@ -142,6 +146,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -1,7 +1,7 @@&lt;br /&gt;
describe User do&lt;br /&gt;
  let(:user) do&lt;br /&gt;
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',&lt;br /&gt;
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle', action_enable: 1&lt;br /&gt;
  end&lt;br /&gt;
  let(:user1) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
  let(:user2) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129622</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129622"/>
		<updated>2019-11-18T01:45:57Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1354====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue#1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
 @@ -16,7 +16,7 @@&lt;br /&gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-7&amp;quot; id=&amp;quot;Badges&amp;quot;&amp;gt;Badges&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!--issue#1384, &amp;quot;other stuff&amp;quot; tab should be renamed to “Etc. …”--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;Etc. …&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
 @@ -50,6 +50,7 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
@@ -292,7 +292,8 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/import_file_helper.rb &lt;br /&gt;
&lt;br /&gt;
@@ -11,6 +11,7 @@ def self.define_attributes(row_hash)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
@@ -22,6 +22,7 @@ def self.define_attributes(line_split, config)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/participant.rb&lt;br /&gt;
&lt;br /&gt;
@@ -136,6 +136,7 @@ def self.export(csv, parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(part.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/bre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
@@ -231,6 +231,7 @@ def initialize(attributes = nil)&lt;br /&gt;
    @email_on_submission = true&lt;br /&gt;
    @email_on_review_of_review = true&lt;br /&gt;
    @copy_of_emails = false&lt;br /&gt;
    @action_enable = true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.export(csv, _parent_id, options)&lt;br /&gt;
@@ -241,6 +242,7 @@ def self.export(csv, _parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review, user.copy_of_emails) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/profile/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
@@ -10,6 +10,7 @@&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/email' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/institutions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/prefs' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/actions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'handle' %&amp;gt;&lt;br /&gt;
  &amp;lt;% if @user.role.parent_id != nil %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'limit' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/users/_actions.html.erb &lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,18 @@&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
  &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;!-- E1976   add action enable at instructor profile page--&amp;gt;&lt;br /&gt;
    &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if @user.role_id == 2 %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Action options&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;Check the boxes representing that whether to see assignment actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;action_enables&amp;quot;&amp;gt;I want to view the assignment &amp;lt;strong&amp;gt;Actions&amp;lt;/strong&amp;gt; on homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'action_enable'%&amp;gt;&amp;lt;/td&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;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db/migrate/20191117015928_add_actions_enable_to_users.rb&lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,5 @@&lt;br /&gt;
class AddActionsEnableToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :action_enable, :boolean, default: true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/controllers/users_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -163,7 +163,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
      post :create, params, session&lt;br /&gt;
      allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;chenzy@gmail.com&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
@@ -193,7 +194,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
@@ -224,7 +226,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
@@ -53,6 +53,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :superadmin, class: User do&lt;br /&gt;
@@ -75,6 +76,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :student, class: User do&lt;br /&gt;
@@ -98,6 +100,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :instructor, class: Instructor do&lt;br /&gt;
@@ -120,6 +123,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :teaching_assistant, class: Ta do&lt;br /&gt;
@@ -142,6 +146,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -1,7 +1,7 @@&lt;br /&gt;
describe User do&lt;br /&gt;
  let(:user) do&lt;br /&gt;
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',&lt;br /&gt;
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle', action_enable: 1&lt;br /&gt;
  end&lt;br /&gt;
  let(:user1) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
  let(:user2) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129621</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129621"/>
		<updated>2019-11-18T01:43:44Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* issue1384 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue#1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
 @@ -16,7 +16,7 @@&lt;br /&gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-7&amp;quot; id=&amp;quot;Badges&amp;quot;&amp;gt;Badges&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!--issue#1384, &amp;quot;other stuff&amp;quot; tab should be renamed to “Etc. …”--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;Etc. …&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
 @@ -50,6 +50,7 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
@@ -292,7 +292,8 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/import_file_helper.rb &lt;br /&gt;
&lt;br /&gt;
@@ -11,6 +11,7 @@ def self.define_attributes(row_hash)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
@@ -22,6 +22,7 @@ def self.define_attributes(line_split, config)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/participant.rb&lt;br /&gt;
&lt;br /&gt;
@@ -136,6 +136,7 @@ def self.export(csv, parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(part.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/bre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
@@ -231,6 +231,7 @@ def initialize(attributes = nil)&lt;br /&gt;
    @email_on_submission = true&lt;br /&gt;
    @email_on_review_of_review = true&lt;br /&gt;
    @copy_of_emails = false&lt;br /&gt;
    @action_enable = true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.export(csv, _parent_id, options)&lt;br /&gt;
@@ -241,6 +242,7 @@ def self.export(csv, _parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review, user.copy_of_emails) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/profile/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
@@ -10,6 +10,7 @@&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/email' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/institutions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/prefs' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/actions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'handle' %&amp;gt;&lt;br /&gt;
  &amp;lt;% if @user.role.parent_id != nil %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'limit' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/users/_actions.html.erb &lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,18 @@&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
  &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;!-- E1976   add action enable at instructor profile page--&amp;gt;&lt;br /&gt;
    &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if @user.role_id == 2 %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Action options&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;Check the boxes representing that whether to see assignment actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;action_enables&amp;quot;&amp;gt;I want to view the assignment &amp;lt;strong&amp;gt;Actions&amp;lt;/strong&amp;gt; on homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'action_enable'%&amp;gt;&amp;lt;/td&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;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db/migrate/20191117015928_add_actions_enable_to_users.rb&lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,5 @@&lt;br /&gt;
class AddActionsEnableToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :action_enable, :boolean, default: true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/controllers/users_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -163,7 +163,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
      post :create, params, session&lt;br /&gt;
      allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;chenzy@gmail.com&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
@@ -193,7 +194,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
@@ -224,7 +226,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
@@ -53,6 +53,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :superadmin, class: User do&lt;br /&gt;
@@ -75,6 +76,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :student, class: User do&lt;br /&gt;
@@ -98,6 +100,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :instructor, class: Instructor do&lt;br /&gt;
@@ -120,6 +123,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :teaching_assistant, class: Ta do&lt;br /&gt;
@@ -142,6 +146,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -1,7 +1,7 @@&lt;br /&gt;
describe User do&lt;br /&gt;
  let(:user) do&lt;br /&gt;
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',&lt;br /&gt;
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle', action_enable: 1&lt;br /&gt;
  end&lt;br /&gt;
  let(:user1) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
  let(:user2) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129620</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129620"/>
		<updated>2019-11-18T01:43:29Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* issue1430 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue#1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====issue1384====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
 @@ -16,7 +16,7 @@&lt;br /&gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-7&amp;quot; id=&amp;quot;Badges&amp;quot;&amp;gt;Badges&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!--issue#1384, &amp;quot;other stuff&amp;quot; tab should be renamed to “Etc. …”--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;Etc. …&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
 @@ -50,6 +50,7 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
@@ -292,7 +292,8 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/import_file_helper.rb &lt;br /&gt;
&lt;br /&gt;
@@ -11,6 +11,7 @@ def self.define_attributes(row_hash)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
@@ -22,6 +22,7 @@ def self.define_attributes(line_split, config)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/participant.rb&lt;br /&gt;
&lt;br /&gt;
@@ -136,6 +136,7 @@ def self.export(csv, parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(part.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/bre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
@@ -231,6 +231,7 @@ def initialize(attributes = nil)&lt;br /&gt;
    @email_on_submission = true&lt;br /&gt;
    @email_on_review_of_review = true&lt;br /&gt;
    @copy_of_emails = false&lt;br /&gt;
    @action_enable = true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.export(csv, _parent_id, options)&lt;br /&gt;
@@ -241,6 +242,7 @@ def self.export(csv, _parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review, user.copy_of_emails) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/profile/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
@@ -10,6 +10,7 @@&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/email' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/institutions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/prefs' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/actions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'handle' %&amp;gt;&lt;br /&gt;
  &amp;lt;% if @user.role.parent_id != nil %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'limit' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/users/_actions.html.erb &lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,18 @@&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
  &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;!-- E1976   add action enable at instructor profile page--&amp;gt;&lt;br /&gt;
    &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if @user.role_id == 2 %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Action options&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;Check the boxes representing that whether to see assignment actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;action_enables&amp;quot;&amp;gt;I want to view the assignment &amp;lt;strong&amp;gt;Actions&amp;lt;/strong&amp;gt; on homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'action_enable'%&amp;gt;&amp;lt;/td&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;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db/migrate/20191117015928_add_actions_enable_to_users.rb&lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,5 @@&lt;br /&gt;
class AddActionsEnableToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :action_enable, :boolean, default: true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/controllers/users_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -163,7 +163,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
      post :create, params, session&lt;br /&gt;
      allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;chenzy@gmail.com&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
@@ -193,7 +194,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
@@ -224,7 +226,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
@@ -53,6 +53,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :superadmin, class: User do&lt;br /&gt;
@@ -75,6 +76,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :student, class: User do&lt;br /&gt;
@@ -98,6 +100,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :instructor, class: Instructor do&lt;br /&gt;
@@ -120,6 +123,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :teaching_assistant, class: Ta do&lt;br /&gt;
@@ -142,6 +146,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -1,7 +1,7 @@&lt;br /&gt;
describe User do&lt;br /&gt;
  let(:user) do&lt;br /&gt;
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',&lt;br /&gt;
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle', action_enable: 1&lt;br /&gt;
  end&lt;br /&gt;
  let(:user1) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
  let(:user2) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129619</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129619"/>
		<updated>2019-11-18T01:43:03Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* File which are added/modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====issue1384====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
 @@ -16,7 +16,7 @@&lt;br /&gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-7&amp;quot; id=&amp;quot;Badges&amp;quot;&amp;gt;Badges&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!--issue#1384, &amp;quot;other stuff&amp;quot; tab should be renamed to “Etc. …”--&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;Etc. …&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
 @@ -50,6 +50,7 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
@@ -292,7 +292,8 @@ def user_params&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :action_enable)&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/import_file_helper.rb &lt;br /&gt;
&lt;br /&gt;
@@ -11,6 +11,7 @@ def self.define_attributes(row_hash)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
@@ -22,6 +22,7 @@ def self.define_attributes(line_split, config)&lt;br /&gt;
    attributes[&amp;quot;email_on_submission&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;email_on_review_of_review&amp;quot;] = 1&lt;br /&gt;
    attributes[&amp;quot;action_enable&amp;quot;] = 1&lt;br /&gt;
    attributes&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/participant.rb&lt;br /&gt;
&lt;br /&gt;
@@ -136,6 +136,7 @@ def self.export(csv, parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(part.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/bre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
@@ -231,6 +231,7 @@ def initialize(attributes = nil)&lt;br /&gt;
    @email_on_submission = true&lt;br /&gt;
    @email_on_review_of_review = true&lt;br /&gt;
    @copy_of_emails = false&lt;br /&gt;
    @action_enable = true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.export(csv, _parent_id, options)&lt;br /&gt;
@@ -241,6 +242,7 @@ def self.export(csv, _parent_id, options)&lt;br /&gt;
      tcsv.push(user.role.name) if options[&amp;quot;role&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.parent.name) if options[&amp;quot;parent&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.email_on_submission, user.email_on_review, user.email_on_review_of_review, user.copy_of_emails) if options[&amp;quot;email_options&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.action_enable) if options[&amp;quot;action_enable&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      tcsv.push(user.handle) if options[&amp;quot;handle&amp;quot;] == &amp;quot;true&amp;quot;&lt;br /&gt;
      csv &amp;lt;&amp;lt; tcsv&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/profile/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
@@ -10,6 +10,7 @@&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/email' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/institutions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/prefs' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/actions' %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'handle' %&amp;gt;&lt;br /&gt;
  &amp;lt;% if @user.role.parent_id != nil %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'limit' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/views/users/_actions.html.erb &lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,18 @@&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
  &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;!-- E1976   add action enable at instructor profile page--&amp;gt;&lt;br /&gt;
    &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if @user.role_id == 2 %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Action options&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;Check the boxes representing that whether to see assignment actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;action_enables&amp;quot;&amp;gt;I want to view the assignment &amp;lt;strong&amp;gt;Actions&amp;lt;/strong&amp;gt; on homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'action_enable'%&amp;gt;&amp;lt;/td&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;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db/migrate/20191117015928_add_actions_enable_to_users.rb&lt;br /&gt;
&lt;br /&gt;
@@ -0,0 +1,5 @@&lt;br /&gt;
class AddActionsEnableToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :action_enable, :boolean, default: true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/controllers/users_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -163,7 +163,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
      post :create, params, session&lt;br /&gt;
      allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;chenzy@gmail.com&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
@@ -193,7 +194,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
@@ -224,7 +226,8 @@&lt;br /&gt;
               timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
               public_key: nil,&lt;br /&gt;
               copy_of_emails: nil,&lt;br /&gt;
               institution_id: 1,&lt;br /&gt;
               action_enable: nil}&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
@@ -53,6 +53,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :superadmin, class: User do&lt;br /&gt;
@@ -75,6 +76,7 @@&lt;br /&gt;
    timezonepref nil&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :student, class: User do&lt;br /&gt;
@@ -98,6 +100,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :instructor, class: Instructor do&lt;br /&gt;
@@ -120,6 +123,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  factory :teaching_assistant, class: Ta do&lt;br /&gt;
@@ -142,6 +146,7 @@&lt;br /&gt;
    timezonepref 'Eastern Time (US &amp;amp; Canada)'&lt;br /&gt;
    public_key nil&lt;br /&gt;
    copy_of_emails  false&lt;br /&gt;
    action_enable true&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
spec/models/user_spec.rb&lt;br /&gt;
&lt;br /&gt;
@@ -1,7 +1,7 @@&lt;br /&gt;
describe User do&lt;br /&gt;
  let(:user) do&lt;br /&gt;
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',&lt;br /&gt;
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle', action_enable: 1&lt;br /&gt;
  end&lt;br /&gt;
  let(:user1) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
  let(:user2) { User.new name: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129617</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129617"/>
		<updated>2019-11-18T01:29:42Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* go to the assignment page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few actions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required)'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129616</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129616"/>
		<updated>2019-11-18T01:29:23Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* go to the assignment page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few acyions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required.'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all actions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:On_action.png&amp;diff=129615</id>
		<title>File:On action.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:On_action.png&amp;diff=129615"/>
		<updated>2019-11-18T01:29:04Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129614</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129614"/>
		<updated>2019-11-18T01:28:08Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Issue#1384 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few acyions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required.'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can view all acyions.'''&lt;br /&gt;
&lt;br /&gt;
[[File:on_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_on.png&amp;diff=129613</id>
		<title>File:Action enable on.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_on.png&amp;diff=129613"/>
		<updated>2019-11-18T01:27:13Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129612</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129612"/>
		<updated>2019-11-18T01:26:46Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Issue#1384 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few acyions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required.'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
=====enable the &amp;quot;Action options&amp;quot;=====&lt;br /&gt;
[[File:action_enable_on.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129611</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129611"/>
		<updated>2019-11-18T01:25:27Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* go to the assignment page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few acyions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required.'''&lt;br /&gt;
&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Off_action.png&amp;diff=129610</id>
		<title>File:Off action.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Off_action.png&amp;diff=129610"/>
		<updated>2019-11-18T01:25:04Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129609</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129609"/>
		<updated>2019-11-18T01:24:38Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* go to the assignment page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few acyions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required.'''&lt;br /&gt;
[[File:off_action.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Off_actions.png&amp;diff=129608</id>
		<title>File:Off actions.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Off_actions.png&amp;diff=129608"/>
		<updated>2019-11-18T01:23:50Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129607</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129607"/>
		<updated>2019-11-18T01:23:27Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Issue#1384 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
'''we have created a box named &amp;quot;Action options&amp;quot; in profile, only instructor can see this box.'''&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
=====go to the assignment page=====&lt;br /&gt;
'''Now instructor can only view few acyions which are not included in original &amp;quot;other stuff&amp;quot; interface. (we rename &amp;quot;other stuff&amp;quot; to &amp;quot;Etc. ... as issue required.'''&lt;br /&gt;
[[File:off_actions.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129606</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129606"/>
		<updated>2019-11-18T01:19:15Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
=====Login as instructor6, click &amp;quot;profile&amp;quot; button, choose not enable Actions options in homepage=====&lt;br /&gt;
[[File:action_enable_off.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off.png&amp;diff=129605</id>
		<title>File:Action enable off.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Action_enable_off.png&amp;diff=129605"/>
		<updated>2019-11-18T01:19:03Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129604</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129604"/>
		<updated>2019-11-18T01:15:11Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which he don't belong to, and when TA does this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which he assigned to this courses And we should then check if he is not in this course, he will not grant the right to unassign assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we ask which course an assignment is a part of, and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with a created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to discuss with the professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not included in TA course&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Try to remove the assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose a different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of the first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list below, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comments for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments since the changes were only made to the delete function and the test cases written a check for the display of proper flash messages that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''ssuccessful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Login to Expertiza as an instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding an instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as a participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129603</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129603"/>
		<updated>2019-11-18T01:13:21Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129602</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129602"/>
		<updated>2019-11-18T01:12:40Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
===Results===&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
======TA edit======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
======Instructor edit======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129601</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129601"/>
		<updated>2019-11-18T01:12:10Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
===Results===&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=======TA edit=======&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=======Instructor edit=======&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129600</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129600"/>
		<updated>2019-11-18T01:11:20Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
===Results===&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====Issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129599</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129599"/>
		<updated>2019-11-18T01:10:56Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
===Results===&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129598</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129598"/>
		<updated>2019-11-18T01:10:01Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
===Results===&lt;br /&gt;
&lt;br /&gt;
====Issue#1430====&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129597</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129597"/>
		<updated>2019-11-18T01:09:31Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
===Results===&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129596</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129596"/>
		<updated>2019-11-18T01:08:38Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129595</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129595"/>
		<updated>2019-11-18T01:08:18Z</updated>

		<summary type="html">&lt;p&gt;Tcao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
=====URL image=====&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129594</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129594"/>
		<updated>2019-11-18T01:07:15Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
&lt;br /&gt;
=====URL image=====&lt;br /&gt;
[[File:issue1430.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129593</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129593"/>
		<updated>2019-11-18T01:04:58Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* issue1430 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129592</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129592"/>
		<updated>2019-11-18T01:04:36Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* issue1430 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====issue1430====&lt;br /&gt;
[https://github.com/Tian[[Media:Example.ogg]]97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129591</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129591"/>
		<updated>2019-11-18T01:04:01Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* issue1430 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
=====issue1430=====&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add comment for the code related with issue expertiza#1430&lt;br /&gt;
&lt;br /&gt;
@@ -5,11 +5,11 @@ def course_options(instructor)&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      # E1976 issue #1430 the TA should not access a course s/he is not belong to.&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      # find the TA and course mapping, add course which the TA assigned to to the course list.&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
@@ -36,9 +36,10 @@ def course_options(instructor)&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # E1976 set the courses option for creating an assignment.&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      # the options can be nil which meaning the assignment can belong to no class.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129590</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129590"/>
		<updated>2019-11-18T01:02:57Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129589</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129589"/>
		<updated>2019-11-17T23:37:49Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Instructor view */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
=====Instructor edit=====&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129588</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129588"/>
		<updated>2019-11-17T23:37:36Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* TA edit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
=====TA edit=====&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129587</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129587"/>
		<updated>2019-11-17T23:37:24Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* issue#1384 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129586</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129586"/>
		<updated>2019-11-17T23:36:57Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
====issue#1384====&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129585</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129585"/>
		<updated>2019-11-17T23:36:17Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
====issue#1430====&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129584</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129584"/>
		<updated>2019-11-17T23:35:56Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
issue#1430:&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129583</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129583"/>
		<updated>2019-11-17T23:35:48Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
issue#1430:&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129582</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129582"/>
		<updated>2019-11-17T23:35:40Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
issue#1430:&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
====='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129581</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129581"/>
		<updated>2019-11-17T23:35:32Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
issue#1430:&lt;br /&gt;
====='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''=====&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129580</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129580"/>
		<updated>2019-11-17T23:35:02Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
issue#1430:&lt;br /&gt;
==='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129579</id>
		<title>CSC/ECE 517 Fall 2019 - E1976. Issues Related to Assignment Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1976._Issues_Related_to_Assignment_Creation&amp;diff=129579"/>
		<updated>2019-11-17T23:34:33Z</updated>

		<summary type="html">&lt;p&gt;Tcao: /* issue1430 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1976. Issues Related to Assignment Creation==&lt;br /&gt;
&lt;br /&gt;
This page is a description of Expertiza OSS project E.1976 Issues Related to Assignment Creation.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
 &lt;br /&gt;
For this project E1976, like the OSS project, we have three issues that need to be fixed in the expertiza. Firstly, a TA can unassign an assignment from the course which him don't belong to, and when TA do this, the other TA may lose access to the assignment, so they can't fix it. The second issue is, Sometimes, when an instructor creates an assignment and hits “Save” without completely filling out the form, (s)he ends up editing a different assignment. And the third problem is On an instructor's/admin's/TA's homepage, in the assignment list, there are three rows of icons for performing several operations. But right now an instructor is not able to choose whether to see these actions on the homepage or on a tab associated with each assignment.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions==&lt;br /&gt;
&lt;br /&gt;
===Issue #1430 - Shouldn't be able to move an assignment. to a course you don't have access to.===&lt;br /&gt;
Proposed solution: We want to make sure that the TA can't access other assignments except the assignment which him assigned to this courses And we should then check if he is not in this course, he will not grant right to unassign an assignments.&lt;br /&gt;
&lt;br /&gt;
===issue #1384 - Instructor should be able to choose where to see assignment actions===&lt;br /&gt;
[[File: actions.jpeg]]&lt;br /&gt;
&lt;br /&gt;
Proposed solution: An instructor should be able to choose whether to see these actions on the homepage or on a tab associated with each assignment. So there should be a setting in the instructor’s Profile that controls these actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1354 - Creating one assignment, I was dropped into another assignment!===&lt;br /&gt;
&lt;br /&gt;
Proposed solution: The problem can be because there are two assignments with the same name.so it would lead to the old assignment when it is created, the system will sort all the lists of assignment names, then find the past duplicate name assignment, resulting in ends up editing a different assignment&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
 &lt;br /&gt;
===Design Strategy===&lt;br /&gt;
&lt;br /&gt;
====issue #1430====&lt;br /&gt;
During changing the assignment, first we asks which course an assignment is part of , and then list only those courses that the instructor or TA has access to. So the TA and the instructor can only deal with the courses they related to, but not the irrelevant courses.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1430 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1384====&lt;br /&gt;
The instructor could edit the course settings, and in &amp;quot;other stuff&amp;quot; the instructor could change the action icons to show whether these actions on the homepage or on a tab associated with each assignment. So in our cases we need to create a boolean attribute to control the action icons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issure1384 design.png]]&lt;br /&gt;
&lt;br /&gt;
====issue #1354====&lt;br /&gt;
While the instructor creates the assignments having the same name with created assignment, It was dropped into another assignment. In this problem, we need to set a double check while creating the assignments, if the name of the assignment has been used. That will fix the bug and also easy for the students to read.&lt;br /&gt;
&lt;br /&gt;
===Use Cases===&lt;br /&gt;
issue#1430:&lt;br /&gt;
==='''Log in as instructor6, create a course named &amp;quot;new course&amp;quot;, add student34, student35 as TA in this course.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:addTA.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Assign an assignment named &amp;quot;new assignment&amp;quot; to &amp;quot;new course&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:course_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Log out, log in as student34, TA can view assignment named &amp;quot;new assignment&amp;quot; in the course named &amp;quot;new course&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
[[File:TA_view.png]]&lt;br /&gt;
&lt;br /&gt;
==='''Since student34 only been add as TA in &amp;quot;new course&amp;quot;, when he/she edits the assignment, he/she can only view the course named &amp;quot;new course&amp;quot;. Old version the TA can view all courses and the None option &amp;quot;-----------&amp;quot; (view in issue statement), now edit assignment only the instructor can view all courses and None option &amp;quot;-----------&amp;quot;.'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TA edit===&lt;br /&gt;
[[File:TA_edit.png]]&lt;br /&gt;
&lt;br /&gt;
===Instructor view===&lt;br /&gt;
[[File:instructor_view.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=====issue#1384=====&lt;br /&gt;
&lt;br /&gt;
#Login as an instructor&lt;br /&gt;
#Edit the course settings of other stuff&lt;br /&gt;
#Recording a video to show how the homepage change&lt;br /&gt;
&lt;br /&gt;
=====issue#1430=====&lt;br /&gt;
&lt;br /&gt;
#Login as TA&lt;br /&gt;
#Find out whether TA can view all assignment (this part our mentor need to dicuss with professor to clarify)&lt;br /&gt;
#Try to remove assignment which is not incluede in TA course&lt;br /&gt;
#Login as instructor&lt;br /&gt;
#Try to remove assignment&lt;br /&gt;
&lt;br /&gt;
=====issue#1354=====&lt;br /&gt;
We have already reproduced this &amp;quot;same name&amp;quot; issue successfully.&lt;br /&gt;
&lt;br /&gt;
#Create two assignments but choose different course.&lt;br /&gt;
#First one's course is fall 2017, the second one's we choose fall 2016.&lt;br /&gt;
#Hit the &amp;quot;save&amp;quot; button of the second assignment, it will automatically show the page of first assignment of course fall 2017.&lt;br /&gt;
#Add tests in files list blow, and pass all tests.&lt;br /&gt;
&lt;br /&gt;
===File which are added/modified===&lt;br /&gt;
&lt;br /&gt;
====System====&lt;br /&gt;
&lt;br /&gt;
===issue1430===&lt;br /&gt;
[https://github.com/Tian97/expertiza/commit/bc6d2c1b630597966ae4b4cbd67180468f7c130b fixed the issue relate with issue#1430]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app/helpers/assignment_helper.rb&lt;br /&gt;
&lt;br /&gt;
      # courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # courses.flatten!&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      options = []&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
        options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
@@ -20,13 +33,17 @@ def course_options(instructor)&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      set_courses_options(courses)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_courses_options(courses)&lt;br /&gt;
      options = []&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
      end&lt;br /&gt;
      options.uniq.sort&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/controllers/profile_controller.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_form.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/models/user.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====UI====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/expertiza/app/view/profile/profile_edit.html.erb&lt;br /&gt;
&lt;br /&gt;
/expertiza/app/view/assignment/show.html.erb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The following issues were fixed in a project last year, but they still lack tests.===&lt;br /&gt;
*Reference from [http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;br /&gt;
=====issue#1008=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza with the credentials: instructor6/password (on google chrome)&lt;br /&gt;
# Go to the '''Manage''' -&amp;gt; '''Assignments'''.&lt;br /&gt;
# Click on '''New Public Assignment'''&lt;br /&gt;
# On the new assignment creation page, under the '''General''' tab, give details for '''Assignment name''', '''Course''' (choose CSC 517, Spring 2016) and '''Submission directory'''. &lt;br /&gt;
# Check the '''Staggered deadline assignment?''' checkbox.&lt;br /&gt;
# Click on the '''Rubrics''' tab and give some values for '''Review''' and '''Author Feedback''', if there are any other fields apart from these give values to that too.&lt;br /&gt;
# Click on '''Create''' at the bottom.&lt;br /&gt;
# Now, click on the the '''Topics''' tab and further click on '''New Topic'''.&lt;br /&gt;
# Give suitable values to the fields and click on '''Create'''.&lt;br /&gt;
# Click on the '''Due dates''' tab.&lt;br /&gt;
# Check the '''Use signup deadline''' checkbox and give suitable dates for '''Signup''', '''Round1: Submission''' and '''Round1: Review'''.&lt;br /&gt;
# Go back to the '''Topics''' tab and click on '''Show start/due date''' at the bottom.&lt;br /&gt;
# Change the '''Submission deadline''' date to date later than the date given for '''Signup''' on the '''Due dates''' tab.&lt;br /&gt;
# Click on '''save''' at the bottom.&lt;br /&gt;
# Now, click on the '''Other stuff''' tab and and further click on '''Add participant'''. It will open in a new tab.&lt;br /&gt;
# Click on '''Copy participants from course'''. After it adds the participants, close the tab.&lt;br /&gt;
# Go to '''Manage''' -&amp;gt;  '''Impersonate User'''.&lt;br /&gt;
# Give '''student6360''' for the '''Enter user account''' field and click on '''Impersonate'''.&lt;br /&gt;
# Click on '''Assignments''' and further click on the assignment that was created in the earlier steps.&lt;br /&gt;
# Click on Signup Sheet.&lt;br /&gt;
# You should be able to see a '''green tick mark''' under the Actions header and '''should be able to click on it''' and signup, which means the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
=====issue#1017=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
''Task Description:'' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
''Precondition:'' The instructor has set up the page for assignment creation&lt;br /&gt;
&lt;br /&gt;
''Primary Flow:''&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select '''New Assignment'''&lt;br /&gt;
# Enter the '''Assignment Name''' and select '''Course'''. &lt;br /&gt;
# Check the parameters for the teams, quiz, badges categories etc. &lt;br /&gt;
# Click '''Create'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Task Description: Instructor deleting an assignment&lt;br /&gt;
&lt;br /&gt;
Precondition: There exists at least one assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
Primary Flow:&lt;br /&gt;
&lt;br /&gt;
# Log in to Expertiza&lt;br /&gt;
# Select the '''Delete''' option in the action section for an assignment that is created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor''', the assignment gets deleted for that action.&lt;br /&gt;
# Else, the '''current participant''' is shown the '''error''' message that they do not have authorization to execute the delete option if they '''did not create that assignment'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
The issue as such did not require modifying the controller spec file for assignments, since the changes were only made to the delete function and the test cases written check for the display of proper flash message that could be mapped for the modified code functionality. Only '''manual testing''' was performed to determine '''successful deletion''' by '''instructor'''.&lt;br /&gt;
&lt;br /&gt;
=====issue#1072=====&lt;br /&gt;
&lt;br /&gt;
Manual Testing&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Create a new Assignment &lt;br /&gt;
# Click on the add participant button for the assignment created&lt;br /&gt;
# Modify the participant list by adding instructor as a participant&lt;br /&gt;
# Check the list to see the instructor added to the assignment as participant&lt;br /&gt;
&lt;br /&gt;
Automated Testing&lt;br /&gt;
&lt;br /&gt;
No automated test cases, only manual testing since the modifications are made to the view files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on Github]&lt;br /&gt;
#[https://github.com/Tian97/expertiza.git GitHub Project Repository Fork]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1613 Pull Request Link]&lt;br /&gt;
#[http://wiki.expertiza.ncsu.edu/index.php/E1863_Issues_related_to_assignment_creation#Test_Plan E1863_Issues_related_to_assignment_creation#Test_Plan]&lt;/div&gt;</summary>
		<author><name>Tcao</name></author>
	</entry>
</feed>