<?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=Asony</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=Asony"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Asony"/>
	<updated>2026-06-03T18:16:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125013</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125013"/>
		<updated>2019-05-08T10:51:51Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to (i) create and associate badges with courses and assignments, (ii) award badges to individual students by an instructor, (iii) automatically award badges based on some condition. However, some of the awarding functionality remains to be designed. &lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate other teams, whose work they have reviewed. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Relevant code files==&lt;br /&gt;
* app/controllers/team_nominations_controller.rb&lt;br /&gt;
* app/models/team_nomination.rb&lt;br /&gt;
* app/views/course/edit.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/team_nominations/_list.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badge_nominations.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badges.html.erb&lt;br /&gt;
&lt;br /&gt;
==Database schema changes==&lt;br /&gt;
Added a new table '''team_nominations''' with the following columns.&lt;br /&gt;
* team_id&lt;br /&gt;
* badge_id&lt;br /&gt;
* assignment_id&lt;br /&gt;
* status&lt;br /&gt;
* nominator_id&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nominate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* Multiple nominations for the same team are clubbed together to a single row on the list. The '''Nominated By''' column in this case shown a comma separated list of all the nominators.&lt;br /&gt;
* When a team nomination for a badge is approved, all the team participants gets awarded that badge.&lt;br /&gt;
* '''Submitted Work''' includes hyperlinks as well as files submitted by the team which was nominated. An instructor can thus review the work before taking an action on the nomination.&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125012</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125012"/>
		<updated>2019-05-08T10:47:28Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Relevant code files==&lt;br /&gt;
* app/controllers/team_nominations_controller.rb&lt;br /&gt;
* app/models/team_nomination.rb&lt;br /&gt;
* app/views/course/edit.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/team_nominations/_list.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badge_nominations.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badges.html.erb&lt;br /&gt;
&lt;br /&gt;
==Database schema changes==&lt;br /&gt;
Added a new table '''team_nominations''' with the following columns.&lt;br /&gt;
* team_id&lt;br /&gt;
* badge_id&lt;br /&gt;
* assignment_id&lt;br /&gt;
* status&lt;br /&gt;
* nominator_id&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nominate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* Multiple nominations for the same team are clubbed together to a single row on the list. The '''Nominated By''' column in this case shown a comma separated list of all the nominators.&lt;br /&gt;
* When a team nomination for a badge is approved, all the team participants gets awarded that badge.&lt;br /&gt;
* '''Submitted Work''' includes hyperlinks as well as files submitted by the team which was nominated. An instructor can thus review the work before taking an action on the nomination.&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125011</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125011"/>
		<updated>2019-05-08T10:46:34Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Relevant code files==&lt;br /&gt;
* app/controllers/team_nominations_controller.rb&lt;br /&gt;
* app/models/team_nomination.rb&lt;br /&gt;
* app/views/course/edit.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/team_nominations/_list.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badge_nominations.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badges.html.erb&lt;br /&gt;
&lt;br /&gt;
==Database schema changes==&lt;br /&gt;
Added a new table '''team_nominations''' with the following columns.&lt;br /&gt;
* team_id&lt;br /&gt;
* badge_id&lt;br /&gt;
* assignment_id&lt;br /&gt;
* status&lt;br /&gt;
* nominator_id&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nominate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* Multiple nominations for the same team are clubbed together to a single row on the list. The '''Nominated By''' column in this case shown a comma separated list of all the nominators.&lt;br /&gt;
* When a team nomination for a badge is approved, all the team participants gets awarded that badge.&lt;br /&gt;
* '''Submitted Work''' includes hyperlinks as well as files submitted by the team which was nominated. An instructor can thus review the work before taking an action on the nomination.&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125010</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125010"/>
		<updated>2019-05-08T10:45:48Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Relevant code files==&lt;br /&gt;
* app/controllers/team_nominations_controller.rb&lt;br /&gt;
* app/models/team_nomination.rb&lt;br /&gt;
* app/views/course/edit.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/team_nominations/_list.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badge_nominations.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badges.html.erb&lt;br /&gt;
&lt;br /&gt;
==Database schema changes==&lt;br /&gt;
Added a new table '''team_nominations''' with the following columns&lt;br /&gt;
* team_id&lt;br /&gt;
* badge_id&lt;br /&gt;
* assignment_id&lt;br /&gt;
* status&lt;br /&gt;
* nominator_id&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nominate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* Multiple nominations for the same team are clubbed together to a single row on the list. The '''Nominated By''' column in this case shown a comma separated list of all the nominators.&lt;br /&gt;
* When a team nomination for a badge is approved, all the team participants gets awarded that badge.&lt;br /&gt;
* '''Submitted Work''' includes hyperlinks as well as files submitted by the team which was nominated. An instructor can thus review the work before taking an action on the nomination.&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125009</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125009"/>
		<updated>2019-05-08T10:41:57Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Relevant code files==&lt;br /&gt;
