<?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=Mxu</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=Mxu"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Mxu"/>
	<updated>2026-08-08T13:39:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=102276</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=102276"/>
		<updated>2016-04-16T01:38:18Z</updated>

		<summary type="html">&lt;p&gt;Mxu: /* Instructors are able to create and manage an assignment's quiz feature */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===CSC/ECE 517 Spring 2016 E1621: Refactor and test the quizzing feature===&lt;br /&gt;
&lt;br /&gt;
= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
The Expertiza quiz feature is in need of refactoring. Currently, quizzes are checked by &amp;lt;code&amp;gt;questionnaires_controller.valid_quiz&amp;lt;/code&amp;gt;. This method is rather long, involved, and does not take advantage of object-oriented practices. It combs through the parameters hash received from a request and manually checks all quiz fields, all question fields, all question choice fields, and verifies that each question has a correct choice.&lt;br /&gt;
&lt;br /&gt;
We will refactor the method to construct a quiz questionniare and then call &amp;lt;code&amp;gt;valid?&amp;lt;/code&amp;gt; to recursively validate the object tree using ActiveRecord validations. This is an improvement over the current code which checks all questions manually. The purpose of refactoring in this manner is to enhance readability, DRYness, and maintainability of Expertiza code.&lt;br /&gt;
&lt;br /&gt;
In addition to this refactoring we will implement integration testing on the quiz feature to verify that the expected behavior is present for all use cases.&lt;br /&gt;
&lt;br /&gt;
A full description of the assignment may be found [https://docs.google.com/document/d/13oRmKemlwRzXG1ItcI2zTx4r3gAAfvmuobZjxiy0oVo/edit#heading=h.su78b3gdq1a7 here]&lt;br /&gt;
&lt;br /&gt;
=Classes involved=&lt;br /&gt;
* questionnaires_controller.rb&lt;br /&gt;
* quiz_quesetionnaire.rb&lt;br /&gt;
* quiz_question.rb&lt;br /&gt;
* quiz_question_choice.rb&lt;br /&gt;
* spec/features/quiz_spec.rb&lt;br /&gt;
&lt;br /&gt;
=Use Case and Scenarios=&lt;br /&gt;
The Quiz Use Case allows for instructors to create and manage assignments where students may write quizzes for reviewers on materials they have submitted. See the following scenarios for a complete description of how the feature is expected to work.&lt;br /&gt;
&lt;br /&gt;
==Instructors are able to create and manage an assignment's quiz feature==&lt;br /&gt;
An instructor chooses to create an assignment that has a quiz [S1]. While editing the assignment they may choose the number of quiz questions [S2] and set which phases students are allowed to take the quizzes [S3].&lt;br /&gt;
&lt;br /&gt;
* [S1] - When creating the assignment there is a checkbox labeled &amp;quot;has quiz.&amp;quot; Checking this box creates an assignment that includes a quiz.&lt;br /&gt;
* [S2] - When an assignment has a quiz there is an input field that accepts the number of questions that will be on each quiz. Setting this number appropriately changes the number of quiz questions.&lt;br /&gt;
* [S3] - Students may not take quizzes on a phase that does not allow them to do so. When on a stage that does allow for quizzes, they may take quizzes on work that they have reviewed.&lt;br /&gt;
&lt;br /&gt;
==Instructors can view quiz questions and scores from the tree view==&lt;br /&gt;
After an assignment has been created the instructor may choose to view student quizzes from the tree view [S1]. While on the quiz view page they see student quizzes [S2] and student responses [S3].&lt;br /&gt;
&lt;br /&gt;
* [S1] - The instructor may navigate to the list of assignments. Assignments with quizzes enabled will provide a link for the instructor to follow and view student quizzes.&lt;br /&gt;
* [S2] - The instructor shall be presented with the quiz title, questions, and answer choices. The correct answer choices will be in bold.&lt;br /&gt;
* [S3] - The score for each student who has taken the quiz shall be listed along with the average quiz score.&lt;br /&gt;
&lt;br /&gt;
==Students can create and edit quizzes==&lt;br /&gt;
A student navigates to the assignment work page and chooses to create a new quiz [S1] or edit an existing one [S2]. By doing so they are able to choose a quiz title  and quiz questions [S3]. Invalid input results in an error message prompting the student to fix the issue [E1].&lt;br /&gt;
&lt;br /&gt;
* [S1] - A student may only create a quiz if they have not yet done so.&lt;br /&gt;
* [S2] - A student may only edit a quiz if they have previously created one.&lt;br /&gt;
* [S3] - The quiz has the number of quiz questions defined by the instructor in the assignment.&lt;br /&gt;
&lt;br /&gt;
* [E1] - Possible errors include:&lt;br /&gt;
** The quiz has no name.&lt;br /&gt;
** One or more questions is missing text.&lt;br /&gt;
** One or more choices is missing text.&lt;br /&gt;
** A question is missing a correct answer choice.&lt;br /&gt;
&lt;br /&gt;
==Students can take quizzes on assignments they have reviewed==&lt;br /&gt;
A student decides to take a quiz [S1] on another team's assignment that they have previously reviewed. They select an artifact for review [S2] and fill in their answers. After submitting the quiz they can view their score on the take quizzes page [S3] and see question-by-question scores by clicking view [S4].&lt;br /&gt;
&lt;br /&gt;
* [S1] - The student may only take a quiz during a stage in which the assignment is configured to allow them to do so.&lt;br /&gt;
* [S2] - Only quizzes from submissions they have reviewed are available.&lt;br /&gt;
* [S3] - The take quizzes page lists the final score for each quiz.&lt;br /&gt;
* [S4] - Choosing to view a quiz will show a student each question along with their answers and the correct answers.&lt;br /&gt;
&lt;br /&gt;
=Design and Implementation=&lt;br /&gt;
Design for the refactoring has been driven by object oriented principles and test-driven-development, and makes use of the existing object hierarchy described in the following UML diagram. &lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza_quiz_hierarchy.png|Expertiza Quiz Hierarchy]]&lt;br /&gt;
&lt;br /&gt;
See the below sections for a part-by-part breakdown of the planned implementation for this project.&lt;br /&gt;
&lt;br /&gt;
==Tests==&lt;br /&gt;
Quiz tests will be added to the file spec/features/quiz_spec.rb and will make use of&lt;br /&gt;
* rspec&lt;br /&gt;
* capybara&lt;br /&gt;
* selenium&lt;br /&gt;
&lt;br /&gt;
Tests will be made which fully cover the expected behavior of each listed scenario in the Use Case.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
Each of the following files will be refactored as described.&lt;br /&gt;
&lt;br /&gt;
===QuestionnaireController===&lt;br /&gt;
Refactor the &amp;lt;code&amp;gt;valid_quiz&amp;lt;/code&amp;gt; method. It will be renamed to &amp;lt;code&amp;gt;validate_quiz&amp;lt;/code&amp;gt; to more properly describe the action that occurs as a result of it being called. The behavior will be changed to construct a new quiz questionnaire with submitted questions wich will be validated using &amp;lt;code&amp;gt;quiz.valid?&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===QuizQuestionnaire===&lt;br /&gt;
The following fields will be validated using ActiveRecord validations.&lt;br /&gt;
* Presence of name&lt;br /&gt;
&lt;br /&gt;
===QuizQuestion===&lt;br /&gt;
The following fields will be validated using ActiveRecord validations&lt;br /&gt;
* Presence of text&lt;br /&gt;
* Presence of type&lt;br /&gt;
* Has a correct answer&lt;br /&gt;
&lt;br /&gt;
===QuizQuestionChoice===&lt;br /&gt;
The following fields will be validated using ActiveRecord validations&lt;br /&gt;
* Presence of text&lt;br /&gt;
&lt;br /&gt;
===Test Cases===&lt;br /&gt;
In order to verify that refactoring has been done correctly and maintains the same external behavior, we will write test cases to the existing implementation. These test cases will be the ground truth of the validation feature. Refactored code will not be considered complete until all of these test cases once again pass.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1604._Functional_tests_for_Calibration_function&amp;diff=101448</id>
		<title>CSC/ECE 517 Spring 2016/E1604. Functional tests for Calibration function</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1604._Functional_tests_for_Calibration_function&amp;diff=101448"/>
		<updated>2016-03-28T22:28:47Z</updated>

		<summary type="html">&lt;p&gt;Mxu: Created page with &amp;quot;'''Expertiza''' is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza''' is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. &amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza on GitHub]&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Our contribution to this project is a suite of functional tests for the assignment calibration function. These tests are designed to provide integration, regression, and acceptance testing by using automation technologies.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Expertiza has a feature called Calibration that can be turned on for an assignment. When this feature is enabled an expert, typically the instructor, can provide an expert review for the assignment artifacts. After students finish their own reviews they may compare their responses to the expert review. The instructor may also view calibration results to view the scores for the entire class.&lt;br /&gt;
&lt;br /&gt;
While this is a preexisting feature within Expertiza, there currently exist no tests for it. The goal of this project is to fully test the entire flow of the calibration feature using the '''RSpec''' and '''Capybara''' frameworks.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The moment a line of code is written it becomes legacy code in need of support. Test cases are used not only to ensure that code is operating properly, but also to ensure that it continues to do so after having been modified. An important aspect of this is acceptance testing to verify that the project meets customer requirements. Rather than performing these tests by hand, it is easier to combine an automated testing system like RSpec with a driver like Capybara which allows testing of an application's functionality from the outside by running in a  browser.&lt;br /&gt;
&lt;br /&gt;
===Flow of the calibration function===&lt;br /&gt;
A more detailed description of the calibration may be found [https://docs.google.com/document/d/1LcicJCUY0GHN1qzwRQPL9A1Nv89sVtNtxlADOzVQeBk/edit#heading=h.g4vilf87e3f0 here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before analyzing code, one must familiarize themselves with the steps involved in calibration on Expertiza. The steps involved are:&lt;br /&gt;
# Login with valid instructor username and password&lt;br /&gt;
# Click on &amp;quot;Assignment&amp;quot;&lt;br /&gt;
# Click on &amp;quot;New public assignment&amp;quot;&lt;br /&gt;
# Input all the information needed, check the “Calibrated peer-review for training?” box, click on Create&lt;br /&gt;
# Select the review rubric in “Rubrics” tab&lt;br /&gt;
# Go to “Due dates” tab, make sure that this assignment is currently in Review phase, also, make the submission allowed in review phase.&lt;br /&gt;
# Add a submitter to the assignment. This submitter will add documents to be reviewed. &lt;br /&gt;
# Go to the list of assignments, click “edit” icon of the assignment&lt;br /&gt;
# Go to the “Calibration” tab, click on the &amp;quot;Begin&amp;quot; link next to the student artifact for the expert review, and click “Submit Review”&lt;br /&gt;
# Go to “Review strategy” tab, select Instructor-Selected as review strategy, then select the radio button “Set number of reviews done by each student” and input the number of reviews&lt;br /&gt;
# Login with valid student username and password who is a reviewer for the assignment&lt;br /&gt;
# Click on the assignment&lt;br /&gt;
# Click on “Other’s work”&lt;br /&gt;
# After clicking “Begin”, Expertiza will display peer-review page&lt;br /&gt;
# Click “Submit Review”&lt;br /&gt;
# Click “Show calibration results” to see expert review&lt;br /&gt;
# Login with valid instructor username and password&lt;br /&gt;
# Click on &amp;quot;Assignment&amp;quot;&lt;br /&gt;
# Click on the “view review report” to see the calibration report&lt;br /&gt;
&lt;br /&gt;
== Creating the Tests==&lt;br /&gt;
&lt;br /&gt;
===Gems involved===&lt;br /&gt;
* rspec-rails&lt;br /&gt;
* capybara&lt;br /&gt;
* selenium-webdriver&lt;br /&gt;
* factory_girl_rails&lt;br /&gt;
&lt;br /&gt;
====Rspec-rails====&lt;br /&gt;
Rspec-rails is a testing framework for Rails 3.x and 4.x. It supports testing of models, controllers, requests, features, views and routes. It does this by accepting test scenarios called specs.&amp;lt;ref&amp;gt;[https://github.com/rspec/rspec-rails rpsce-rails on GitHub]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Capybara====&lt;br /&gt;
Capybara helps you test web applications by simulating how a real user would interact with your application. It comes with built in Rack::Test and Selenium support. WebKit is supported through an external gem.&amp;lt;ref&amp;gt;[https://github.com/jnicklas/capybara capybara on GitHub]&amp;lt;/ref&amp;gt; To control the environments in which the scenarios are run, it provides before and after hooks.&amp;lt;ref&amp;gt;[https://www.relishapp.com/rspec/rspec-core/v/2-2/docs/hooks/before-and-after-hooks Before and after hooks]&amp;lt;/ref&amp;gt;&lt;br /&gt;
*before(:each) blocks are run before each scenario in the group&lt;br /&gt;
*before(:all) blocks are run once before all of the scenarios in the group&lt;br /&gt;
*after(:each) blocks are run after each scenario in the group &lt;br /&gt;
*after(:all) blocks are run once after all of the scenarios in the group&lt;br /&gt;
&lt;br /&gt;
====Selenium====&lt;br /&gt;
Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It is the default javascript webdriver for Capybara.&lt;br /&gt;
&lt;br /&gt;
====Factory Girl====&lt;br /&gt;
Factory Girl &amp;lt;ref&amp;gt;[https://github.com/thoughtbot/factory_girl Factory Girl]&amp;lt;/ref&amp;gt; is a factory gem meant for use in testing. It allows for easy and highly configurable on-the-fly model creation that allows tests to request a new instance of a model template and optionally override any of the defaults.&lt;br /&gt;
&lt;br /&gt;
===Test Scenarios===&lt;br /&gt;
The following scenarios were considered when writing tests for the calibration use case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
An instructor creates a calibrated assignment&lt;br /&gt;
:An instructor authenticates to expertiza&lt;br /&gt;
:They select to add a new assignment&lt;br /&gt;
:While creating the assignment, the instructor selects to turn calibration on&lt;br /&gt;
:After creating the assignment the instructor sees a calibration tab on the assignment page&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
An instructor edits the calibration configuration&lt;br /&gt;
:An instructor authenticates to expertiza&lt;br /&gt;
:They select to edit an existing assignment&lt;br /&gt;
:The instructor clicks on the calibration tab and sees it is populated with submitted artifacts&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
An expert submits a review for calibration&lt;br /&gt;
:An expert has been added to an assignment to provide the expert review&lt;br /&gt;
:The expert authenticates to Expertiza and begins the expert review&lt;br /&gt;
:The expert finishes and submits the review&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
Student Calibration&lt;br /&gt;
:A student has submitted a response for the assignment and it is currently in the review phase&lt;br /&gt;
:The student authenticates to Expertiza and chooses to view calibration for the assignment&lt;br /&gt;
:The student sees their own answers compared to the expert review.&lt;br /&gt;
:Answers that match are marked green, and answers that differ are marked red.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
Instructor Calibration&lt;br /&gt;
:It is currently the review phase for an assignment&lt;br /&gt;
:An instructor authenticates to Expertiza and chooses to view calibration&lt;br /&gt;
:The instructor can see the student and instructor responses for the assignment&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Code=== &lt;br /&gt;
Code for the tests exists in two locations&lt;br /&gt;
* [https://github.com/EricHorton/expertiza/blob/master/spec/factories/factories.rb Factory]&lt;br /&gt;
* [https://github.com/EricHorton/expertiza/blob/master/spec/features/calibration_spec.rb CalibrationSpec]&lt;br /&gt;
&lt;br /&gt;
====Design Pattern====&lt;br /&gt;
We attempted to follow good OO practices by implementing the CRUD&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Create,_read,_update_and_delete Create Read Update and Delete]&amp;lt;/ref&amp;gt; design pattern using Factory Girl and Capybara.&lt;br /&gt;
&lt;br /&gt;
====Structure====&lt;br /&gt;
Our specs follow the standard RSpec describe/it syntax. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
describe 'Some Feature' do&lt;br /&gt;
:before :each do&lt;br /&gt;
&lt;br /&gt;
:end&lt;br /&gt;
&lt;br /&gt;
:it 'should do x' do&lt;br /&gt;
::expect(true).to be(true)&lt;br /&gt;
:end&lt;br /&gt;
&lt;br /&gt;
:it 'should not do y' do&lt;br /&gt;
::expect(true).to be(false)&lt;br /&gt;
:end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running  the tests==&lt;br /&gt;
&lt;br /&gt;
The following are steps required to run the test&lt;br /&gt;
&lt;br /&gt;
* Clone the repository in a new directory&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12.5px; width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/EricHorton/expertiza&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create and then prepare the test database&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12.5px; width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
$ cd expertiza&lt;br /&gt;
$ rake db:test:prepare&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Type the command to run tests for assignment submission&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12.5px; width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
rspec spec/features/calibration_spec.rb --order default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Results==&lt;br /&gt;
&lt;br /&gt;
The following screenshot shows the result of the rspec command.&lt;br /&gt;
&lt;br /&gt;
[[File:calibration-tests.png|Calibration Tests]]&lt;br /&gt;
 &lt;br /&gt;
=== Test Analysis ===&lt;br /&gt;
&lt;br /&gt;
* All test cases are green, which means there are no currently failing tests.&lt;br /&gt;
* Test cases are run through the Selenium driver on Firefox for javascript support. Because they are full acceptance tests they are slower than regular unit tests, but still beat evaluating the feature by hand.&lt;br /&gt;
* Tests are independent and repeatable. Database changes are made within a transaction that is rolled back after tests complete.&lt;br /&gt;
&lt;br /&gt;
==Project Resources==&lt;br /&gt;
# [https://github.com/EricHorton/expertiza GitHub Fork]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references&amp;gt;&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
* [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=101446</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=101446"/>
		<updated>2016-03-28T22:27:37Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (OmniAuth)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Patch_verb)]]&lt;br /&gt;
&lt;br /&gt;
==Writing Assignment 2==&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Mozilla Implement HTML5 form validation]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Functional Tests for Questionnaire Controller]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Refactor different question types from quiz feature]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Implement private browsing]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Write automated tests for WebDriver]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Refactor sign_up_sheet_controller.rb and sign_up_topic.rb]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Functional tests for assignment creation function]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/E1604. Functional tests for Calibration function]]&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101436</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101436"/>
		<updated>2016-03-28T21:53:17Z</updated>

		<summary type="html">&lt;p&gt;Mxu: /* What needs to be done */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===CSC/ECE 517 Spring 2016 E1621: Refactor and test the quizzing feature===&lt;br /&gt;
&lt;br /&gt;
= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
The valid_quiz method in questionnaires_controller needs to be refactored. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
**Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
= Use Cases =&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101435</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101435"/>
		<updated>2016-03-28T21:42:00Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===CSC/ECE 517 Spring 2016 E1621: Refactor and test the quizzing feature===&lt;br /&gt;
&lt;br /&gt;
= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
The valid_quiz method in questionnaires_controller needs to be refactored. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
= Use Cases =&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101434</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101434"/>
		<updated>2016-03-28T21:40:57Z</updated>

		<summary type="html">&lt;p&gt;Mxu: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===CSC/ECE 517 Fall 2015 E1621: Refactor and test the quizzing feature===&lt;br /&gt;
&lt;br /&gt;
= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
The valid_quiz method in questionnaires_controller needs to be refactored. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
= Use Cases =&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101433</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101433"/>
		<updated>2016-03-28T21:40:15Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===CSC/ECE 517 Fall 2015 E1621: Refactor and test the quizzing feature===&lt;br /&gt;
&lt;br /&gt;
= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
The valid_quiz method in questionnaires_controller needs to be refactored. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101432</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101432"/>
		<updated>2016-03-28T21:38:53Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2015 E1621: Refactor and test the quizzing feature&lt;br /&gt;
&lt;br /&gt;
= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
The valid_quiz method in questionnaires_controller needs to be refactored. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101431</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101431"/>
		<updated>2016-03-28T21:38:27Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=CSC/ECE 517 Fall 2015 E1621 Refactor and test the quizzing feature=&lt;br /&gt;
&lt;br /&gt;
= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
The valid_quiz method in questionnaires_controller needs to be refactored. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101430</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101430"/>
		<updated>2016-03-28T21:35:25Z</updated>

		<summary type="html">&lt;p&gt;Mxu: /* What is wrong with it */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
The valid_quiz method in questionnaires_controller needs to be refactored. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101429</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101429"/>
		<updated>2016-03-28T21:33:04Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
It does stuff&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
things are wrong&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
This project can be divided into major work items:&lt;br /&gt;
#thing 1&lt;br /&gt;
#thing 2&lt;br /&gt;
#thing 3&lt;br /&gt;
#thing 4&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
implementation details&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
design&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
use cases&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/&amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/&amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
things to do in the future&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101428</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101428"/>
		<updated>2016-03-28T21:29:03Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction to Expertiza =&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://github.com/expertiza/expertiza&amp;lt;/ref&amp;gt; is a project developed using Ruby on Rails&amp;lt;ref&amp;gt;http://guides.rubyonrails.org/getting_started.html&amp;lt;/ref&amp;gt;. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an [https://en.wikipedia.org/wiki/Open_source open source] application and the code can be cloned from [https://github.com/expertiza/expertiza GitHub]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
== Classes involved ==&lt;br /&gt;
*'''questionnaires_controller.rb''' &lt;br /&gt;
our own files in /specs/ folder. &lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
#It handles the display, submission, deletion of hyperlinks and files by the teams.&lt;br /&gt;
&lt;br /&gt;
== What is wrong with it ==&lt;br /&gt;
#The submitted hyperlinks and files are stored in '''participants''' table, which means they are associated with individuals instead of team. This is not a good design because in #Expertiza, students are always grouped in teams, even when there is only one person in each team (individual assignments).&lt;br /&gt;
#Currently, when a team member wants to see all the submitted hyperlinks of his team, Expertiza needs to load all the submitted hyperlinks from each participant in this team and merge them #all before display. Similar overhead happens when a team member wants to delete a submitted hyperlink. Also, the '''directory_num''' field needs to be moved from the '''participants''' #table to the '''teams''' table. It signifies the sub-directory which stores all the files submitted by this team. Intuitively it is clear that each team should ideally have only one #common copy of '''directory_num'''.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
Student-generated quizzes is the feature that students use for writing quizzes for the Wikipedia contribution assignment. In this project, you need to do refactoring and create functional tests for this feature:&lt;br /&gt;
*Refactoring:&lt;br /&gt;
**Refactor the valid_quiz method in questionnaires_controller. This method should not check the questions one by one, instead, it should create the quiz_question objects and quiz_choice objects, then call “quiz_question.valid?” to check whether the question is valid. &lt;br /&gt;
*Testing:&lt;br /&gt;
**The instructor can set up an assignment which supports quizzing feature by&lt;br /&gt;
***Checking the “has quiz” box&lt;br /&gt;
***Setting the # of question for each set of quiz&lt;br /&gt;
***Setting in which deadline can student reviewers take the quizzes&lt;br /&gt;
**Student authors can create quizzes and edit them:&lt;br /&gt;
***They can create quizzes on the “Your work” page&lt;br /&gt;
***They can edit the quiz questions.&lt;br /&gt;
***They can view the quiz questions.&lt;br /&gt;
***If the quiz question has something missing, the system will flash an error message, either:&lt;br /&gt;
****The name of quiz is missing.&lt;br /&gt;
****The question text is missing for one or more questions.&lt;br /&gt;
****The choices are missing for one or more questions.&lt;br /&gt;
****The correct answer(s) have not been provided.&lt;br /&gt;
**Student reviewers can take the quizzes on the work they have reviewed/they need to review&lt;br /&gt;
***They need to request the artifact to review first. If this artifact has a quiz associated, they can take the quiz in the round which quiz-taking is allowed.&lt;br /&gt;
***They can click “take quiz” then request quizzes to take.&lt;br /&gt;
***They can fill in their choices on the quizzes.&lt;br /&gt;
***After taking the quizzes, and submitting, they will see their grade on the “Take quizzes” page&lt;br /&gt;
***On the “take quizzes” page, they can see their question-by-question scores for finished quizzes by clicking “view”&lt;br /&gt;
Instructor can view the quiz questions and quiz scores on the tree display by clicking “view quiz questions” icon.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
#This project can be divided into four major work items:&lt;br /&gt;
#Moving the '''hyperlinks''' field from the '''participants''' table to the '''teams''' table. After this change, relevant changes are needed in the code to support this database change.&lt;br /&gt;
#Moving the '''directory_num''' field from the '''participants''' table to the '''teams''' table. After this change, relevant changes are needed in the code to support this database change.&lt;br /&gt;
#Moving the '''set_student_directory_num''' method from the '''participants_controller''' to the '''teams_controller'''. It just needs to check '''directory_num''' from the '''team''' table.&lt;br /&gt;
#Write test cases to verify student-submitted hyperlinks and files.&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
#Expertiza files that will be modified for each work item along with the description:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 50px;&amp;quot; | Work Item #&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 225px;&amp;quot; | Files to be modified&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 500px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || assignment_participant.rb&amp;lt;br&amp;gt;assignment_team.rb&amp;lt;br&amp;gt;db:participants table&amp;lt;br&amp;gt;db:teams table || - Create a new column '''hyperlinks''' in '''teams''' table&amp;lt;br&amp;gt;- Write db migration, move all the participants’ submitted hyperlinks from '''participants''' table into '''teams''' table. All duplicated hyperlinks have to be removed.&amp;lt;br&amp;gt;- Write db migration, remove the '''hyperlinks''' field from '''participants''' table.&amp;lt;br&amp;gt;- hyperlink-related methods in both '''assignment_participant.rb''' and '''assignment_team.rb''' have to be rewritten to make sure the new code works with the new db design.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || participants_controller.rb&amp;lt;br&amp;gt;teams_controller.rb&amp;lt;br&amp;gt;db:participants table&amp;lt;br&amp;gt;db:teams table || - Write db migration, move the '''directory_num''' field (also the content) to '''teams''' table.&amp;lt;br&amp;gt;- Move the '''set_student_directory_num''' from '''participant_controller''' to '''team_controller''', then refactor this method into smaller methods.&amp;lt;br&amp;gt;- This method no longer needs to test all the participants and see if any of them have '''directory_num''', instead, it just check the '''directory_num''' from '''teams''' table.&amp;lt;br&amp;gt;- Make change to the submitted-file-related code to make sure it works with the new design.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || New files to be added || - Write test cases to test student-submitted hyperlinks and files.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
Consider a simple use case where we need to retrieve the submitted hyperlinks and files corresponding to '''team_id''', say, '''23841'''. Since there is no existing correlation between teams and submitted content, we will first need to look up the '''participants''' in the team using the '''teams_users''' table. And then, using those user_id values one at a time, we need to look up the '''participants''' table.&lt;br /&gt;
&lt;br /&gt;
[[File:db.jpg]]&lt;br /&gt;
&lt;br /&gt;
Finally, we need to merge the results before displaying it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def hyperlinks&lt;br /&gt;
  links = Array.new&lt;br /&gt;
  self.participants.each { |team_member|&lt;br /&gt;
    links.concat(team_member.hyperlinks_array) if team_member.hyperlinks_array}&lt;br /&gt;
  links&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, it becomes a tedious 3-step process. It is evident from this example that the current design is inefficient.&lt;br /&gt;
&lt;br /&gt;
Instead, if the hyperlinks data were available in '''teams''' table, we could directly access all the submitted content for a team in one shot, making it much more streamlined.&lt;br /&gt;
&lt;br /&gt;
As a part of this change, we’ll have to move the following routines in '''assignment_participants.rb''', which deal hyperlink handling to '''assignment_team.rb'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Appends the hyperlink to a list that is stored in YAML format in the DB&lt;br /&gt;
  # @exception  If is hyperlink was already there&lt;br /&gt;
  #             If it is an invalid URL&lt;br /&gt;
  def submit_hyperlink(hyperlink)&lt;br /&gt;
    hyperlink.strip!&lt;br /&gt;
    raise &amp;quot;The hyperlink cannot be empty&amp;quot; if hyperlink.empty?&lt;br /&gt;
    url = URI.parse(hyperlink)&lt;br /&gt;
    # If not a valid URL, it will throw an exception&lt;br /&gt;
    Net::HTTP.start(url.host, url.port)&lt;br /&gt;
    hyperlinks = self.hyperlinks_array&lt;br /&gt;
    hyperlinks &amp;lt;&amp;lt; hyperlink&lt;br /&gt;
    self.submitted_hyperlinks = YAML::dump(hyperlinks)&lt;br /&gt;
    self.save&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Note: This method is not used yet. It is here in the case it will be&lt;br /&gt;
    needed.&lt;br /&gt;
  # @exception  If the index does not exist in the array&lt;br /&gt;
  def remove_hyperlink(hyperlink_to_delete)&lt;br /&gt;
    hyperlinks = self.hyperlinks_array&lt;br /&gt;
    hyperlinks.delete(hyperlink_to_delete)&lt;br /&gt;
    self.submitted_hyperlinks = YAML::dump(hyperlinks)&lt;br /&gt;
    self.save&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def hyperlinks&lt;br /&gt;
    team.try(:hyperlinks) || []&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def hyperlinks_array&lt;br /&gt;
    self.submitted_hyperlinks.blank? ? [] :YAML::load(self.submitted_hyperlinks)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar refactoring work needs to be done for the '''directory_num''' field as well.&lt;br /&gt;
