<?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=Mliu9</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=Mliu9"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Mliu9"/>
	<updated>2026-08-23T11:07:04Z</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_2014/OSS_E1450_cxm&amp;diff=92062</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92062"/>
		<updated>2014-11-12T06:00:13Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “Rubric” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true', &amp;lt;br&amp;gt; @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
* Add Due Date Name and Description_url to the table, users can fill in blanks and store them in DB&lt;br /&gt;
* Rewrite set button function calling, everytime the button is pressed, it calls submit_form() and update in assignment_controller, then change the @assignment.rounds_of_review value in order to make changes in the DB instantly, which will help Rubrics tab display correctly&lt;br /&gt;
* Add a Change name and description url checkbox. If checked, the Due Date Name and Descripton_url will whow up; if unchecked, the two columns will hide.&lt;br /&gt;
* Everytime when webpage refreshes, the checkbox value will be set according to whether there’s value that is not empty in the deadline_name or description_url columns in due_dates table in DB.&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: An instructor can set the &amp;quot;Review Rubric Varies by Round&amp;quot; for an assignment, and set due dates for all of submissions and reviews, as well as different rubrics would be used&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student should see the review rubric for 1st round in the other's work link&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor change the due date to start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: A student should see the review rubric for 2nd round in the other's work link&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92061</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92061"/>
		<updated>2014-11-12T05:52:19Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Cucumber Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true', &amp;lt;br&amp;gt; @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
* Add Due Date Name and Description_url to the table, users can fill in blanks and store them in DB&lt;br /&gt;
* Rewrite set button function calling, everytime the button is pressed, it calls submit_form() and update in assignment_controller, then change the @assignment.rounds_of_review value in order to make changes in the DB instantly, which will help Rubrics tab display correctly&lt;br /&gt;
* Add a Change name and description url checkbox. If checked, the Due Date Name and Descripton_url will whow up; if unchecked, the two columns will hide.&lt;br /&gt;
* Everytime when webpage refreshes, the checkbox value will be set according to whether there’s value that is not empty in the deadline_name or description_url columns in due_dates table in DB.&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: An instructor can set the &amp;quot;Review Rubric Varies by Round&amp;quot; for an assignment, and set due dates for all of submissions and reviews, as well as different rubrics would be used&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student should see the review rubric for 1st round in the other's work link&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor change the due date to start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: A student should see the review rubric for 2nd round in the other's work link&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92060</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92060"/>
		<updated>2014-11-12T05:51:54Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Cucumber Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true', &amp;lt;br&amp;gt; @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
* Add Due Date Name and Description_url to the table, users can fill in blanks and store them in DB&lt;br /&gt;
* Rewrite set button function calling, everytime the button is pressed, it calls submit_form() and update in assignment_controller, then change the @assignment.rounds_of_review value in order to make changes in the DB instantly, which will help Rubrics tab display correctly&lt;br /&gt;
* Add a Change name and description url checkbox. If checked, the Due Date Name and Descripton_url will whow up; if unchecked, the two columns will hide.&lt;br /&gt;
* Everytime when webpage refreshes, the checkbox value will be set according to whether there’s value that is not empty in the deadline_name or description_url columns in due_dates table in DB.&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1:An instructor can set the &amp;quot;Review Rubric Varies by Round&amp;quot; for an assignment, and set due dates for all of submissions and reviews, as well as different rubrics would be used&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student should see the review rubric for 1st round in the other's work link&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor change the due date to start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4:  A student should see the review rubric for 2nd round in the other's work link&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92059</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92059"/>
		<updated>2014-11-12T05:38:31Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Case 4: Add Dropdown-box to Select Review Rubric */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true', &amp;lt;br&amp;gt; @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
