<?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=Amandli</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=Amandli"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Amandli"/>
	<updated>2026-05-13T06:10:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128636</id>
		<title>CSC/ECE 517 Fall 2019 - E1984. Improve self-review Link peer review &amp; self-review to derive grades</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128636"/>
		<updated>2019-11-11T19:35:05Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades==&lt;br /&gt;
&lt;br /&gt;
This page provides a description of the Expertiza based Semester project. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. The Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Team and Resources===&lt;br /&gt;
&lt;br /&gt;
* Team Members: Amit Mandliya, Ankit Manendra, Bharat Sinha, Daniel Mendez Lozada&lt;br /&gt;
&lt;br /&gt;
===Problem Statement and Overview===&lt;br /&gt;
&lt;br /&gt;
The Expertiza allows Instructors to create assignments with allowing self-review option to Students. Each member has to evaluate their submission with the same criteria as the peer review. Currently these scores are not used at all in the final scores for the submsission. The task here is to improve the self-review system pertaining to give it a weightage in the final scores for the submissions. Some of the objectives we try to achieve for this project are as follows –&lt;br /&gt;
    &lt;br /&gt;
*Provide a formula that takes both the peer review score and self-review score into account for calculating the composite score.&lt;br /&gt;
*The composite score should get higher as the self-review score gets closer to the peer review score.&lt;br /&gt;
*Make sure that the peer review scores are not visible before the self-review submission.&lt;br /&gt;
*Display the composite score on the “View Scores” page.&lt;br /&gt;
*Display the self-review scores in the &amp;quot;View Scores&amp;quot; and heat map of peer-reviews, showing that they are a different type of review.&lt;br /&gt;
&lt;br /&gt;
The need for the self-review section is to know how well the students can judge their work and understand how to evaluate their flaws and rectify them. Also, if they can score themselves close to their peers, then it means that they have good self-assessment skills and they are being honest about what they think of their work.&lt;br /&gt;
&lt;br /&gt;
===Code Changes Flow===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:E1926_code_flow.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Previous Process===&lt;br /&gt;
&lt;br /&gt;
Previously, Expertiza allowed students to submit an assignment and provides a link for self-review. Once the self-reviewing was done, the submitted score gets stored in the database but was not used in calculating the overall score of the assignment for the student. Because of this, students can score themselves higher than what they should get. This helps students in no way. So, to make productive use of this score and to help students learn self-evaluating, we have made some changes in the review score calculation which is explained in the section below.&lt;br /&gt;
&lt;br /&gt;
===New Process===&lt;br /&gt;
&lt;br /&gt;
We are trying to derive a new formula that takes into account the self-review score and calculates a composite score, which will be the student's final score:&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/19jp7UdLCTdMhLiqsBR_ArU7gIpxYfkx_/view?usp=sharing Notes for deriving the formula]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
Test cases are as follows:&lt;br /&gt;
* Peer-reviews cannot be viewed before a self-review is completed.&lt;br /&gt;
* Peer-reviews can be viewed immediately when self-reviews are not required.&lt;br /&gt;
* The derived scores can be saved to the database.&lt;br /&gt;
* Self-review scores are displayed with peer-review scores&lt;br /&gt;
* Student can only see their own self-review&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128635</id>
		<title>CSC/ECE 517 Fall 2019 - E1984. Improve self-review Link peer review &amp; self-review to derive grades</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128635"/>
		<updated>2019-11-11T19:34:22Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* New Process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades==&lt;br /&gt;
&lt;br /&gt;
This page provides a description of the Expertiza based Semester project. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. The Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Team and Resources===&lt;br /&gt;
&lt;br /&gt;
* Team Members: Amit Mandliya, Ankit Manendra, Bharat Sinha, Daniel Mendez Lozada&lt;br /&gt;
&lt;br /&gt;
===Problem Statement and Overview===&lt;br /&gt;
&lt;br /&gt;
The Expertiza allows Instructors to create assignments with allowing self-review option to Students. Each member has to evaluate their submission with the same criteria as the peer review. Currently these scores are not used at all in the final scores for the submsission. The task here is to improve the self-review system pertaining to give it a weightage in the final scores for the submissions. Some of the objectives we try to achieve for this project are as follows –&lt;br /&gt;
    &lt;br /&gt;