Finally, the refactoring needs to be thoroughly tested by writing test cases for student-submitted hyperlinks and files by making sure that:&lt;br /&gt;
*the submitted hyperlinks and files are correctly displayed on the submitted content page.&lt;br /&gt;
*the reviewer can see the submitted content from the reviewees.&lt;br /&gt;
*the instructor can see the submitted content from the reviewees.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
'''Use Case 1:''' Submit hyperlink for an assignment by student.&lt;br /&gt;
 &lt;br /&gt;
'''Description:''' A student who is an assignment participant should be able to submit hyperlink on the “Your work” section of an assignment.&lt;br /&gt;
 &lt;br /&gt;
'''Preconditions:''' Student should be a participant for the assignment he is trying to submit the hyperlink.&lt;br /&gt;
 &lt;br /&gt;
'''Postconditions:''' The submitted hyperlink should be stored in the teams table of the database.&lt;br /&gt;
 &lt;br /&gt;
'''Success Scenario:'''&lt;br /&gt;
#The submitted hyperlink is visible every time the student views the “Your work” section for the Assignment.&lt;br /&gt;
#All other team members should be able to view the submitted hyperlink.&lt;br /&gt;
#A reviewer should be able to see the submitted hyperlink.&lt;br /&gt;
#An instructor should be able to see the submitted hyperlink.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Use Case 2:''' Submit file for an assignment by student.&lt;br /&gt;
 &lt;br /&gt;
