Merge remote-tracking branch 'origin/release' into merge-release-to-master

This commit is contained in:
Adam Palay
2015-05-29 19:47:12 -04:00
13 changed files with 52 additions and 110 deletions

View File

@@ -509,7 +509,7 @@ describe 'MarkdownEditingDescriptor', ->
[Explanation]
""")
expect(data).toEqual("""<problem>
<legend>Who lead the civil right movement in the United States of America?</legend>
<p>Who lead the civil right movement in the United States of America?</p>
<stringresponse answer="w*.?s*Luther Kings*.*" type="ci regexp" >
<textline label="Who lead the civil right movement in the United States of America?" size="20"/>
</stringresponse>
@@ -541,14 +541,14 @@ describe 'MarkdownEditingDescriptor', ->
expect(data).toEqual("""<problem>
<p>France is a country in Europe.</p>
<legend>What is the capital of France?</legend>
<p>What is the capital of France?</p>
<stringresponse answer="Paris" type="ci" >
<textline label="What is the capital of France?" size="20"/>
</stringresponse>
<p>Germany is a country in Europe, too.</p>
<legend>What is the capital of Germany?</legend>
<p>What is the capital of Germany?</p>
<multiplechoiceresponse>
<choicegroup label="What is the capital of Germany?" type="MultipleChoice">
<choice correct="false">Bonn</choice>
@@ -574,12 +574,11 @@ describe 'MarkdownEditingDescriptor', ->
( ) Hamburg
(x) Berlin
( ) Donut
""")
expect(data).toEqual("""<problem>
<p>France is a country in Europe.</p>
<legend>What is the capital of France?</legend>
<p>What is the capital of France?</p>
<stringresponse answer="Paris" type="ci" >
<textline label="What is the capital of France?" size="20"/>
</stringresponse>
@@ -595,8 +594,8 @@ describe 'MarkdownEditingDescriptor', ->
<choice correct="false">Donut</choice>
</choicegroup>
</multiplechoiceresponse>
</problem>""")
it 'tests malformed labels', ->
data = MarkdownEditingDescriptor.markdownToXml("""
@@ -605,7 +604,7 @@ describe 'MarkdownEditingDescriptor', ->
>>What is the capital of France?<
= Paris
>>What is the capital of <<Germany?<<
blah>>What is the capital of <<Germany?<<
( ) Bonn
( ) Hamburg
(x) Berlin
@@ -619,7 +618,7 @@ describe 'MarkdownEditingDescriptor', ->
<textline size="20"/>
</stringresponse>
<legend>What is the capital of Germany?</legend>
<p>blahWhat is the capital of Germany?</p>
<multiplechoiceresponse>
<choicegroup label="What is the capital of &lt;&lt;Germany?" type="MultipleChoice">
<choice correct="false">Bonn</choice>
@@ -637,7 +636,7 @@ describe 'MarkdownEditingDescriptor', ->
= 3.14159 +- .02
""")
expect(data).toEqual("""<problem>
<legend>Enter the numerical value of Pi:</legend>
<p>Enter the numerical value of Pi:</p>
<numericalresponse answer="3.14159">
<responseparam type="tolerance" default=".02" />
<formulaequationinput label="Enter the numerical value of Pi:" />
@@ -651,7 +650,7 @@ describe 'MarkdownEditingDescriptor', ->
= Paris
""")
expect(data).toEqual("""<problem>
<legend>What is the "capital" of France & the 'best' > place < to live"?</legend>
<p>What is the "capital" of France & the 'best' > place < to live"?</p>
<stringresponse answer="Paris" type="ci" >
<textline label="What is the &quot;capital&quot; of France &amp; the &apos;best&apos; &gt; place &lt; to live&quot;?" size="20"/>
</stringresponse>

View File

@@ -368,9 +368,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&apos;');
line = line.replace(/>>/g, '<legend>');
line = line.replace(/<+$/g, '</legend>');
line = line.replace(/<</g, '');
line = line.replace(/>>|<</g, '');
} else if (line.match(/<\w+response/) && didinput && curlabel == prevlabel) {
// reset label to prevent gobbling up previous one (if multiple questions)
curlabel = '';

View File

@@ -16,7 +16,6 @@ metadata:
[x] French
[ ] Hungarian
Note: Make sure you select all of the correct options—there may be more than one!
[explanation]
@@ -29,16 +28,18 @@ data: |
<p>When you add the component, be sure to select <strong>Settings</strong>
to specify a <strong>Display Name</strong> and other values that apply.</p>
<p>You can use the following example problem as a model.</p>
<legend>The following languages are in the Indo-European family:</legend>
<choiceresponse>
<checkboxgroup direction="vertical">
<choice correct="true" name="urdu">Urdu</choice>
<choice correct="false" name="finnish">Finnish</choice>
<choice correct="true" name="marathi">Marathi</choice>
<choice correct="true" name="french">French</choice>
<choice correct="false" name="hungarian">Hungarian</choice>
</checkboxgroup>
</choiceresponse>
<fieldset>
<legend>The following languages are in the Indo-European family:</legend>
<choiceresponse>
<checkboxgroup direction="vertical">
<choice correct="true" name="urdu">Urdu</choice>
<choice correct="false" name="finnish">Finnish</choice>
<choice correct="true" name="marathi">Marathi</choice>
<choice correct="true" name="french">French</choice>
<choice correct="false" name="hungarian">Hungarian</choice>
</checkboxgroup>
</choiceresponse>
</fieldset>
<p><strong>Note</strong>: Make sure you select all of the correct options—there may be more than one!</p>
<solution>
<div class="detailed-solution">

View File

@@ -15,7 +15,6 @@ metadata:
(x) Indonesia
( ) Russia
[explanation]
According to September 2014 estimates:
The population of Indonesia is approximately 250 million.
@@ -31,6 +30,7 @@ data: |
<p>When you add the problem, be sure to select <strong>Settings</strong>
to specify a <strong>Display Name</strong> and other values that apply.</p>
<p>You can use the following example problem as a model.</p>
<fieldset>
<legend>Which of the following countries has the largest population?</legend>
<multiplechoiceresponse>
<choicegroup type="MultipleChoice">
@@ -40,6 +40,7 @@ data: |
<choice correct="false" name="russia">Russia</choice>
</choicegroup>
</multiplechoiceresponse>
</fieldset>
<solution>
<div class="detailed-solution">
<p>Explanation</p>

View File

@@ -14,12 +14,11 @@ metadata:
>>How many miles away from Earth is the sun? Use scientific notation to answer.<<
= 9.3*10^6
or= 9.296*10^6
or= 9.296*10^6
>>The square of what number is -100?<<
= 10*i
= 10*i
[explanation]
The sun is 93,000,000, or 9.3*10^6, miles away from Earth.

View File

@@ -14,7 +14,6 @@ metadata:
[[(India), Spain, China, Bermuda]]
[explanation]
India became an independent nation on August 15, 1947.
[explanation]

View File

@@ -14,7 +14,7 @@ metadata:
= Nanjing Higher Normal Institute
or= National Central University
or= Nanjing University
[explanation]
Nanjing Higher Normal Institute first admitted female students in 1920.
[explanation]