*Provide a formula that takes both the peer review score and self-review score into account for calculating the composite score.&lt;br /&gt;
*The composite score should get higher as the self-review score gets closer to the peer review score.&lt;br /&gt;
*Make sure that the peer review scores are not visible before the self-review submission.&lt;br /&gt;
*Display the composite score on the “View Scores” page.&lt;br /&gt;
*Display the self-review scores in the &amp;quot;View Scores&amp;quot; and heat map of peer-reviews, showing that they are a different type of review.&lt;br /&gt;
&lt;br /&gt;
The need for the self-review section is to know how well the students can judge their work and understand how to evaluate their flaws and rectify them. Also, if they can score themselves close to their peers, then it means that they have good self-assessment skills and they are being honest about what they think of their work.&lt;br /&gt;
&lt;br /&gt;
===Code Changes Flow===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:E1926_code_flow.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Previous Process===&lt;br /&gt;
&lt;br /&gt;
Previously, Expertiza allowed students to submit an assignment and provides a link for self-review. Once the self-reviewing was done, the submitted score gets stored in the database but was not used in calculating the overall score of the assignment for the student. Because of this, students can score themselves higher than what they should get. This helps students in no way. So, to make productive use of this score and to help students learn self-evaluating, we have made some changes in the review score calculation which is explained in the section below.&lt;br /&gt;
&lt;br /&gt;
===New Process===&lt;br /&gt;
&lt;br /&gt;
We are trying to derive a new formula that takes into account the self-review score and calculates a composite score, which will be the student's final score:&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/19jp7UdLCTdMhLiqsBR_ArU7gIpxYfkx_/view?usp=sharing Notes for deriving the formula]&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128634</id>
		<title>CSC/ECE 517 Fall 2019 - E1984. Improve self-review Link peer review &amp; self-review to derive grades</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128634"/>
		<updated>2019-11-11T19:31:30Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades==&lt;br /&gt;
&lt;br /&gt;
This page provides a description of the Expertiza based Semester project. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. The Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Team and Resources===&lt;br /&gt;
&lt;br /&gt;
* Team Members: Amit Mandliya, Ankit Manendra, Bharat Sinha, Daniel Mendez Lozada&lt;br /&gt;
&lt;br /&gt;
===Problem Statement and Overview===&lt;br /&gt;
&lt;br /&gt;
The Expertiza allows Instructors to create assignments with allowing self-review option to Students. Each member has to evaluate their submission with the same criteria as the peer review. Currently these scores are not used at all in the final scores for the submsission. The task here is to improve the self-review system pertaining to give it a weightage in the final scores for the submissions. Some of the objectives we try to achieve for this project are as follows –&lt;br /&gt;
    &lt;br /&gt;
*Provide a formula that takes both the peer review score and self-review score into account for calculating the composite score.&lt;br /&gt;
*The composite score should get higher as the self-review score gets closer to the peer review score.&lt;br /&gt;
*Make sure that the peer review scores are not visible before the self-review submission.&lt;br /&gt;
*Display the composite score on the “View Scores” page.&lt;br /&gt;
*Display the self-review scores in the &amp;quot;View Scores&amp;quot; and heat map of peer-reviews, showing that they are a different type of review.&lt;br /&gt;
&lt;br /&gt;
The need for the self-review section is to know how well the students can judge their work and understand how to evaluate their flaws and rectify them. Also, if they can score themselves close to their peers, then it means that they have good self-assessment skills and they are being honest about what they think of their work.&lt;br /&gt;
&lt;br /&gt;
===Code Changes Flow===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:E1926_code_flow.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Previous Process===&lt;br /&gt;
&lt;br /&gt;
Previously, Expertiza allowed students to submit an assignment and provides a link for self-review. Once the self-reviewing was done, the submitted score gets stored in the database but was not used in calculating the overall score of the assignment for the student. Because of this, students can score themselves higher than what they should get. This helps students in no way. So, to make productive use of this score and to help students learn self-evaluating, we have made some changes in the review score calculation which is explained in the section below.&lt;br /&gt;
&lt;br /&gt;
===New Process===&lt;br /&gt;
&lt;br /&gt;
We are trying to derive a new formula that takes into account the self-review score and calculates a composite score, which will be the student's final score:&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/1yF8A-g3p4NZpXaXReHUhavl2tsnH5KZQ/view?usp=sharing Notes fro deriving the formula]&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128177</id>
		<title>CSC/ECE 517 Fall 2019 - E1984. Improve self-review Link peer review &amp; self-review to derive grades</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128177"/>
		<updated>2019-11-10T20:30:55Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades==&lt;br /&gt;