'''Description:''' A student who is an assignment participant should be able to submit a file on the “Your work” section of an assignment.&lt;br /&gt;
 &lt;br /&gt;
'''Preconditions:''' Student should be a participant for the assignment he is trying to submit the file.&lt;br /&gt;
 &lt;br /&gt;
'''Postconditions:''' The directory_num field which stores the directory number of the directory storing all the submitted files for a team should be stored in the teams table of the database.&lt;br /&gt;
 &lt;br /&gt;
'''Success Scenario:'''&lt;br /&gt;
#The submitted file is visible every time the student views the “Your work” section for the Assignment.&lt;br /&gt;
#All other team members should be able to view the submitted file.&lt;br /&gt;
#A reviewer should be able to see the submitted file.&lt;br /&gt;
#An instructor should be able to see the submitted file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case 3:''' Delete hyperlink for an assignment by student.&lt;br /&gt;
 &lt;br /&gt;
'''Description:''' A student who is an assignment participant should be able to delete submitted hyperlink on the “Your work” section of an assignment.&lt;br /&gt;
 &lt;br /&gt;
'''Preconditions:''' Student should be a participant for the assignment he is trying to delete the hyperlink.&lt;br /&gt;
 &lt;br /&gt;
'''Postconditions:''' The deleted hyperlink should be removed from the teams table in DB.&lt;br /&gt;
 &lt;br /&gt;