* app/controllers/team_nominations_controller.rb&lt;br /&gt;
* app/models/team_nomination.rb&lt;br /&gt;
* app/views/course/edit.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/team_nominations/_list.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badge_nominations.html.erb&lt;br /&gt;
* app/views/team_nominations/list_badges.html.erb&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nominate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* Multiple nominations for the same team are clubbed together to a single row on the list. The '''Nominated By''' column in this case shown a comma separated list of all the nominators.&lt;br /&gt;
* When a team nomination for a badge is approved, all the team participants gets awarded that badge.&lt;br /&gt;
* '''Submitted Work''' includes hyperlinks as well as files submitted by the team which was nominated. An instructor can thus review the work before taking an action on the nomination.&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125008</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125008"/>
		<updated>2019-05-08T09:57:05Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nominate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* Multiple nominations for the same team are clubbed together to a single row on the list. The '''Nominated By''' column in this case shown a comma separated list of all the nominators.&lt;br /&gt;
* When a team nomination for a badge is approved, all the team participants gets awarded that badge.&lt;br /&gt;
* '''Submitted Work''' includes hyperlinks as well as files submitted by the team which was nominated. An instructor can thus review the work before taking an action on the nomination.&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125007</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125007"/>
		<updated>2019-05-08T09:42:24Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nominate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations and awards badges to individual students.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
* Multiple nominations for the same team are clubbed together to a single row on the list. The '''Nominated By''' column in this case shown a comma separated list of all the nominators.&lt;br /&gt;
* When a team nomination for a badge is approved, all the team participants gets awarded that badge.&lt;br /&gt;
* '''Submitted Work''' includes hyperlinks as well as files submitted by the team which was nominated. An instructor can thus review the work before taking an action on the nomination.&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Nominate.png&amp;diff=125006</id>
		<title>File:Nominate.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Nominate.png&amp;diff=125006"/>
		<updated>2019-05-08T09:29:49Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:List_nominations.png&amp;diff=125005</id>
		<title>File:List nominations.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:List_nominations.png&amp;diff=125005"/>
		<updated>2019-05-08T09:25:33Z</updated>

		<summary type="html">&lt;p&gt;Asony: uploaded a new version of &amp;amp;quot;File:List nominations.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Edit_course.png&amp;diff=125004</id>
		<title>File:Edit course.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Edit_course.png&amp;diff=125004"/>
		<updated>2019-05-08T09:12:30Z</updated>

		<summary type="html">&lt;p&gt;Asony: uploaded a new version of &amp;amp;quot;File:Edit course.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125003</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125003"/>
		<updated>2019-05-08T09:09:50Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Login as a student.&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Status of the nomination===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations and awards badges to individual students.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to manage team nominations===&lt;br /&gt;
# Login as an instructor.&lt;br /&gt;
# Select a course and click on edit.&lt;br /&gt;
# Click on the '''Approve Nominations''' tab.&lt;br /&gt;
# A list of all team nominations is shown with two action buttons - '''Approve''' and '''Disapprove'''.&lt;br /&gt;
# Click on a particular action for each of the nominations and then click on '''Submit'''.&lt;br /&gt;
&lt;br /&gt;
The following image below shows a sample selection of actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:edit_course.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_nominations.png]]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Edit_course.png&amp;diff=125002</id>
		<title>File:Edit course.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Edit_course.png&amp;diff=125002"/>
		<updated>2019-05-08T09:08:41Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:List_nominations.png&amp;diff=125001</id>
		<title>File:List nominations.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:List_nominations.png&amp;diff=125001"/>
		<updated>2019-05-08T09:00:39Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125000</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=125000"/>
		<updated>2019-05-08T08:40:06Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges2.png]]&lt;br /&gt;
&lt;br /&gt;
===Status of the nomination===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination and then '''Submit'''. This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status1.png]]&lt;br /&gt;
&lt;br /&gt;
==Instructor Flow==&lt;br /&gt;
This section is about how an instructor manages team nominations and awards badges to individual students.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:instructor_flow.png]]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Nomination_status1.png&amp;diff=124999</id>
		<title>File:Nomination status1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Nomination_status1.png&amp;diff=124999"/>
		<updated>2019-05-08T08:39:42Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:List_badges2.png&amp;diff=124998</id>
		<title>File:List badges2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:List_badges2.png&amp;diff=124998"/>
		<updated>2019-05-08T08:37:47Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:List_badges1.png&amp;diff=124997</id>
		<title>File:List badges1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:List_badges1.png&amp;diff=124997"/>
		<updated>2019-05-08T08:35:59Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_flow.png&amp;diff=124996</id>
		<title>File:Instructor flow.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_flow.png&amp;diff=124996"/>
		<updated>2019-05-08T08:30:43Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124992</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124992"/>
		<updated>2019-05-08T06:52:08Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
The following image below shows the badge selection screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list_badges.png]]&lt;br /&gt;
&lt;br /&gt;
===Status of the nomination===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes to '''Cancel Nomination'''. Click on this to cancel the nomination (before or after clicking on '''Submit'''). This status means that the nomination is still pending for approval/disapproval with the instructor.&lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the following message is shown beside the badge: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes back to '''Nominate''', which means the team could be nominated again for that particular badge.&lt;br /&gt;
&lt;br /&gt;
The image below shows the three different statuses, a nomination could be in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:nomination_status.png]]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Nomination_status.png&amp;diff=124991</id>
		<title>File:Nomination status.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Nomination_status.png&amp;diff=124991"/>
		<updated>2019-05-08T06:50:34Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124987</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124987"/>
		<updated>2019-05-08T04:25:23Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