&lt;br /&gt;
This page provides a description of the Expertiza based Semester project. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. The Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Team and Resources===&lt;br /&gt;
&lt;br /&gt;
* Team Members: Amit Mandliya, Ankit Manendra, Bharat Sinha, Daniel Mendez Lozada&lt;br /&gt;
&lt;br /&gt;
===Problem Statement and Overview===&lt;br /&gt;
&lt;br /&gt;
The Expertiza allows Instructors to create assignments with allowing self-review option to Students. Each member has to evaluate their submission with the same criteria as the peer review. Currently these scores are not used at all in the final scores for the submsission. The task here is to improve the self-review system pertaining to give it a weightage in the final scores for the submissions. Some of the objectives we try to achieve for this project are as follows –&lt;br /&gt;
    &lt;br /&gt;
*Provide a formula that takes both the peer review score and self-review score into account for calculating the composite score.&lt;br /&gt;
*The composite score should get higher as the self-review score gets closer to the peer review score.&lt;br /&gt;
*Make sure that the peer review scores are not visible before the self-review submission.&lt;br /&gt;
*Display the composite score on the “View Scores” page.&lt;br /&gt;
*Display the self-review scores in the &amp;quot;View Scores&amp;quot; and heat map of peer-reviews, showing that they are a different type of review.&lt;br /&gt;
&lt;br /&gt;
The need for the self-review section is to know how well the students can judge their work and understand how to evaluate their flaws and rectify them. Also, if they can score themselves close to their peers, then it means that they have good self-assessment skills and they are being honest about what they think of their work.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128174</id>
		<title>CSC/ECE 517 Fall 2019 - E1984. Improve self-review Link peer review &amp; self-review to derive grades</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1984._Improve_self-review_Link_peer_review_%26_self-review_to_derive_grades&amp;diff=128174"/>
		<updated>2019-11-10T20:29:48Z</updated>

		<summary type="html">&lt;p&gt;Amandli: Created page with &amp;quot;==E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades==  This page provides a description of the Expertiza based Semester project.   __TOC__   ===About Ex...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades==&lt;br /&gt;
&lt;br /&gt;
This page provides a description of the Expertiza based Semester project. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. The Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Team and Resources===&lt;br /&gt;
&lt;br /&gt;
* Team Members: Amit Mandliya, Ankit Manendra, Bharat Sinha, Daniel Mendez Lozada&lt;br /&gt;
&lt;br /&gt;
===Problem Statement and Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Expertiza allows Instructors to create assignments with allowing self-review option to Students. Each member has to evaluate their submission with the same criteria as the peer review. Currently these scores are not used at all in the final scores for the submsission. The task here is to improve the self-review system pertaining to give it a weightage in the final scores for the submissions. Some of the objectives we try to achieve for this project are as follows –&lt;br /&gt;
    &lt;br /&gt;