* Add Due Date Name and Description_url to the table, users can fill in blanks and store them in DB&lt;br /&gt;
* Rewrite set button function calling, everytime the button is pressed, it calls submit_form() and update in assignment_controller, then change the @assignment.rounds_of_review value in order to make changes in the DB instantly, which will help Rubrics tab display correctly&lt;br /&gt;
* Add a Change name and description url checkbox. If checked, the Due Date Name and Descripton_url will whow up; if unchecked, the two columns will hide.&lt;br /&gt;
* Everytime when webpage refreshes, the checkbox value will be set according to whether there’s value that is not empty in the deadline_name or description_url columns in due_dates table in DB.&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92058</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92058"/>
		<updated>2014-11-12T05:37:48Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true', &amp;lt;br&amp;gt; @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
* Add Due Date Name and Description_url to the table, users can fill in blanks and store them in DB&lt;br /&gt;
* Rewrite set button function calling, everytime the button is pressed, it calls submit_form() and update in assignment_controller, then change the @assignment.rounds_of_review value in order to make changes in the DB instantly, which will help Rubrics tab display correctly&lt;br /&gt;
* Add a Change name and description url checkbox. If checked, the Due Date Name and Descripton_url will whow up; if unchecked, the two columns will hide.&lt;br /&gt;
* Everytime when webpage refreshes, the checkbox value will be set according to whether there’s value that is not empty in the deadline_name or description_url columns in due_dates table in DB.&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92057</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92057"/>
		<updated>2014-11-12T05:33:44Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
* Add Due Date Name and Description_url to the table, users can fill in blanks and store them in DB&lt;br /&gt;
* Rewrite set button function calling, everytime the button is pressed, it calls submit_form() and update in assignment_controller, then change the @assignment.rounds_of_review value in order to make changes in the DB instantly, which will help Rubrics tab display correctly&lt;br /&gt;
* Add a Change name and description url checkbox. If checked, the Due Date Name and Descripton_url will whow up; if unchecked, the two columns will hide.&lt;br /&gt;
* Everytime when webpage refreshes, the checkbox value will be set according to whether there’s value that is not empty in the deadline_name or description_url columns in due_dates table in DB.&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92056</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92056"/>
		<updated>2014-11-12T05:30:24Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92055</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92055"/>
		<updated>2014-11-12T05:29:32Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment,&amp;lt;br&amp;gt; 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire')&amp;lt;br&amp;gt;.to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92054</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92054"/>
		<updated>2014-11-12T05:28:13Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).&amp;lt;br&amp;gt;to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment,&amp;lt;br&amp;gt; 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92053</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92053"/>
		<updated>2014-11-12T05:26:58Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, &amp;lt;br&amp;gt;'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92052</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92052"/>
		<updated>2014-11-12T05:25:47Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment,   'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92051</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92051"/>
		<updated>2014-11-12T05:25:11Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, \b  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92050</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92050"/>
		<updated>2014-11-12T05:24:52Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment, /b  'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92049</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92049"/>
		<updated>2014-11-12T05:23:09Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment,   'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92048</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=92048"/>
		<updated>2014-11-12T05:21:51Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubric.html.erb, we added a checkbox, which can read the value of used_in_round_flag. In Rubrics Tab, add a Review rubric varies by round checkbox, when checked, it displays corresponding number of rounds of Review round 1 to Review round n; when unchecked, it displays as usual.&lt;br /&gt;
