returnexpect($('.notification-gentle-alert .notification-message').text()).toEqual("The grading process is still running. Refresh the page to see updates.");
expect($('.notification-gentle-alert .notification-message').text()).toEqual("The grading process is still running. Refresh the page to see updates.");
it('converts numerical response to xml',function(){
it('converts numerical response to xml',function(){
...
@@ -169,7 +164,7 @@ Although you can get an exact value by typing 502*9 into a calculator, the resul
...
@@ -169,7 +164,7 @@ Although you can get an exact value by typing 502*9 into a calculator, the resul
If you look at your hand, you can count that you have five fingers.
If you look at your hand, you can count that you have five fingers.
[Explanation]\
[Explanation]\
`);
`);
returnexpect(data).toXMLEqual(`<problem>
expect(data).toXMLEqual(`<problem>
<p>A numerical response problem accepts a line of text input from the student, and evaluates the input for correctness based on its numerical value.</p>
<p>A numerical response problem accepts a line of text input from the student, and evaluates the input for correctness based on its numerical value.</p>
<p>The answer is correct if it is within a specified numerical tolerance of the expected answer.</p>
<p>The answer is correct if it is within a specified numerical tolerance of the expected answer.</p>
<p>Enter the numerical value of Pi:</p>
<p>Enter the numerical value of Pi:</p>
...
@@ -215,7 +210,7 @@ If you look at your hand, you can count that you have five fingers.
...
@@ -215,7 +210,7 @@ If you look at your hand, you can count that you have five fingers.
Enter 0 with a tolerance:
Enter 0 with a tolerance:
= 0 +- .02\
= 0 +- .02\
`);
`);
returnexpect(data).toXMLEqual(`<problem>
expect(data).toXMLEqual(`<problem>
<numericalresponse answer="0">
<numericalresponse answer="0">
<p>Enter 0 with a tolerance:</p>
<p>Enter 0 with a tolerance:</p>
<responseparam type="tolerance" default=".02"/>
<responseparam type="tolerance" default=".02"/>
...
@@ -231,7 +226,7 @@ Enter 1 with a tolerance:
...
@@ -231,7 +226,7 @@ Enter 1 with a tolerance:
= 1 +- .02
= 1 +- .02
or= 2\
or= 2\
`);
`);
returnexpect(data).toXMLEqual(`<problem>
expect(data).toXMLEqual(`<problem>
<numericalresponse answer="1">
<numericalresponse answer="1">
<p>Enter 1 with a tolerance:</p>
<p>Enter 1 with a tolerance:</p>
<responseparam type="tolerance" default=".02"/>
<responseparam type="tolerance" default=".02"/>
...
@@ -249,7 +244,7 @@ Enter 1 with a tolerance:
...
@@ -249,7 +244,7 @@ Enter 1 with a tolerance:
or= 2
or= 2
or= 3\
or= 3\
`);
`);
returnexpect(data).toXMLEqual(`<problem>
expect(data).toXMLEqual(`<problem>
<numericalresponse answer="1">
<numericalresponse answer="1">
<p>Enter 1 with a tolerance:</p>
<p>Enter 1 with a tolerance:</p>
<responseparam type="tolerance" default=".02"/>
<responseparam type="tolerance" default=".02"/>
...
@@ -271,7 +266,7 @@ or= [4,6]
...
@@ -271,7 +266,7 @@ or= [4,6]
or= ABC
or= ABC
or= 7\
or= 7\
`);
`);
returnexpect(data).toXMLEqual(`<problem>
expect(data).toXMLEqual(`<problem>
<numericalresponse answer="1">
<numericalresponse answer="1">
<p>Enter 1 with a tolerance:</p>
<p>Enter 1 with a tolerance:</p>
<responseparam type="tolerance" default=".02"/>
<responseparam type="tolerance" default=".02"/>
...
@@ -289,7 +284,7 @@ Enter 1 with a tolerance:
...
@@ -289,7 +284,7 @@ Enter 1 with a tolerance:
= 100 +- .02 {{ main feedback }}
= 100 +- .02 {{ main feedback }}
or= 10 {{ additional feedback }}\
or= 10 {{ additional feedback }}\
`);
`);
returnexpect(data).toXMLEqual(`<problem>
expect(data).toXMLEqual(`<problem>
<numericalresponse answer="100">
<numericalresponse answer="100">
<p>Enter 1 with a tolerance:</p>
<p>Enter 1 with a tolerance:</p>
<responseparam type="tolerance" default=".02"/>
<responseparam type="tolerance" default=".02"/>
...
@@ -320,7 +315,7 @@ One of the main elements that goes into a good multiple choice question is the e
...
@@ -320,7 +315,7 @@ One of the main elements that goes into a good multiple choice question is the e
The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and energy-intensive spinning disks.
The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and energy-intensive spinning disks.
[Explanation]\
[Explanation]\
`);
`);
returnexpect(data).toXMLEqual(`<problem>
expect(data).toXMLEqual(`<problem>
<multiplechoiceresponse>
<multiplechoiceresponse>
<p>A multiple choice problem presents radio buttons for student input. Students can only select a single option presented. Multiple Choice questions have been the subject of many areas of research due to the early invention and adoption of bubble sheets.</p>
<p>A multiple choice problem presents radio buttons for student input. Students can only select a single option presented. Multiple Choice questions have been the subject of many areas of research due to the early invention and adoption of bubble sheets.</p>
<p>One of the main elements that goes into a good multiple choice question is the existence of good distractors. That is, each of the alternate responses presented to the student should be the result of a plausible mistake that a student might make.</p>
<p>One of the main elements that goes into a good multiple choice question is the existence of good distractors. That is, each of the alternate responses presented to the student should be the result of a plausible mistake that a student might make.</p>
...
@@ -359,7 +354,7 @@ What Apple device competed with the portable CD player?
...
@@ -359,7 +354,7 @@ What Apple device competed with the portable CD player?
The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and energy-intensive spinning disks.
The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and energy-intensive spinning disks.
[Explanation]\
[Explanation]\
`);
`);
returnexpect(data).toXMLEqual(`\
expect(data).toXMLEqual(`\
<problem>
<problem>
<multiplechoiceresponse>
<multiplechoiceresponse>
<p>A multiple choice problem presents radio buttons for student input. Students can only select a single option presented. Multiple Choice questions have been the subject of many areas of research due to the early invention and adoption of bubble sheets.</p>
<p>A multiple choice problem presents radio buttons for student input. Students can only select a single option presented. Multiple Choice questions have been the subject of many areas of research due to the early invention and adoption of bubble sheets.</p>
...
@@ -400,7 +395,7 @@ testa
...
@@ -400,7 +395,7 @@ testa
When the student is ready, the explanation appears.
When the student is ready, the explanation appears.
[Explanation]\
[Explanation]\
`);
`);
returnexpect(data).toXMLEqual(`\
expect(data).toXMLEqual(`\
<problem>
<problem>
<p>bleh</p>
<p>bleh</p>
<multiplechoiceresponse>
<multiplechoiceresponse>
...
@@ -447,7 +442,7 @@ Translation between Option Response and __________ is extremely straightforward:
...
@@ -447,7 +442,7 @@ Translation between Option Response and __________ is extremely straightforward:
Multiple Choice also allows students to select from a variety of pre-written responses, although the format makes it easier for students to read very long response options. Optionresponse also differs slightly because students are more likely to think of an answer and then search for it rather than relying purely on recognition to answer the question.
Multiple Choice also allows students to select from a variety of pre-written responses, although the format makes it easier for students to read very long response options. Optionresponse also differs slightly because students are more likely to think of an answer and then search for it rather than relying purely on recognition to answer the question.
[Explanation]\
[Explanation]\
`);
`);
returnexpect(data).toXMLEqual(`\
expect(data).toXMLEqual(`\
<problem>
<problem>
<optionresponse>
<optionresponse>
<p>OptionResponse gives a limited set of options for students to respond with, and presents those options in a format that encourages them to search for a specific answer rather than being immediately presented with options from which to recognize the correct answer.</p>
<p>OptionResponse gives a limited set of options for students to respond with, and presents those options in a format that encourages them to search for a specific answer rather than being immediately presented with options from which to recognize the correct answer.</p>
...
@@ -475,7 +470,7 @@ Which US state has Lansing as its capital?
...
@@ -475,7 +470,7 @@ Which US state has Lansing as its capital?
Lansing is the capital of Michigan, although it is not Michgan's largest city, or even the seat of the county in which it resides.
Lansing is the capital of Michigan, although it is not Michgan's largest city, or even the seat of the county in which it resides.
[Explanation]\
[Explanation]\
`);
`);
returnexpect(data).toXMLEqual(`\
expect(data).toXMLEqual(`\
<problem>
<problem>
<stringresponse answer="Michigan" type="ci">
<stringresponse answer="Michigan" type="ci">
<p>A string response problem accepts a line of text input from the student, and evaluates the input for correctness based on an expected answer within each input box.</p>
<p>A string response problem accepts a line of text input from the student, and evaluates the input for correctness based on an expected answer within each input box.</p>
...
@@ -499,7 +494,7 @@ Lansing is the capital of Michigan, although it is not Michgan's largest city, o
...
@@ -499,7 +494,7 @@ Lansing is the capital of Michigan, although it is not Michgan's largest city, o