*Provide a formula that takes both the peer review score and self-review score into account for calculating the composite score.&lt;br /&gt;
*The composite score should get higher as the self-review score gets closer to the peer review score.&lt;br /&gt;
*Make sure that the peer review scores are not visible before the self-review submission.&lt;br /&gt;
*Display the composite score on the “View Scores” page.&lt;br /&gt;
*Display the self-review scores in the &amp;quot;View Scores&amp;quot; and heat map of peer-reviews, showing that they are a different type of review.&lt;br /&gt;
&lt;br /&gt;
The need for the self-review section is to know how well the students can judge their work and understand how to evaluate their flaws and rectify them. Also, if they can score themselves close to their peers, then it means that they have good self-assessment skills and they are being honest about what they think of their work.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=128145</id>
		<title>CSC/ECE 517 Fall 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=128145"/>
		<updated>2019-11-10T19:22:28Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CSC/ECE 517 Fall 2019 - Project E1947. Refactor quiz_questionnaire_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - Project E1943. Refactor sign up sheet controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1972. OSS project J. Skellington: Accessing Assignment Rubrics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1961. Email notification to reviewers and instructors]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1971. OSS project Finklestein: Instructors &amp;amp; Institutions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1953. Tagging report for student]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1955.Write  unit tests for student_task.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1948. Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1959. Intelligent copying of assignments without topics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1968. Fixes for adding members to teams]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1969. Fixes for reviews not being available]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1957. Time travel Not Allowed..!!! Restrict TAs’ ability to change their own grade + limit file-size upload]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1941. Issues related to topic deadlines]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1966. Tabbed_reviews partial file refactor for displaying the alternate view of reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1962. Email notification upon account creation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1967. Fix glitches in author feedback]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1960. Create new late policy successfully and fixing &amp;quot;Back&amp;quot; link]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1939. OSS Project Juniper: Bookmark enhancements]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1938. OSS project Duke Blue: Fix import glitches]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1940. Improving email notification]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1956. There is no shortcut to get free review points: Review Assignment Bug]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1942. Refactor stage deadlines in assignment.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1952. Missing DOM features project]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1945. Refactor users_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1964. Export review scores for projects]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1949. Write Unit Tests for Importing assignment participants and import glitches]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1944. Refactor review mapping controller]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1946. Refactor Questionnaire controller]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1982. Regulate changing of rubrics while projects are in progress]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1989. Track the time students look at other submissions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1995. Tests for email functionality]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1993 Track Time Between Successive Tag Assignments]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1995. Weights in grade calculation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1980. Sort instructor reports by name, ID, score, etc.]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades]]&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126624</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126624"/>
		<updated>2019-10-29T05:05:03Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Submitted Work and Demonstration of the Project ==&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [http://152.46.19.163:8080 Link to deployed code on NCSU VCL]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://https://drive.google.com/open?id=1Xcr7tfVQU9xFmeEcR3iuIWUzuzjVsUNK Link to Video of RSpec tests of the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in Project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor (Username - instructor6, Password - password). Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment directory already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126612</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126612"/>
		<updated>2019-10-29T04:39:32Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Submitted Work and Demonstration of the Project ==&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [http://152.46.19.163:8080 Link to deployed code on NCSU VCL]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://https://drive.google.com/open?id=1Xcr7tfVQU9xFmeEcR3iuIWUzuzjVsUNK Link to Video of RSpec tests of the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in Project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment directory already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126393</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126393"/>
		<updated>2019-10-29T02:29:25Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* Files modified in current project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Submitted Work and Demonstration of the Project ==&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://https://drive.google.com/open?id=1Xcr7tfVQU9xFmeEcR3iuIWUzuzjVsUNK Link to Video of RSpec tests of the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in Project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment directory already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126391</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126391"/>
		<updated>2019-10-29T02:29:06Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Submitted Work and Demonstration of the Project ==&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://https://drive.google.com/open?id=1Xcr7tfVQU9xFmeEcR3iuIWUzuzjVsUNK Link to Video of RSpec tests of the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment directory already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126390</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126390"/>
		<updated>2019-10-29T02:28:23Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://https://drive.google.com/open?id=1Xcr7tfVQU9xFmeEcR3iuIWUzuzjVsUNK Link to Video of RSpec tests of the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment directory already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126386</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126386"/>
		<updated>2019-10-29T02:25:22Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment directory already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126383</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126383"/>
		<updated>2019-10-29T02:24:40Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Assignment_directory_already_exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_directory_already_exists.JPG&amp;diff=126382</id>
		<title>File:Assignment directory already exists.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_directory_already_exists.JPG&amp;diff=126382"/>
		<updated>2019-10-29T02:24:19Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126381</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126381"/>
		<updated>2019-10-29T02:21:43Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* List of changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
    $(&amp;quot;#name_field&amp;quot;).change(function() {&lt;br /&gt;
        filename = $( &amp;quot;#name_field&amp;quot; ).val().replace(/ /g,&amp;quot;_&amp;quot;).replace(/[/\\?%*:|&amp;quot;&amp;lt;&amp;gt;/$&amp;amp;!#%^@]/g, '');;&lt;br /&gt;
        $('#directory_field').val(filename);&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126380</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126380"/>
		<updated>2019-10-29T02:19:44Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* List of changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        flash.now[:error] = &amp;quot;This assignment/directory already exists in the selected course. Kindly rename.&amp;quot;&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126378</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126378"/>
		<updated>2019-10-29T02:08:59Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1:''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2:''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3:''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4:''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5:''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126375</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126375"/>
		<updated>2019-10-29T02:05:46Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://drive.google.com/open?id=1O81Er0QrVceDiVhHVlC57BDToVFuIgDN Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126365</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126365"/>
		<updated>2019-10-29T01:55:19Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1575 Link to Pull Request related to the change]&lt;br /&gt;
* [https://a.com Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126362</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126362"/>
		<updated>2019-10-29T01:53:58Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to Github Repository of expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to Github Repository of including changes related to E1954]&lt;br /&gt;
* [https://a.com Link to Pull Request related to the change]&lt;br /&gt;
* [https://a.com Link to Video showing the demonstration of the project]&lt;br /&gt;
* [http://a.com Link to Video of testing the changes]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126358</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126358"/>
		<updated>2019-10-29T01:51:31Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/anujak30/expertiza-1 Link to changes E1954]&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126347</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126347"/>
		<updated>2019-10-29T01:46:36Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Information ==&lt;br /&gt;
1) Amit Mandliya (amandli)&lt;br /&gt;
&lt;br /&gt;
2) Anuja Kulkarni (apkulka2)&lt;br /&gt;
&lt;br /&gt;
3) Samruddhi Khandale (sskhanda)&lt;br /&gt;
&lt;br /&gt;
Mentor : Akanksha Mohan&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126339</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126339"/>
		<updated>2019-10-29T01:44:38Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126334</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126334"/>
		<updated>2019-10-29T01:44:02Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 3''' Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 4''' Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 5''' Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Assignment already exists.JPG]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory exists.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Directory_exists.JPG&amp;diff=126331</id>
		<title>File:Directory exists.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Directory_exists.JPG&amp;diff=126331"/>
		<updated>2019-10-29T01:43:40Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_already_exists.JPG&amp;diff=126330</id>
		<title>File:Assignment already exists.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_already_exists.JPG&amp;diff=126330"/>
		<updated>2019-10-29T01:43:14Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126327</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126327"/>
		<updated>2019-10-29T01:41:12Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG|200px]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126324</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126324"/>
		<updated>2019-10-29T01:40:46Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG]] &amp;lt;br&amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126323</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126323"/>
		<updated>2019-10-29T01:40:16Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test assignment&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rubrics.JPG] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Review.JPG] &amp;lt;br&amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Rubrics.JPG&amp;diff=126321</id>
		<title>File:Rubrics.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Rubrics.JPG&amp;diff=126321"/>
		<updated>2019-10-29T01:39:41Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review.JPG&amp;diff=126315</id>
		<title>File:Review.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review.JPG&amp;diff=126315"/>
		<updated>2019-10-29T01:37:47Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126308</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126308"/>
		<updated>2019-10-29T01:36:14Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]]&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126307</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126307"/>
		<updated>2019-10-29T01:35:47Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG  height=&amp;quot;42&amp;quot; width=&amp;quot;42&amp;quot;]]  &amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]]&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126304</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126304"/>
		<updated>2019-10-29T01:35:01Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Directory_name_autopopulate.JPG]]&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126302</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126302"/>
		<updated>2019-10-29T01:34:11Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]  &amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 2''' Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
[[Directory_name_autopopulate.JPG]]&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Directory_name_autopopulate.JPG&amp;diff=126301</id>
		<title>File:Directory name autopopulate.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Directory_name_autopopulate.JPG&amp;diff=126301"/>
		<updated>2019-10-29T01:33:53Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126298</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126298"/>
		<updated>2019-10-29T01:32:36Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG|500px]]  &amp;lt;br&amp;gt;&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126295</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126295"/>
		<updated>2019-10-29T01:31:55Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