At the same time, it will store new data in the table into database, in assignment_questionnaires table, it will add 1,2,3...n to used_in_round column if the review rubric varies by round; if not, it will store NULL.&lt;br /&gt;
Everytime webpage refreshes, the checkbox is checked or not according to the value of used_in_round column in the assignment_questionnaires table.&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function handleCheckReviewVary(checkvalue) {&lt;br /&gt;
        var state = checkvalue.checked;&lt;br /&gt;
        var round_count = &amp;lt;%= @assignment.rounds_of_reviews%&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
        if (state == true &amp;amp;&amp;amp; round_count &amp;gt;1){&lt;br /&gt;
            //Make it display by rounds&lt;br /&gt;
            var element_id;&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
                for (i = 1; i &amp;lt;= round_count; i++) {&lt;br /&gt;
                    addQuestionnaireTableRow('ReviewQuestionnaire', i, &amp;lt;%= questionnaire(@assignment,   'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
                }&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            &amp;lt;%@avoidrepeatsign=1%&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
        if (state == false &amp;amp;&amp;amp; round_count&amp;gt;1){&lt;br /&gt;
            //Make it display as usual&lt;br /&gt;
            var element_id;&lt;br /&gt;
            for (i=1;i&amp;lt;=round_count+1;i++) {&lt;br /&gt;
                element_id = 'questionnaire_table_' + 'ReviewQuestionnaire';&lt;br /&gt;
                jQuery('#' + element_id).remove();&lt;br /&gt;
            }&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'MetareviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'AuthorFeedbackQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            element_id = 'questionnaire_table_' + 'TeammateReviewQuestionnaire';&lt;br /&gt;
            jQuery('#' + element_id).remove();&lt;br /&gt;
            //And display original ones&lt;br /&gt;
            addQuestionnaireTableRow('ReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'ReviewQuestionnaire',1).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'ReviewQuestionnaire', 1).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'ReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('MetareviewQuestionnaire', null, &amp;lt;%= questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'MetareviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'MetareviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('AuthorFeedbackQuestionnaire', null,&amp;lt;%= questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'AuthorFeedbackQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'AuthorFeedbackQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
            addQuestionnaireTableRow('TeammateReviewQuestionnaire',null, &amp;lt;%= questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= assignment_questionnaire(@assignment, 'TeammateReviewQuestionnaire',nil).to_json %&amp;gt;, &amp;lt;%= questionnaire_options(@assignment, 'TeammateReviewQuestionnaire').to_json %&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--//Add a review varies by round checkbox. By: Xiaoqiang Shao--&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_questionnaire[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_questionnaire[used_in_round]', 'true',  @reviewvarycheck,:onclick=&amp;gt;&amp;quot;handleCheckReviewVary(this)&amp;quot; ) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_questionnaire[used_in_round]', 'Review rubric varies by round?') %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91378</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91378"/>
		<updated>2014-11-04T20:09:26Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_used_in_round_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_used_in_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_used_in_round_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91377</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91377"/>
		<updated>2014-11-04T20:08:15Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_vary_on_round_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91376</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91376"/>
		<updated>2014-11-04T20:07:04Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Cucumber Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test for our project, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91375</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91375"/>
		<updated>2014-11-04T16:54:28Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91302</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91302"/>
		<updated>2014-10-30T03:52:52Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_dates.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_name&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_name&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[deadline_name]&amp;quot;  &amp;lt;br&amp;gt; value=&amp;quot;'+due_date.deadline_name+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td  align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_description_url&amp;quot; width=&amp;quot;15%&amp;quot;&amp;gt;';&lt;br /&gt;
        html += '&amp;lt;input id=&amp;quot;due_date_description_url&amp;quot; type=&amp;quot;text&amp;quot; name=&amp;quot;due_date[description_url]&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;'+due_date.description_url+'&amp;quot;&amp;gt;'+'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91298</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91298"/>
		<updated>2014-10-30T03:49:54Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Current Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No test_box for &amp;quot;deadline_name&amp;quot; and &amp;quot;description_url&amp;quot; on due_date tab.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91263</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91263"/>
		<updated>2014-10-30T03:22:20Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91262</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91262"/>
		<updated>2014-10-30T03:21:57Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Media:Example.ogg]]==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91259</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91259"/>
		<updated>2014-10-30T03:21:06Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Example.jpg]]==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91257</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91257"/>
		<updated>2014-10-30T03:20:02Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _due_date.html.erb:&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb:&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91255</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91255"/>
		<updated>2014-10-30T03:18:50Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;         style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91254</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91254"/>
		<updated>2014-10-30T03:17:58Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammatereview_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_flag ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @authorfeedback_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammatereview_flag) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;     style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91252</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91252"/>
		<updated>2014-10-30T03:16:52Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&amp;lt;br&amp;gt;&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt;     style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; &amp;lt;br&amp;gt;style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;&amp;lt;br&amp;gt; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
         for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + &amp;lt;br&amp;gt;'&amp;lt;/option&amp;gt;'&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91247</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91247"/>
		<updated>2014-10-30T03:15:19Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab.&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _rubrics.html.erb:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
         '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
         if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
            if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
               html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot;      style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
            }&lt;br /&gt;
            else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
         }else {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
        '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91243</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91243"/>
		<updated>2014-10-30T03:12:50Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
The dropdown box of review on the rubric tab is disabled if the &amp;quot;Vary by round&amp;quot; checkbox we added in case 1 is checked, instead, a dropdown box is added to corresponding review round on the due_date tab:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                    '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;';&lt;br /&gt;
                    if(!&amp;lt;%=@used_in_round_flag.nil? %&amp;gt;) {&lt;br /&gt;
                        if(questionnaire_type==&amp;quot;ReviewQuestionnaire&amp;quot;) {&lt;br /&gt;
                            html += '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot; disabled&amp;gt;';&lt;br /&gt;
                        }&lt;br /&gt;
                        else&lt;br /&gt;
                        {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {html+='&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;';}&lt;br /&gt;
                    '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
            for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
                    html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot; &amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
            }&lt;br /&gt;
            html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91229</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91229"/>
		<updated>2014-10-30T03:07:19Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Current Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled, but on the due_date tab, there is no dropdown box to select the review rubric of corresponding round:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
 html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91225</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91225"/>
		<updated>2014-10-30T03:05:16Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Current Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
On the Rubric tab, the dropdown box of review rubric is always enabled:&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;questionnaire_id&amp;quot;&amp;gt;' + questionnaire.display_type + ':&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;' +&lt;br /&gt;
                '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;select id=&amp;quot;questionnaire_id&amp;quot; name=&amp;quot;assignment_questionnaire[questionnaire_id]&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;' +&lt;br /&gt;
                '&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;--None--&amp;lt;/option&amp;gt;';&lt;br /&gt;
        for (i = 0; i &amp;lt; questionnaire_options.length; i++) {&lt;br /&gt;
            html += '&amp;lt;option value=&amp;quot;' + questionnaire_options[i][1] + '&amp;quot;&amp;gt;' + questionnaire_options[i][0] + '&amp;lt;/option&amp;gt;'&lt;br /&gt;
        }&lt;br /&gt;
        html += '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91216</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91216"/>
		<updated>2014-10-30T03:02:23Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Cucumber Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional and integrated test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91212</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91212"/>
		<updated>2014-10-30T03:01:41Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91211</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91211"/>
		<updated>2014-10-30T03:01:12Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Add Cucumber Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
A few cucumber tests are added to perform the functional test, such as:&lt;br /&gt;
&lt;br /&gt;
Scenario 1: A instructor created a new assignment which has 2 rounds of review, and the review rubric is varying by round&lt;br /&gt;
&lt;br /&gt;
Scenario 2: A student submitted the assignment&lt;br /&gt;
&lt;br /&gt;
Scenario 3: The instructor set the date to start the 1st round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 4: The student goes into the other's work, and can see the review rubric of round 1&lt;br /&gt;
&lt;br /&gt;
Scenario 5: The instructor then change the date to  start the 2nd round of review&lt;br /&gt;
&lt;br /&gt;
Scenario 6: The student logs in again, and can see the review rubric of round 2, which should be different from round 1&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91199</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91199"/>
		<updated>2014-10-30T02:53:42Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91198</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91198"/>
		<updated>2014-10-30T02:53:24Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;reference /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91196</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91196"/>
		<updated>2014-10-30T02:52:25Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; &amp;lt;br&amp;gt;value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
 else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot;&amp;lt;br&amp;gt; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= &amp;lt;br&amp;gt;label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91192</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91192"/>
		<updated>2014-10-30T02:47:56Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value:&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value:&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91191</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91191"/>
		<updated>2014-10-30T02:47:30Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value.&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value.&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91190</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91190"/>
		<updated>2014-10-30T02:47:05Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value.&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the  views / assignment / edit / _rubrics.html.erb, 4 checkbox are added, based on the corresponding flag value.&lt;br /&gt;
&lt;br /&gt;
 if(questionnaire.display_type == &amp;quot;Review&amp;quot;)&lt;br /&gt;
        html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @review_check ) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Metareview&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @metareview_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @author_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
        else if(questionnaire.display_type == &amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
            html += '&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @teammate_check) %&amp;gt;&amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt; &amp;lt;/td&amp;gt;'+&lt;br /&gt;
                    '&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91187</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91187"/>
		<updated>2014-10-30T02:44:59Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox on the Rubric tab to show is the type of review is varied by round.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;edit&amp;quot; method we defined above, a list of 4 flags are added to reflect the corresponding database value.&lt;br /&gt;
&lt;br /&gt;
  @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @q_id = aq.questionnaire_id&lt;br /&gt;
        @qn = Questionnaire.find(@q_id)&lt;br /&gt;
&lt;br /&gt;
        if(@qn.display_type.eql?&amp;quot;Review&amp;quot;)&lt;br /&gt;
          @review_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Metareview&amp;quot;)&lt;br /&gt;
          @metareview_flag=1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Author Feedback&amp;quot;)&lt;br /&gt;
          @authorfeedback_flag = 1&lt;br /&gt;
        elsif(@qn.display_type.eql?&amp;quot;Teammate Review&amp;quot;)&lt;br /&gt;
          @teammate_flag = 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91156</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91156"/>
		<updated>2014-10-30T02:14:15Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91155</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91155"/>
		<updated>2014-10-30T02:14:00Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* After Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the assignment_controller.rb, we added a method to load the value from database to used_in_round_flag:&lt;br /&gt;
&lt;br /&gt;
 def edit&lt;br /&gt;
    @assignment = Assignment.find(params[:id])&lt;br /&gt;
    @assignment_questionnaires = AssignmentQuestionnaire.find_all_by_assignment_id(params[:id])&lt;br /&gt;
    @used_in_round_flag= nil&lt;br /&gt;
&lt;br /&gt;
    @assignment_questionnaires.each do  |aq|&lt;br /&gt;
      if(!(aq.used_in_round.nil?))&lt;br /&gt;
        @used_in_round_flag= 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91153</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91153"/>
		<updated>2014-10-30T02:08:47Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
No checkbox for &amp;quot;Varying Rubric by Round&amp;quot; on the general tab for Instructors.&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
In the expertiza / app / views / assignment / edit / _general.html.erb, we added a checkbox, which can read the value of used_in_round_flag.&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td style='padding:5px' id='assignment_review_rubric_vary_field'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_questionnaires[used_in_round]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_questionnaires[used_in_round]', 'true', @used_in_round_flag ) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_questionnaires[used_in_round]', 'Review rubric vary by round?') %&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91122</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91122"/>
		<updated>2014-10-30T01:42:50Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* JavaScript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;. This mix of features makes it a multi-paradigm language, supporting [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented], [http://en.wikipedia.org/wiki/Imperative_programming imperative], and [http://en.wikipedia.org/wiki/Functional_programming functional] programming styles.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91119</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91119"/>
		<updated>2014-10-30T01:41:00Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* JavaScript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from [http://en.wikipedia.org/wiki/C_(programming_language) C], while the semantics and design are influenced by [http://en.wikipedia.org/wiki/Self_(programming_language) Self] and [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91117</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91117"/>
		<updated>2014-10-30T01:39:28Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* JavaScript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different [http://en.wikipedia.org/wiki/Semantics_(computer_science) semantics]. The syntax of JavaScript is actually derived from C, while the semantics and design are influenced by Self and Scheme programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91113</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91113"/>
		<updated>2014-10-30T01:38:11Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* JavaScript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers. Despite some naming, syntactic, and standard library similarities, JavaScript and Java are otherwise unrelated and have very different semantics. The syntax of JavaScript is actually derived from C, while the semantics and design are influenced by Self and Scheme programming languages&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/JavaScript&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91098</id>
		<title>CSC/ECE 517 Fall 2014/OSS E1450 cxm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/OSS_E1450_cxm&amp;diff=91098"/>
		<updated>2014-10-30T01:31:23Z</updated>

		<summary type="html">&lt;p&gt;Mliu9: /* E1450: UI change for assignment view */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E1450: UI change for assignment view==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What it does: &amp;lt;/b&amp;gt;Change UI of Expertiza to support varying rubric feature (allow instructors to specify different review rubrics for different review rounds)&lt;br /&gt;
&lt;br /&gt;
== Background Information==&lt;br /&gt;
&lt;br /&gt;
=== What is Expertiza? ===&lt;br /&gt;
&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt;. The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages&amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript ===&lt;br /&gt;
&lt;br /&gt;
JavaScript is a dynamic programming language of the Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&amp;lt;b&amp;gt;Classes involved:&amp;lt;/b&amp;gt;controllers/assignment_controller.rb (488 lines)&amp;lt;br&amp;gt; views/assignment/edit.html.erb (55 lines) in production branch (not in master branch)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;What needs to be done:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires JavaScript knowledge. &lt;br /&gt;
&lt;br /&gt;
*A checkbox “Review rubrics vary by round” should be added to the “General” tab in the view of creating/editing assignment. No corresponding field in “assignments” table is necessary. We can tell if this checkbox should be checked by checking “assignments_questionnaires” table by current assignment_id. If there is no record with a non-null value in  “used_in_round” field, this assignment is not using this feature and the checkbox should not be checked. (if one assignment has 2 rounds but they are using the same set of rubrics, for each type of rubric there should be only one entry with “used_in_round” field null)R&lt;br /&gt;
&lt;br /&gt;
* 4 checkboxes “Review rubrics vary by round” should be added on the “rubrics” tab. each one denotes for each type of rubric (review, metareview, author feedback and teammate review) for which the instructor wants to use different rubrics. Again, no corresponding DB field is necessary. If the checkbox on the “General” tab is selected, on the “rubrics” tab, the “Review rubrics vary by round” checkbox for “review” will be selected automatically&lt;br /&gt;
&lt;br /&gt;
* There should be a editable “deadline name” for each due date on “due date” panel if this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in deadline_name field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* Another “description URL” text box should be editable when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in description_url field in due_dates table)&lt;br /&gt;
&lt;br /&gt;
* A drop-down box which help instructor to select review rubric should be added for a review round when this type of review is specified to be “varying by rounds” in the “rubrics” tab  (the input should be recorded in assignments_questionnaires table)&lt;br /&gt;
&lt;br /&gt;
* There are no tests for the code.  Create appropriate functional and integration tests.&lt;br /&gt;
&lt;br /&gt;
== Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
== Environment Setup==&lt;br /&gt;
&lt;br /&gt;
Since we are developing on the Production branch, in stead of the Rails4 branch, the environment for us would be  different from the majority of the class. Here is the list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Ruby:&amp;lt;/b&amp;gt; 1.8.7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Rails:&amp;lt;/b&amp;gt; 2.3.15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Java:&amp;lt;/b&amp;gt; 1.6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Openjdk:&amp;lt;/b&amp;gt; 6.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Database:&amp;lt;/b&amp;gt; expertiza_scrubbed_2014_03_14.sql&lt;br /&gt;
&lt;br /&gt;
== Code Modifications ==&lt;br /&gt;
&lt;br /&gt;
=== Case 1: Add Checkbox on &amp;quot;General&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 2: Add 4 Checkbox on &amp;quot;Rubric&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 3: Add &amp;quot;Deadline_name&amp;quot; and  &amp;quot;Description_url&amp;quot; on &amp;quot;Due_date&amp;quot; Tab===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
=== Case 4: Add Dropdown-box to Select Review Rubric===&lt;br /&gt;
&lt;br /&gt;
==== Current Scenario ====&lt;br /&gt;
&lt;br /&gt;
==== After Changes ====&lt;br /&gt;
&lt;br /&gt;
== Add Cucumber Tests ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Mliu9</name></author>
	</entry>
</feed>