[[File:list_badges.png]]&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
===Status of the nomination===&lt;br /&gt;
The button reflects the status of the nomination. &lt;br /&gt;
*Once the '''Nominate''' button is clicked, the button label changes from '''Nominate''' to '''Cancel Nomination'''. Click on this to cancel the nomination (before or after clicking on '''Submit'''). &lt;br /&gt;
*Nominations cannot be cancelled once the instructor approves it. In that case, the button becomes inactive and the label changes to the following message: '''This badge has already been awarded'''. &lt;br /&gt;
*If the instructor disapproves a nomination, the button label changes from&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124986</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124986"/>
		<updated>2019-05-08T04:18:29Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
[[File:list_badges.png]]&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;br /&gt;
&lt;br /&gt;
===Status of the nomination===&lt;br /&gt;
The button reflects the status of the nomination. Once the '''Nominate''' button is clicked, the button label changes from '''Nominate''' to '''Cancel Nomination'''. Click on this to cancel the nomination (before or after clicking on '''Submit'''). Nominations cannot be cancelled once the instructor approves it. In that case, the button becomes inactive and the label changes to the following message: '''This badge has already been awarded'''. If the instructor disapproves a nomination, the button label changes from The following image below shows the three status&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124985</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124985"/>
		<updated>2019-05-08T03:25:37Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;br /&gt;