'''Step 1''' Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Login as instructor.JPG]]&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Login_as_instructor.JPG&amp;diff=126292</id>
		<title>File:Login as instructor.JPG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Login_as_instructor.JPG&amp;diff=126292"/>
		<updated>2019-10-29T01:29:18Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126279</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126279"/>
		<updated>2019-10-29T01:17:47Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126278</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126278"/>
		<updated>2019-10-29T01:17:32Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[File:Login_Page.png]&lt;br /&gt;
[[File: Login_Page.png|200px]]&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126277</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126277"/>
		<updated>2019-10-29T01:17:15Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[File:Login_Page.png]&lt;br /&gt;
[[File: Login_Page.png|200px|left|alt text]]&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126276</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126276"/>
		<updated>2019-10-29T01:16:57Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[File:Login_Page.png]&lt;br /&gt;
[[File: Login_Page.png|200px|thumb|left|alt text]]&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126275</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126275"/>
		<updated>2019-10-29T01:16:24Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[File:Login_Page.png]&lt;br /&gt;
[[File: Login_Page.png|frame|center]]&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126270</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126270"/>
		<updated>2019-10-29T01:14:39Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[File:Login_Page.png]&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126251</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126251"/>
		<updated>2019-10-29T00:56:15Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126247</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126247"/>
		<updated>2019-10-29T00:52:24Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Login_Page.PNG|frame|center]]&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;/br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;/br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Login_Page.png&amp;diff=126242</id>
		<title>File:Login Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Login_Page.png&amp;diff=126242"/>
		<updated>2019-10-29T00:51:02Z</updated>

		<summary type="html">&lt;p&gt;Amandli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126238</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126238"/>
		<updated>2019-10-29T00:49:22Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;/br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;/br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126196</id>
		<title>CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1954._Auto-generate_submission_directory_names_based_on_assignment_names&amp;diff=126196"/>
		<updated>2019-10-29T00:25:35Z</updated>

		<summary type="html">&lt;p&gt;Amandli: /* Scope for future improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1954. Auto-generate submission directory names based on assignment names for Fall 2019, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open-source project developed on Ruby on Rails platform and its code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentsController and AssignmentsView - _general.html.erb. Here is the details description of the project: &amp;lt;br/&amp;gt;&lt;br /&gt;
The directory name is auto-generated from the assignment name. The instructor is allowed to edit &amp;lt;br/&amp;gt;&lt;br /&gt;
It is done by changing spaces in the names to underscores. E.g., the directory for Program 1 is by default &amp;quot;Program_1&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The special characters like '/','\','$' etc are to be removed from the auto-generated submission directory name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is added to prevent two assignments in the same course from having the same name. &amp;lt;br/&amp;gt;&lt;br /&gt;
A check is made to stop two assignments from sharing the same directory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A controller and a helper file were modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. AssignmentsController &amp;lt;br/&amp;gt;&lt;br /&gt;
2. AssignmentsView - _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsController ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps instructors create, modify, copy new assignments. Each assignment can be associated with specific Rubrics, Review Strategy and Due dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AssignmentsView - _general.html.erb ===&lt;br /&gt;
&lt;br /&gt;
This the View for creating the new assignments and editing the existing assignments. This view also handles specifications of Rubrics, Review Strategy and Dates.&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Created exist_assignment and exist_directory to check if the assignment name and directory name already exists in the current course. If any of those are already present then flash the respective error, else save the assignment. Here is the create method of controller -&amp;gt; assignments_controller.rb:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create&lt;br /&gt;
    @assignment_form = AssignmentForm.new(assignment_form_params)&lt;br /&gt;
    if params[:button]&lt;br /&gt;
      # Do not create an assignment if the assignment name or directory name already present in the course&lt;br /&gt;
      exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      exist_directory = Assignment.find_by(directory_path: assignment_form_params[:assignment][:directory_path], course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
      if !exist_assignment and !exist_directory&lt;br /&gt;
        if @assignment_form.save&lt;br /&gt;
          @assignment_form.create_assignment_node&lt;br /&gt;
          # Get the details of the assignment which is saved in current_assignment&lt;br /&gt;
          current_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)&lt;br /&gt;
          assignment_form_params[:assignment][:id] = current_assignment.id.to_s&lt;br /&gt;
          ques_array = assignment_form_params[:assignment_questionnaire]&lt;br /&gt;
          due_array = assignment_form_params[:due_date]&lt;br /&gt;
          ques_array.each do |cur_questionnaire|&lt;br /&gt;
            cur_questionnaire[:assignment_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          due_array.each do |cur_due|&lt;br /&gt;
            cur_due[:parent_id] = current_assignment.id.to_s&lt;br /&gt;
          end&lt;br /&gt;
          assignment_form_params[:assignment_questionnaire] = ques_array&lt;br /&gt;
          assignment_form_params[:due_date] = due_array&lt;br /&gt;
          @assignment_form.update(assignment_form_params, current_user)&lt;br /&gt;
          aid = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id).id&lt;br /&gt;
          ExpertizaLogger.info &amp;quot;Assignment created: #{@assignment_form.as_json}&amp;quot;&lt;br /&gt;
          redirect_to edit_assignment_path aid&lt;br /&gt;
          undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Failed to create assignment&amp;quot;&lt;br /&gt;
          render 'new'&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        if exist_assignment&lt;br /&gt;
          flash.now[:error] = &amp;quot;Assignment name already exists in the selected course. Kindly rename the assignment.&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          flash.now[:error] = &amp;quot;Directory name already exists in the selected course. Kindly rename the directory.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        render 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      render 'new'&lt;br /&gt;
      undo_link(&amp;quot;Assignment \&amp;quot;#{@assignment_form.assignment.name}\&amp;quot; has been created successfully. &amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI2: Auto-generate the Submission directory name based on the assignment name. Allow, the Submission Directory name field to be explicitly editable by the instructor. Here is the javascript function introduced in views -&amp;gt; assignments -&amp;gt; edit -&amp;gt; _general.html.erb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;div class=&amp;quot;form-inline&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= label_tag('assignment_form[assignment][directory_path]', 'Submission directory:') %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style='padding:5px'&amp;gt;&amp;lt;%= text_field_tag('assignment_form[assignment][directory_path]', @assignment_form.assignment.directory_path, required: true, &lt;br /&gt;
:id =&amp;gt; 'directory_field', :style =&amp;gt; 'width:250px', class: 'form-control') %&amp;gt; (Note: Directory name is auto-generated from Assignment Name. You can change it if you wish to.)&lt;br /&gt;
&amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='- DO NOT change this filed for an on-going assignment. This may cause lost of student submitted file.'&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WI3: Earlier the assignment was getting generated even if the instructor was not giving it any name or submission directory path, now both of these fields have been made mandatory. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
In the spec file for assignments controller, a check is made if the assignment which is getting created is of the name which already exists then the assignment should not be allowed to save.&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Following Steps needs to be performed to test the project from UI:-&amp;lt;/br&amp;gt;&lt;br /&gt;
1. Login as Instructor. Create an assignment under any of the existing courses with name as &amp;quot;test name&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Check if the Submission directory field is automatically getting populated based on the assignment name (replacing spaces with underscores and removing special characters).&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Fill in the details for Rubrics and Review Strategy. &amp;lt;/br&amp;gt;&lt;br /&gt;
4. Click on create. You should be able to see the assignment you created in the list. &amp;lt;/br&amp;gt;&lt;br /&gt;
5. Now, try to create another assignment with the same name in the same course. Also, try to change the submission directory name to any of the existing assignment or same the assignment created in Step 2, Check if the system flashes an error in the creation of this assignment. &amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
While working on this project, we identified an existing issue where if you try to edit the name of the already existing assignment to something which is the same as another existing asignment then the system breaks. This could be made another OSS topic to be worked on.&lt;/div&gt;</summary>
		<author><name>Amandli</name></author>
	</entry>
</feed>