'''Success Scenario:'''&lt;br /&gt;
#The deleted hyperlink should not be visible the next time the student clicks on “Your work” section.&lt;br /&gt;
#All other team members should not see the deleted hyperlink.&lt;br /&gt;
#A reviewer should not be able to see the deleted hyperlink.&lt;br /&gt;
#An instructor should not be able to see the deleted hyperlink.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Accomplishments =&lt;br /&gt;
&lt;br /&gt;
The project was divided into 4 categories:&lt;br /&gt;
# Database migrations&lt;br /&gt;
# Refactor ''submitted_hyperlink'' related methods&lt;br /&gt;
# Refactor ''directory_num'' related methods&lt;br /&gt;
# Testing&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We followed the steps listed below in the process of refactoring the submitted content controller:&lt;br /&gt;
&lt;br /&gt;
* Writing database migrations to move the ''submitted_hyperlinks'' and ''directory_num'' attributes from the Participants table to the Teams table.&lt;br /&gt;
* Rewriting ''submitted_hyperlinks'' related methods in the Participants model to read from and write to the Teams table.&lt;br /&gt;
* Modifying the corresponding views to read ''hyperlinks_array'' instead of ''hyperlinks''. ''hyperlinks_array'' stores the the submissions of all the team members of a team. &lt;br /&gt;
* Removing ''directory_num'' related methods from the participant model.&lt;br /&gt;
* Rewriting ''directory_num'' related methods in the team model.&lt;br /&gt;
* Rewriting the corresponding views to read ''directory_num'' from the teams table instead of the participants table.&lt;br /&gt;
* For testing, we first created fixtures for all required tables.&lt;br /&gt;
* We tested our changes by writing functional tests to test the SubmittedContentController.&lt;br /&gt;
* Our test suite included the following tests:&lt;br /&gt;
** Testing submission of a hyperlink by one student - Check the count of submmited hyperlinks, verify that the hyperlink is stored properly in the database and displayed correctly from the UI.&lt;br /&gt;
** Testing submission of two hyperlinks by two students in a team -  Check the count of submmited hyperlinks, verify that the hyperlink is stored properly in the database and displayed correctly from the UI.&lt;br /&gt;
** Testing submission of the same hyperlink by two students in a team - Check that the duplicate hyperlinks does not get stored.&lt;br /&gt;
** Testing deletion of a hyperlink - Check the count of submmited hyperlinks and the updated list is displayed correctly from the UI.&lt;br /&gt;
** Testing submission of one file by one student - Check the submission of a file and check the updated count of submitted files.&lt;br /&gt;
** Testing deletion of one file by one student - Check the deletion of a submitted file and check the updated count of submitted files.&lt;br /&gt;
** Testing submission of multiple files by multiple students - Check the submission of multiple files and check the updated count of submitted files.&lt;br /&gt;
** Testing deletion of multiple files by multiple students - Check the deletion of multiple submitted files and check the updated count of submitted files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We can conclusively say that, after refactoring the submitted content controller, the query time for retrieving submissions will improve significantly as they are stored together on a team-basis rather than for each participant.&lt;br /&gt;
&lt;br /&gt;
Video demo of our work can be found at https://www.youtube.com/watch?v=VHVWF_UKgOc&amp;amp;feature=youtu.be &amp;lt;br&amp;gt;&lt;br /&gt;
GitHub repository containing the refactoring changes can be found at https://github.com/nitinnagaraja/expertiza/ &amp;lt;br&amp;gt;&lt;br /&gt;
Link to the pull request to Expertiza is https://github.com/expertiza/expertiza/pull/629&lt;br /&gt;
&lt;br /&gt;
= Future Work =&lt;br /&gt;
A proposal for further improvement would be to possibly create a new '''submitted_content''' table in the database. This table could include attributes like '''user_id''', '''team_id''', '''can_submit''', '''hyperlink''', '''directory_num''', '''uploaded_at''', '''updated_at'''. This approach would resolve the existing hyperlinks issue and more importantly, aid in recording a history of the submitted hyperlinks. There could be a “Show previous submissions” view for a team. So, if ever there’s a scenario where a student or an instructor needs to revert or go back and check a previous submission, he/she can easily access it from this table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101427</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101427"/>
		<updated>2016-03-28T21:19:25Z</updated>

		<summary type="html">&lt;p&gt;Mxu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;space for final project design document.&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101426</id>
		<title>User:Mxu</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Mxu&amp;diff=101426"/>
		<updated>2016-03-28T21:14:56Z</updated>

		<summary type="html">&lt;p&gt;Mxu: mxuspace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;mxuspace&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Ewhorton&amp;diff=101014</id>
		<title>User:Ewhorton</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Ewhorton&amp;diff=101014"/>
		<updated>2016-03-21T22:13:45Z</updated>

		<summary type="html">&lt;p&gt;Mxu: /* Test Scenarios */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza''' is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. &amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza on GitHub]&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Our contribution to this project is a suite of functional tests for the assignment calibration function. These tests are designed to provide integration, regression, and acceptance testing by using automation technologies.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Expertiza has a feature called Calibration that can be turned on for an assignment. When this feature is enabled an expert, typically the instructor, can provide an expert review for the assignment artifacts. After students finish their own reviews they may compare their responses to the expert review. The instructor may also view calibration results to view the scores for the entire class.&lt;br /&gt;
&lt;br /&gt;
While this is a preexisting feature within Expertiza, there currently exist no tests for it. The goal of this project is to fully test the entire flow of the calibration feature using the '''RSpec''' and '''Capybara''' frameworks.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The moment a line of code is written it becomes legacy code in need of support. Test cases are used not only to ensure that code is operating properly, but also to ensure that it continues to do so after having been modified. An important aspect of this is acceptance testing to verify that the project meets customer requirements. Rather than performing these tests by hand, it is easier to combine an automated testing system like RSpec with a driver like Capybara which allows testing of an application's functionality from the outside by running in a  browser.&lt;br /&gt;
&lt;br /&gt;
===Flow of the calibration function===&lt;br /&gt;
A more detailed description of the calibration may be found [https://docs.google.com/document/d/1LcicJCUY0GHN1qzwRQPL9A1Nv89sVtNtxlADOzVQeBk/edit#heading=h.g4vilf87e3f0 here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before analyzing code, one must familiarize themselves with the steps involved in calibration on Expertiza. The steps involved are:&lt;br /&gt;
# Login with valid instructor username and password&lt;br /&gt;
# Click on &amp;quot;Assignment&amp;quot;&lt;br /&gt;
# Click on &amp;quot;New public assignment&amp;quot;&lt;br /&gt;
# Input all the information needed, check the “Calibrated peer-review for training?” box, click on Create&lt;br /&gt;
# Select the review rubric in “Rubrics” tab&lt;br /&gt;
# Go to “Due dates” tab, make sure that this assignment is currently in Review phase, also, make the submission allowed in review phase.&lt;br /&gt;
# Add a submitter to the assignment. This submitter will add documents to be reviewed. &lt;br /&gt;
# Go to the list of assignments, click “edit” icon of the assignment&lt;br /&gt;
# Go to the “Calibration” tab, click on the &amp;quot;Begin&amp;quot; link next to the student artifact for the expert review, and click “Submit Review”&lt;br /&gt;
# Go to “Review strategy” tab, select Instructor-Selected as review strategy, then select the radio button “Set number of reviews done by each student” and input the number of reviews&lt;br /&gt;
# Login with valid student username and password who is a reviewer for the assignment&lt;br /&gt;
# Click on the assignment&lt;br /&gt;
# Click on “Other’s work”&lt;br /&gt;
# After clicking “Begin”, Expertiza will display peer-review page&lt;br /&gt;
# Click “Submit Review”&lt;br /&gt;
# Click “Show calibration results” to see expert review&lt;br /&gt;
# Login with valid instructor username and password&lt;br /&gt;
# Click on &amp;quot;Assignment&amp;quot;&lt;br /&gt;
# Click on the “view review report” to see the calibration report&lt;br /&gt;
&lt;br /&gt;
== Creating the Tests==&lt;br /&gt;
&lt;br /&gt;
===Gems involved===&lt;br /&gt;
* rspec-rails&lt;br /&gt;
* capybara&lt;br /&gt;
* selenium-webdriver&lt;br /&gt;
* factory_girl_rails&lt;br /&gt;
&lt;br /&gt;
====Rspec-rails====&lt;br /&gt;
Rspec-rails is a testing framework for Rails 3.x and 4.x. It supports testing of models, controllers, requests, features, views and routes. It does this by accepting test scenarios called specs.&amp;lt;ref&amp;gt;[https://github.com/rspec/rspec-rails rpsce-rails on GitHub]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Capybara====&lt;br /&gt;
Capybara helps you test web applications by simulating how a real user would interact with your application. It comes with built in Rack::Test and Selenium support. WebKit is supported through an external gem.&amp;lt;ref&amp;gt;[https://github.com/jnicklas/capybara capybara on GitHub]&amp;lt;/ref&amp;gt; To control the environments in which the scenarios are run, it provides before and after hooks.&amp;lt;ref&amp;gt;[https://www.relishapp.com/rspec/rspec-core/v/2-2/docs/hooks/before-and-after-hooks Before and after hooks]&amp;lt;/ref&amp;gt;&lt;br /&gt;
*before(:each) blocks are run before each scenario in the group&lt;br /&gt;
*before(:all) blocks are run once before all of the scenarios in the group&lt;br /&gt;
*after(:each) blocks are run after each scenario in the group &lt;br /&gt;
*after(:all) blocks are run once after all of the scenarios in the group&lt;br /&gt;
&lt;br /&gt;
====Selenium====&lt;br /&gt;
Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It is the default javascript webdriver for Capybara.&lt;br /&gt;
&lt;br /&gt;
====Factory Girl====&lt;br /&gt;
Factory Girl &amp;lt;ref&amp;gt;[https://github.com/thoughtbot/factory_girl Factory Girl]&amp;lt;/ref&amp;gt; is a factory gem meant for use in testing. It allows for easy and highly configurable on-the-fly model creation that allows tests to request a new instance of a model template and optionally override any of the defaults.&lt;br /&gt;
&lt;br /&gt;
===Test Scenarios===&lt;br /&gt;
The following scenarios were considered when writing tests for the calibration use case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
An instructor creates a calibrated assignment&lt;br /&gt;
:An instructor authenticates to expertiza&lt;br /&gt;
:They select to add a new assignment&lt;br /&gt;
:While creating the assignment, the instructor selects to turn calibration on&lt;br /&gt;
:After creating the assignment the instructor sees a calibration tab on the assignment page&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
An instructor edits the calibration configuration&lt;br /&gt;
:An instructor authenticates to expertiza&lt;br /&gt;
:They select to edit an existing assignment&lt;br /&gt;
:The instructor clicks on the calibration tab and sees it is populated with submitted artifacts&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
An expert submits a review for calibration&lt;br /&gt;
:An expert has been added to an assignment to provide the expert review&lt;br /&gt;
:The expert authenticates to Expertiza and begins the expert review&lt;br /&gt;
:The expert finishes and submits the review&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
Student Calibration&lt;br /&gt;
:A student has submitted a response for the assignment and it is currently in the review phase&lt;br /&gt;
:The student authenticates to Expertiza and chooses to view calibration for the assignment&lt;br /&gt;
:The student sees their own answers compared to the expert review.&lt;br /&gt;
:Answers that match are marked green, and answers that differ are marked red.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
Instructor Calibration&lt;br /&gt;
:It is currently the review phase for an assignment&lt;br /&gt;
:An instructor authenticates to Expertiza and chooses to view calibration&lt;br /&gt;
:The instructor can see the student and instructor responses for the assignment&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Code=== &lt;br /&gt;
Code for the tests exists in two locations&lt;br /&gt;
* [https://github.com/EricHorton/expertiza/blob/master/spec/factories/factories.rb Factory]&lt;br /&gt;
* [https://github.com/EricHorton/expertiza/blob/master/spec/features/calibration_spec.rb CalibrationSpec]&lt;br /&gt;
&lt;br /&gt;
====Design Pattern====&lt;br /&gt;
We attempted to follow good OO practices by implementing the CRUD&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Create,_read,_update_and_delete Create Read Update and Delete]&amp;lt;/ref&amp;gt; design pattern using Factory Girl and Capybara.&lt;br /&gt;
&lt;br /&gt;
====Structure====&lt;br /&gt;
Our specs follow the standard RSpec describe/it syntax. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
describe 'Some Feature' do&lt;br /&gt;
:before :each do&lt;br /&gt;
&lt;br /&gt;
:end&lt;br /&gt;
&lt;br /&gt;
:it 'should do x' do&lt;br /&gt;
::expect(true).to be(true)&lt;br /&gt;
:end&lt;br /&gt;
&lt;br /&gt;
:it 'should not do y' do&lt;br /&gt;
::expect(true).to be(false)&lt;br /&gt;
:end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running  the tests==&lt;br /&gt;
&lt;br /&gt;
The following are steps required to run the test&lt;br /&gt;
&lt;br /&gt;
* Clone the repository in a new directory&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12.5px; width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/EricHorton/expertiza&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create and then prepare the test database&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12.5px; width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
$ cd expertiza&lt;br /&gt;
$ rake db:test:prepare&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Type the command to run tests for assignment submission&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12.5px; width:750px; margin-top:10px; border:1px solid lightgrey; background:ivory; color:black; padding-left:15px; padding-top:15px; padding-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
rspec spec/features/calibration_spec.rb --order default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Results==&lt;br /&gt;
&lt;br /&gt;
The following screenshot shows the result of the rspec command.&lt;br /&gt;
&lt;br /&gt;
[[File:calibration-tests.png|Calibration Tests]]&lt;br /&gt;
 &lt;br /&gt;
=== Test Analysis ===&lt;br /&gt;
&lt;br /&gt;
* All test cases are green, which means there are no currently failing tests.&lt;br /&gt;
* Test cases are run through the Selenium driver on Firefox for javascript support. Because they are full acceptance tests they are slower than regular unit tests, but still beat evaluating the feature by hand.&lt;br /&gt;
* Tests are independent and repeatable. Database changes are made within a transaction that is rolled back after tests complete.&lt;br /&gt;
&lt;br /&gt;
==Project Resources==&lt;br /&gt;
# [https://github.com/EricHorton/expertiza GitHub Fork]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references&amp;gt;&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
* [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;/div&gt;</summary>
		<author><name>Mxu</name></author>
	</entry>
</feed>