&lt;br /&gt;
===Steps to nominate a team===&lt;br /&gt;
# Click on an assignment and then click on '''Other's work'''.&lt;br /&gt;
# Click on '''Nominate''', against a particular review.&lt;br /&gt;
# A list of available badges is shown.&lt;br /&gt;
[[File:list_badges.png]]&lt;br /&gt;
# Click on '''Nominate''' against each of the badges that should be awarded for that team.&lt;br /&gt;
# Click on '''Submit'''&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:List_badges.png&amp;diff=124984</id>
		<title>File:List badges.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:List_badges.png&amp;diff=124984"/>
		<updated>2019-05-08T03:24:39Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124983</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124983"/>
		<updated>2019-05-08T02:23:01Z</updated>

		<summary type="html">&lt;p&gt;Asony: /* Flow Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow1.png]]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_flow1.png&amp;diff=124982</id>
		<title>File:Student flow1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_flow1.png&amp;diff=124982"/>
		<updated>2019-05-08T02:22:51Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_flow.png&amp;diff=124981</id>
		<title>File:Student flow.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_flow.png&amp;diff=124981"/>
		<updated>2019-05-08T02:13:26Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124980</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124980"/>
		<updated>2019-05-08T02:12:48Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Expertiza is an application built on the MVC framework to create reusable learning objects through peer review. It currently lacks micro-credentialing, which is a way to recognize students by awarding badges, for attaining specific skills in addition to the usual coursework. Past work on the implementation of badges has interfaced Expertiza with the badging platform Credly and provided a way to associate badges with courses and assignments. However, some of the awarding functionality remains to be designed. Specifically, there are three ways badges might be awarded: (i) the instructor might award them manually; (ii) students might nominate other teams for badges or (iii) badges might be awarded automatically, based on ratings by peer reviewers on specific criteria in the review rubric.&lt;br /&gt;
&lt;br /&gt;
As part of this independent study, team nominations functionality has been implemented which enables students to nominate teams, whose work they have reviewed, for badges. The instructor then approves or disapproves these nominations based on the submitted work.&lt;br /&gt;
&lt;br /&gt;
==Student Flow==&lt;br /&gt;
This section deals with how a student can nominate other teams for badges. Students can only nominates teams whose work they have reviewed.&lt;br /&gt;
&lt;br /&gt;
===Flow Diagram===&lt;br /&gt;
[[File:student_flow.png]]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124979</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124979"/>
		<updated>2019-05-07T22:25:46Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124978</id>
		<title>Independent Study Spring 2019/Micro-Credentialing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Independent_Study_Spring_2019/Micro-Credentialing&amp;diff=124978"/>
		<updated>2019-05-07T22:19:34Z</updated>

		<summary type="html">&lt;p&gt;Asony: Created page with &amp;quot;xfdf&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;xfdf&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121505</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121505"/>
		<updated>2018-12-11T20:25:02Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignments are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were some issues related to the assignment creation. The main motive behind this project is to fix these issues and provide improved functionalities.&lt;br /&gt;
&lt;br /&gt;
There are in all 5 issues that are being dealt within this project and each of them are explained in detail below.&lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                   &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
                          :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented: &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                &amp;lt;span style=background:lightgreen&amp;gt;(@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))&amp;lt;/span&amp;gt; %&amp;gt;&lt;br /&gt;
                      &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
                             :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&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;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://youtu.be/G9rWkcBSPnU Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1320 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to delete any assignment that shows up in the list without the need for matching the assignment Id with it's own and giving Instructor the ability to delete any assignment created by a TA.&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:E1863-Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. &lt;br /&gt;
&lt;br /&gt;
The code at present checks for the current user and allows it the permission to delete the file if it's id matches with the Id of assignment creator. &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;span style=background:yellow&amp;gt;if id != @assignment_form.assignment.instructor_id&amp;lt;/span&amp;gt;&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;if @user.role.name == &amp;quot;Instructor&amp;quot; or (@user.role.name == &amp;quot;Teaching Assistant&amp;quot; and id == @assignment_form.assignment.instructor_id)&amp;lt;/span&amp;gt;&lt;br /&gt;
     # allow delete&lt;br /&gt;
     @assignment_form.delete(params[:force])&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
     flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
     # throw error&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
     raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&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;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=-3PTZjRLN-o&amp;amp;t=2s Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1324 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would reuse the existing automation tests.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=io89e3xlRPA Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
The issue was not with the instructor been not able to get added as the participant but it was that the list was not getting updated after adding the participant  and that was due to inconsistent referencing in the view and javascript file. the inconsistent version of both the file is shown as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$(&amp;quot;#plist&amp;quot;).append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table id=&amp;quot;&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changed versions are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$(&amp;quot;&amp;lt;span style=background:yellow&amp;gt;#user_list&amp;lt;/span&amp;gt;&amp;quot;).append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;table id=&amp;quot;&amp;lt;span style=background:lightgreen&amp;gt;user_list&amp;lt;/span&amp;gt;&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt; # here the table id is changed to user_list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=5LImhZ3F_RA&amp;amp;t=2s Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1323 Pull request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following test was added to '''assignment_form_spec.rb''' to test if there is an error if the sum of weights of the rubrics do not add up to 0 or 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     context 'when both save and update_attributes method do not work with wrong rubrics weights' do&lt;br /&gt;
        it 'changes @has_errors value to true and returns nil' do&lt;br /&gt;
          allow(assignment_questionnaire).to receive(:save).and_return(true)&lt;br /&gt;
          allow(assignment_questionnaire2).to receive(:update_attributes).with(assignment_questionnaire2).and_return(true)&lt;br /&gt;
          allow(assignment_questionnaire2).to receive(:[]).with(:questionnaire_weight).and_return(12)&lt;br /&gt;
          expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(nil)&lt;br /&gt;
          expect(assignment_form.instance_variable_get(:@has_errors)).to be true&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=3RKdJe1lxS0 Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121443</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121443"/>
		<updated>2018-12-10T04:41:47Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignments are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were various issues related to saving data in these. The main motive behind this project is to fix these issues and maintain data integrity.&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project and each of them are explained in detail below.&lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                   &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
                          :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                &amp;lt;span style=background:lightgreen&amp;gt;(@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))&amp;lt;/span&amp;gt; %&amp;gt;&lt;br /&gt;
                      &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
                             :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&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;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://youtu.be/G9rWkcBSPnU Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1320 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if @user.role.name == &amp;quot;Instructor&amp;quot; or (@user.role.name == &amp;quot;Teaching Assistant&amp;quot; and id == @assignment_form.assignment.instructor_id)&lt;br /&gt;
     # allow delete&lt;br /&gt;
     @assignment_form.delete(params[:force])&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
     flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
     # throw error&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
     raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 or Teaching Assistant 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 created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor or Teaching Assistant''', 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases mainly involve controller testing to check the '''assignment created by TA''' and it '''can be deleted by instructor''' through invocation of the '''''delete''''' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=-3PTZjRLN-o&amp;amp;t=2s Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1324 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would reuse the existing automation tests.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=io89e3xlRPA Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
The issue was not with the instructor been not able to get added as the participant but it was that the list was not getting updated after adding the participant  and that was due to inconsistent referencing in the view and javascript file. the inconsistent version of both the file is shown as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$(&amp;quot;#plist&amp;quot;).append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table id=&amp;quot;&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changed versions are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$(&amp;quot;&amp;lt;span style=background:yellow&amp;gt;#user_list&amp;lt;/span&amp;gt;&amp;quot;).append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;table id=&amp;quot;&amp;lt;span style=background:lightgreen&amp;gt;user_list&amp;lt;/span&amp;gt;&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt; # here the table id is changed to user_list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=5LImhZ3F_RA&amp;amp;t=2s Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1323 Pull request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following test was added to '''assignment_form_spec.rb''' to test if there is an error if the sum of weights of the rubrics do not add up to 0 or 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     context 'when both save and update_attributes method do not work with wrong rubrics weights' do&lt;br /&gt;
        it 'changes @has_errors value to true and returns nil' do&lt;br /&gt;
          allow(assignment_questionnaire).to receive(:save).and_return(true)&lt;br /&gt;
          allow(assignment_questionnaire2).to receive(:update_attributes).with(assignment_questionnaire2).and_return(true)&lt;br /&gt;
          allow(assignment_questionnaire2).to receive(:[]).with(:questionnaire_weight).and_return(12)&lt;br /&gt;
          expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(nil)&lt;br /&gt;
          expect(assignment_form.instance_variable_get(:@has_errors)).to be true&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=3RKdJe1lxS0 Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121416</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121416"/>
		<updated>2018-12-08T05:33:55Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignments are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were various issues related to saving data in these. The main motive behind this project is to fix these issues and maintain data integrity.&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project and each of them are explained in detail below.&lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                   &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
                          :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                      &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
                             :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&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;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://youtu.be/G9rWkcBSPnU Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1320 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if @user.role.name == &amp;quot;Instructor&amp;quot; or (@user.role.name == &amp;quot;Teaching Assistant&amp;quot; and id == @assignment_form.assignment.instructor_id)&lt;br /&gt;
     # allow delete&lt;br /&gt;
     @assignment_form.delete(params[:force])&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
     flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
     # throw error&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
     raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 or Teaching Assistant 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 created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor or Teaching Assistant''', 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases mainly involve controller testing to check the '''assignment created by TA''' and it '''can be deleted by instructor''' through invocation of the '''''delete''''' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=-3PTZjRLN-o&amp;amp;t=2s Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1324 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
The issue was not with the instructor been not able to get added as the participant but it was that the list was not getting updated after adding the participant  and that was due to inconsistent referencing in the view and javascript file. the inconsistent version of both the file is shown as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$(&amp;quot;#plist&amp;quot;).append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table id=&amp;quot;&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changed versions are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$&amp;lt;b&amp;gt;(&amp;quot;#user_list&amp;quot;)&amp;lt;/b&amp;gt;.append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table id=&amp;quot;user_list&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt; # here the table id is changed to user_list&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://www.youtube.com/watch?v=5LImhZ3F_RA&amp;amp;t=2s Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1323 Pull request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Demo Video Link]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121402</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121402"/>
		<updated>2018-12-08T04:37:51Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignments are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were various issues related to saving data in these. The main motive behind this project is to fix these issues and maintain data integrity.&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project and each of them are explained in detail below.&lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                   &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
                          :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                      &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
                             :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1320 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if @user.role.name == &amp;quot;Instructor&amp;quot; or (@user.role.name == &amp;quot;Teaching Assistant&amp;quot; and id == @assignment_form.assignment.instructor_id)&lt;br /&gt;
     # allow delete&lt;br /&gt;
     @assignment_form.delete(params[:force])&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
     flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
     # throw error&lt;br /&gt;
     ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
     raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 or Teaching Assistant 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 created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor or Teaching Assistant''', 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases mainly involve controller testing to check the '''assignment created by TA''' and it '''can be deleted by instructor''' through invocation of the '''''delete''''' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1324 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
The issue was not with the instructor been not able to get added as the participant but it was that the list was not getting updated after adding the participant  and that was due to inconsistent referencing in the view and javascript file. the inconsistent version of both the file is shown as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$(&amp;quot;#plist&amp;quot;).append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table id=&amp;quot;&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changed versions are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; add.js.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;% unless flash[:error] %&amp;gt;&lt;br /&gt;
$&amp;lt;b&amp;gt;(&amp;quot;#user_list&amp;quot;)&amp;lt;/b&amp;gt;.append(&lt;br /&gt;
	&amp;quot;&amp;lt;%= j render :partial =&amp;gt; 'participant', :locals =&amp;gt; {participant: @participant, :userid =&amp;gt; @participant.user_id, :controller =&amp;gt; 'participants'} %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
+$(&amp;quot;#flash_message&amp;quot;).html(&amp;quot;&amp;lt;%= j render partial: &amp;quot;shared/flash_messages&amp;quot; %&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; _user_list.html.erb file&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table id=&amp;quot;user_list&amp;quot; class=&amp;quot;table table-striped&amp;quot; style=&amp;quot;font-size: 15px&amp;quot;&amp;gt; # here the table id is changed to user_list&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1323 pull request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1328 Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121150</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121150"/>
		<updated>2018-12-07T15:44:10Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignemtns are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were various issues related to saving data in these. The main motive behind this project is to fix these issues and maintain data integrity.&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project and each of them are explained in detail below. &lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                   &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
                          :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                      &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
                             :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 or Teaching Assistant 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 created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor or Teaching Assistant''', 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases mainly involve controller testing to check the '''assignment created by TA''' and it '''can be deleted by instructor''' through invocation of the '''''delete''''' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121149</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121149"/>
		<updated>2018-12-07T15:43:27Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignemtns are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were various issues related to saving data in these. The main motive behind this project is to fix these issues and maintain data integrity.&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project and each of them are explained in detail below. &lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                      &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
                             :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 or Teaching Assistant 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 created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor or Teaching Assistant''', 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases mainly involve controller testing to check the '''assignment created by TA''' and it '''can be deleted by instructor''' through invocation of the '''''delete''''' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121148</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121148"/>
		<updated>2018-12-07T15:42:31Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignemtns are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were various issues related to saving data in these. The main motive behind this project is to fix these issues and maintain data integrity.&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project and each of them are explained in detail below. &lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
                      &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; &lt;br /&gt;
                             params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 or Teaching Assistant 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 created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor or Teaching Assistant''', 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases mainly involve controller testing to check the '''assignment created by TA''' and it '''can be deleted by instructor''' through invocation of the '''''delete''''' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121147</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=121147"/>
		<updated>2018-12-07T15:40:38Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Assignment creation can be done in Expertiza by an instructor or a TA for a particular course. It is available from the '''Manage -&amp;gt; Assignments''' drop down on the expertiza site. Two types of assignments can be created - private and public. The various properties of assignemtns are grouped into tabs - General, Topics, Rubrics, Review strategy, Due dates and Other stuff. There were various issues related to saving data in these. The main motive behind this project is to fix these issues and maintain data integrity.&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project and each of them are explained in detail below. &lt;br /&gt;
&lt;br /&gt;
==Issue #1008 - Issue related to staggered deadline==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? &amp;amp;&amp;amp; (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1017 - Issue related to deleting assignment==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA. When an assignment is created by the instructor or by the TA , the delete option is assigned to self, that is, to the one who created the assignment. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
The flow diagram given below specifies the sequence of events that will aim at resolving the issue related to deleting an assignment :&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 or Teaching Assistant 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 created by the '''TA'''.  &lt;br /&gt;
# If Logged in as '''Instructor or Teaching Assistant''', 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases mainly involve controller testing to check the '''assignment created by TA''' and it '''can be deleted by instructor''' through invocation of the '''''delete''''' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1065 - Issue related to rubrics when an assignment is copied==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #1072 - Issue related to instructor's assignment participation==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;br /&gt;
&lt;br /&gt;
==Issue #308 - Issue related to questionnaire weight==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
===Proposed Solution===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
# [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Video Link]&lt;br /&gt;
&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Pull Request]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120634</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120634"/>
		<updated>2018-11-21T02:50:27Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120631</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120631"/>
		<updated>2018-11-21T02:48:53Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                '''(@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))''')%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120628</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120628"/>
		<updated>2018-11-21T02:47:27Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                '''(@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))''')%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120626</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120626"/>
		<updated>2018-11-21T02:45:40Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                {{Font color||green|(@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))}})%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120620</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120620"/>
		<updated>2018-11-21T02:42:43Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                &amp;lt;span style=background:lightgreen&amp;gt;(@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120619</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120619"/>
		<updated>2018-11-21T02:40:06Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                &amp;lt;span style=background:lightgreen&amp;gt;(@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))&amp;lt;/span&amp;gt;)%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120618</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120618"/>
		<updated>2018-11-21T02:38:12Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test cases would involve setting the topic submission deadline to a date later than the the signup deadline testing the view actions.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120614</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120614"/>
		<updated>2018-11-21T02:35:07Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120613</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120613"/>
		<updated>2018-11-21T02:34:10Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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'''. '''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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120610</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=120610"/>
		<updated>2018-11-21T02:32:54Z</updated>

		<summary type="html">&lt;p&gt;Asony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
At present, when the TA creates a new assignment, only he has the ability to delete it. The task at hand is to allow the instructor to delete the assignment that is created by a TA.&lt;br /&gt;
&lt;br /&gt;
When an assignment is created by a participant, it assigns the delete option to self. This needs to be overridden in that the instructor must be able to view the assignment list by having an additional parameter to classify the creator of that assignment as Teaching Assistant or Instructor, and giving the Instructor the option to delete an assignment created by TA.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
The Issue is that the Instructor is not able to participate in a given assignment. This issues require a fix so that the instructor can also add himself as a participant in the assignment created .This fix will allow the instructor to perform the same functionality as the other student participants  as reviewing peer assignments , submitting assignment, etc.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
This can be understood through the flow diagram provided below:&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1017.png]]&lt;br /&gt;
&lt;br /&gt;
The fix to resolve the issue involves the delete function in the assignment controller. The code at present checks for the current user and allows it the permission to delete the file. &lt;br /&gt;
&lt;br /&gt;
  if id != @assignment_form.assignment.instructor_id&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To allow instructor to delete an assignment created by TA, the if-else block is fixed as given: &lt;br /&gt;
&lt;br /&gt;
  if id == @assignment_form.assignment.instructor_id or (@user.role == &amp;quot;Instructor&amp;quot; and @assignment_form.assignment.instructor.name.role == &amp;quot;ta&amp;quot;)&lt;br /&gt;
    # allow instructor to delete assignment&lt;br /&gt;
    @assignment_form.delete(params[:force])&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Assignment #{@assignment_form.assignment.id} was deleted.&amp;quot;, request)&lt;br /&gt;
    flash[:success] = &amp;quot;The assignment was successfully deleted.&amp;quot;&lt;br /&gt;
  else&lt;br /&gt;
    #  throw error&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;You are not authorized to delete this assignment.&amp;quot;, request)&lt;br /&gt;
    raise &amp;quot;You are not authorized to delete this assignment.&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Modifications made to the code check for the form id and allow permission to delete when the id belongs to assignment creator or when the role of the current user is 'Instructor'.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
When an assignment is copied, all the rubric data is to be copied over. As the copying over was incomplete, there were issues. This is fixed in the '''copy_assignment_questionnaire''' method of '''assignment_form.rb''' file.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
The current code is shown below. We can see that the data (columns) related to the various rounds are not copied over. This needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the fix, the code looks like below. The columns related to the various rounds will be copied over from now on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
def self.copy_assignment_questionnaire(old_assign, new_assign, user)&lt;br /&gt;
  old_assign.assignment_questionnaires.each do |aq|&lt;br /&gt;
    AssignmentQuestionnaire.create(&lt;br /&gt;
      assignment_id: new_assign.id,&lt;br /&gt;
      questionnaire_id: aq.questionnaire_id,&lt;br /&gt;
      user_id: user.id,&lt;br /&gt;
      notification_limit: aq.notification_limit,&lt;br /&gt;
      questionnaire_weight: aq.questionnaire_weight,&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;used_in_round: aq.used_in_round,&amp;lt;/span&amp;gt;&lt;br /&gt;
      &amp;lt;span style=background:lightgreen&amp;gt;dropdown: aq.dropdown&amp;lt;/span&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
When the instructor is logged in he can create a new assignment or use an existing assignment . All the assignments that are created would require participants which happens to be the responsibility of the instructor . Thus the Instructor adds the participants to the assignment and with this fix the instructor will be added as a participant by default every time a new assignment is created.The new functionality in the assignment controller will be modified to resolve the issue. &lt;br /&gt;
&lt;br /&gt;
[[File:Issues1072.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
A new validation method '''validate_assignment_questionnaires_weights''' called in the '''update_assignment_questionnaires''' method of '''assignment_form.rb''' would do the checking:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;lt;!----&amp;gt;&amp;gt;&lt;br /&gt;
  # code to save assignment questionnaires&lt;br /&gt;
  def update_assignment_questionnaires(attributes)&lt;br /&gt;
    return false unless attributes&lt;br /&gt;
    &amp;lt;span style=background:lightgreen&amp;gt;validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
    @errors = @assignment.errors&lt;br /&gt;
    unless @has_errors&lt;br /&gt;
      existing_aqs = AssignmentQuestionnaire.where(assignment_id: @assignment.id)&lt;br /&gt;
      existing_aqs.each(&amp;amp;:delete)&lt;br /&gt;
      attributes.each do |assignment_questionnaire|&lt;br /&gt;
        if assignment_questionnaire[:id].nil? or assignment_questionnaire[:id].blank?&lt;br /&gt;
          aq = AssignmentQuestionnaire.new(assignment_questionnaire)&lt;br /&gt;
          unless aq.save&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        else&lt;br /&gt;
          aq = AssignmentQuestionnaire.find(assignment_questionnaire[:id])&lt;br /&gt;
          unless aq.update_attributes(assignment_questionnaire)&lt;br /&gt;
            @errors = @assignment.errors.to_s&lt;br /&gt;
            @has_errors = true&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;# checks to see if the sum of weights of all rubrics add up to either 0 or 100%&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;def validate_assignment_questionnaires_weights(attributes)&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  total_weight=0&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  attributes.each do |assignment_questionnaire|&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    total_weight+=assignment_questionnaire[:questionnaire_weight].to_i&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  if total_weight != 0 and total_weight != 100&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @assignment.errors.add(:message,'Total weight of rubrics should add up to either 0 or 100%')&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;    @has_errors = true&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;  end&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span style=background:lightgreen&amp;gt;end&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Following are the test plans for the individual issues:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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 &amp;quot;New Public Assignment&amp;quot;&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'''. '''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 resolved.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Task Description:''' Teaching Assistant creating an assignment&lt;br /&gt;
&lt;br /&gt;
'''Precondition:''' Has the instructor 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 or Teaching Assistant 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 created by the TA.  &lt;br /&gt;
# If Logged in as Instructor or Teaching Assistant, the assignment gets deleted for that action.&lt;br /&gt;
# Else, the current participant cannot execute the option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It involves controller testing to see if the assignment created by the TA can be deleted by instructor through the invocation of the ''delete'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab to see if there are multiple rubrics defined&lt;br /&gt;
# Copy the assignment, if there are multiple rubrics, from the assignments listing screen&lt;br /&gt;
# Access the newly copied assignment&lt;br /&gt;
# Check if the rubrics tab lists down rubrics for all rounds in the original assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the rubrics are copied entirely after the invocation of the ''copy_assignment_questionnaire'' method.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&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;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would involve the controller and view testing to see if the instructor is added to the assignment as a participant through the add and list methods that are being invoked with the participant list showing instructor as the participant.&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Manual Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza as instructor&lt;br /&gt;
# Access the Assignments listing&lt;br /&gt;
# Access an assignment and go to the 'Rubrics' tab&lt;br /&gt;
# Modify the data in the rubric weights column in such a way that it adds up to a value other than 0 or 100&lt;br /&gt;
# Click save&lt;br /&gt;
# Check to see if there is an error thrown and the rubrics tab is not saved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automated Testing&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mainly involve controller testing to see if the notice is set correctly when the ''update_assignment_questionnaires'' method is invoked with the sum of weights not being 0 or 100.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [https://piazza.com/class/jl1cgvwxl0f1nl?cid=539 Template Designs]&lt;br /&gt;
&lt;br /&gt;
2. [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Past Wiki Docs]&lt;br /&gt;
&lt;br /&gt;
3. [https://github.com/TAG1214/expertiza GitHub Repo]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=119717</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=119717"/>
		<updated>2018-11-13T19:19:31Z</updated>

		<summary type="html">&lt;p&gt;Asony: /* Issue #1008 - Issue related to staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up',&lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', &lt;br /&gt;
               :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=119716</id>
		<title>E1863 Issues related to assignment creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1863_Issues_related_to_assignment_creation&amp;diff=119716"/>
		<updated>2018-11-13T19:18:07Z</updated>

		<summary type="html">&lt;p&gt;Asony: /* Issue #1008 - Issue related to staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An instructor or TA can create assignments within a course. There are a lot of configurations that can be made while creating these assignments and there are a few known issues related to this. &lt;br /&gt;
&lt;br /&gt;
== Problem statement ==&lt;br /&gt;
&lt;br /&gt;
There are 5 issues that are being dealt with in this project:&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
If there are multiple topics added in an staggered-deadlined assignment and if the deadline of those topics are in future, students are not able to sign up for any of them. Overall assignment due dates are taking precedence, on the Due Dates tab. Due dates for the assignment needs to be changed manually to the due dates for the new topics just added. Students are able to sign up for topics only when all of the assignment due dates are in the future AND the due date for the topic they are choosing is in the future. They should be able to sign up if only the due date for the topic they are choosing is in the future. The overall assignment due dates should be irrelevant. In other words, topic should obey just the topic deadlines and not the assignment deadlines.&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
&lt;br /&gt;
There are assignments that have rubrics that vary by round, i.e. each round of the assignment review will have a different set of rubrics. When such an assignment is copied, there exists a problem where the rubrics from the original assignment are not copied over properly to the new assignment. This new assignment does not have rubrics that vary by round, as in the original assignment, but have the rubric from Round 1 in the original assignment copied over for all rounds. This makes the copying of assignments incomplete and thus, needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
While creating/editing an assignment, one of the configurations is setting up of the rubrics. This is done in the 'Rubrics' tab of the assignment page. While setting up the rubrics, we can assign a weight to each of it, so that the final score will be the weighted sum of the different rubric scores. The default weight of a rubric is always 0%, meaning that it's not counted towards the final score. But if any of the rubric is assigned with a non-zero weight, we need to make sure that the sum of all the weights of the various rubrics add up to 100%. This is not enforced currently, allowing the user to have a total weight which is between 0% and 100%. This needs to be fixed to bring in a hard stop, if the sum of the weights don't add up to 0% or 100%.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
===Issue #1008 - Issue related to staggered deadline===&lt;br /&gt;
&lt;br /&gt;
For staggered deadline assignments, different topics might have different deadlines. So, the deadline for each topic needs to be checked on an individual basis. Deadlines for individual topics are stored in a table called '''due_dates''' with the '''parent_id''' as the identifier of the particular topic in place of the assignment identifier. A logic for getting the due dates of individual topics for staggered deadline assignments is found in the method '''check_topic_due_date_value''' in the module '''SignUpSheetHelper'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id, deadline_type_id: deadline_type_id, round:review_round).first rescue nil&lt;br /&gt;
if !topic_due_date.nil?&lt;br /&gt;
   due_date = topic_due_date.due_at&lt;br /&gt;
else&lt;br /&gt;
   due_date = assignment_due_dates[review_round - 1].due_at.to_s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, if the signup deadline of the the '''assignment''' is earlier that the '''submission deadline for a topic''', that topic is not available for taking. This is restricted by the following piece of code in '''_all_actions.html.erb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif (@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
              (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id))) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; &lt;br /&gt;
              params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fix to be implemented(tentative): &lt;br /&gt;
Change the above piece of code to allow signing up staggered assignment topics bases on the topic deadline and not on the assignment sign up deadline. The prospective change is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% elsif ((@signup_topic_deadline.nil? || (Time.now &amp;lt; @signup_topic_deadline.due_at)) &amp;amp;&amp;amp;&lt;br /&gt;
                (!@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))) ||&lt;br /&gt;
                (@assignment.staggered_deadline? || (Time.now &amp;lt; get_topic_deadline([@assignment.due_dates.find_by(deadline_type_id: 1)], topic.id)))%&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= link_to image_tag('Check-icon.png', :border =&amp;gt; 0, :title =&amp;gt; 'Signup', :align =&amp;gt; 'middle'), :controller=&amp;gt;'sign_up_sheet', :action=&amp;gt; 'sign_up', :id=&amp;gt;params[:id],:topic_id =&amp;gt; topic.id, :assignment_id =&amp;gt; &lt;br /&gt;
               params[:assignment_id] %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue #1017 - Issue related to deleting assignment===&lt;br /&gt;
&lt;br /&gt;
===Issue #1065 - Issue related to rubrics when an assignment is copied===&lt;br /&gt;
[[File:Issue1065flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
===Issue #1072 - Issue related to instructor's assignment participation===&lt;br /&gt;
&lt;br /&gt;
===Issue #308 - Issue related to questionnaire weight===&lt;br /&gt;
&lt;br /&gt;
When we save a new/existing assignment, we need to bring in a check to see if the sum of the weights of the various rubrics add up to 0 or 100%. If this check fails, we need to throw a notice that says, &amp;quot;Sum of weights of rubrics need to be 0 or 100%.&amp;quot;. The user has to make the corresponding modification to the weights and try again. If the check succeeds, we continue with the assignment saving process.&lt;br /&gt;
&lt;br /&gt;
[[File:Issue308Flowchart.png]]&lt;/div&gt;</summary>
		<author><name>Asony</name></author>
	</entry>
</feed>