Commit 81d86eea by Chris Rodriguez

Changing H2 to H3 in problem templates

parent 092eae9f
...@@ -336,9 +336,9 @@ ...@@ -336,9 +336,9 @@
<section id="problem_i4x-AndyA-ABT101-problem-46d2b65d793549e2876729d55df9a2cb" class="problems-wrapper" data-problem-id="i4x://AndyA/ABT101/problem/46d2b65d793549e2876729d55df9a2cb" data-url="/preview/xblock/i4x:;_;_AndyA;_ABT101;_problem;_46d2b65d793549e2876729d55df9a2cb/handler/xmodule_handler" data-progress_status="none" data-progress_detail="0/1"> <section id="problem_i4x-AndyA-ABT101-problem-46d2b65d793549e2876729d55df9a2cb" class="problems-wrapper" data-problem-id="i4x://AndyA/ABT101/problem/46d2b65d793549e2876729d55df9a2cb" data-url="/preview/xblock/i4x:;_;_AndyA;_ABT101;_problem;_46d2b65d793549e2876729d55df9a2cb/handler/xmodule_handler" data-progress_status="none" data-progress_detail="0/1">
<h2 class="problem-header"> <h3 class="problem-header">
Multiple Choice Multiple Choice
</h2> </h3>
<section class="problem-progress">(1 point possible)</section> <section class="problem-progress">(1 point possible)</section>
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<section id="problem_i4x-Me-19_002-problem-Numerical_Input" class="problems-wrapper" data-problem-id="i4x://Me/19.002/problem/Numerical_Input" data-url="/courses/Me/19.002/Test/modx/i4x://Me/19.002/problem/Numerical_Input" data-progress_status="done" data-progress_detail="1/1"> <section id="problem_i4x-Me-19_002-problem-Numerical_Input" class="problems-wrapper" data-problem-id="i4x://Me/19.002/problem/Numerical_Input" data-url="/courses/Me/19.002/Test/modx/i4x://Me/19.002/problem/Numerical_Input" data-progress_status="done" data-progress_detail="1/1">
<h2 class="problem-header"> <h3 class="problem-header">
Numerical Input Numerical Input
</h2> </h3>
<section class="problem-progress">(1/1 point)</section> <section class="problem-progress">(1/1 point)</section>
......
<h2 class="problem-header">Custom Javascript Display and Grading</h2> <h3 class="problem-header">Custom Javascript Display and Grading</h3>
<div class="problem"> <div class="problem">
<div> <div>
......
<h2 class="problem-header">Problem Header</h2> <h3 class="problem-header">Problem Header</h3>
<div class='problem-progress'></div> <div class='problem-progress'></div>
......
<h2 class="problem-header">Problem Header</h2> <h3 class="problem-header">Problem Header</h3>
<div class='problem-progress'></div> <div class='problem-progress'></div>
......
...@@ -264,8 +264,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -264,8 +264,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
// ]] // ]]
// <optionresponse> // <optionresponse>
// <optioninput> // <optioninput>
// <option correct="True">AAA<optionhint label="Good Job">Yes, multiple choice is the right answer.</optionhint> // <option correct="True">AAA<optionhint label="Good Job">Yes, multiple choice is the right answer.</optionhint>
// Note: part of the option-response syntax looks like multiple-choice, so it must be processed first. // Note: part of the option-response syntax looks like multiple-choice, so it must be processed first.
xml = xml.replace(/\[\[((.|\n)+?)\]\]/g, function(match, group1) { xml = xml.replace(/\[\[((.|\n)+?)\]\]/g, function(match, group1) {
// decide if this is old style or new style // decide if this is old style or new style
if (match.indexOf('\n') == -1) { // OLD style, [[ .... ]] on one line if (match.indexOf('\n') == -1) { // OLD style, [[ .... ]] on one line
...@@ -355,14 +355,14 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -355,14 +355,14 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
groupString += ' <checkboxgroup>\n'; groupString += ' <checkboxgroup>\n';
options = match.split('\n'); options = match.split('\n');
endHints = ''; // save these up to emit at the end endHints = ''; // save these up to emit at the end
for (i = 0; i < options.length; i += 1) { for (i = 0; i < options.length; i += 1) {
if(options[i].trim().length > 0) { if(options[i].trim().length > 0) {
// detect the {{ ((A*B)) ...}} case first // detect the {{ ((A*B)) ...}} case first
// emits: <compoundhint value="A*B">AB hint</compoundhint> // emits: <compoundhint value="A*B">AB hint</compoundhint>
var abhint = /^\s*{{\s*\(\((.*?)\)\)(.*?)}}/.exec(options[i]); var abhint = /^\s*{{\s*\(\((.*?)\)\)(.*?)}}/.exec(options[i]);
if (abhint) { if (abhint) {
// lone case of hint text processing outside of extractHint, since syntax here is unique // lone case of hint text processing outside of extractHint, since syntax here is unique
...@@ -389,7 +389,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -389,7 +389,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
if (select) { if (select) {
hints += '\n <choicehint selected="false">' + select[2].trim() + '</choicehint>'; hints += '\n <choicehint selected="false">' + select[2].trim() + '</choicehint>';
} }
// Blank out the original text only if the specific "selected" syntax is found // Blank out the original text only if the specific "selected" syntax is found
// That way, if the user types it wrong, at least they can see it's not processed. // That way, if the user types it wrong, at least they can see it's not processed.
if (hints) { if (hints) {
...@@ -502,16 +502,16 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -502,16 +502,16 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
return processNumericalResponse(answersList[0]) || processStringResponse(answersList); return processNumericalResponse(answersList[0]) || processStringResponse(answersList);
}); });
// replace explanations // replace explanations
xml = xml.replace(/\[explanation\]\n?([^\]]*)\[\/?explanation\]/gmi, function(match, p1) { xml = xml.replace(/\[explanation\]\n?([^\]]*)\[\/?explanation\]/gmi, function(match, p1) {
var selectString = '<solution>\n<div class="detailed-solution">\nExplanation\n\n' + p1 + '\n</div>\n</solution>'; var selectString = '<solution>\n<div class="detailed-solution">\nExplanation\n\n' + p1 + '\n</div>\n</solution>';
return selectString; return selectString;
}); });
// replace labels // replace labels
// looks for >>arbitrary text<< and inserts it into the label attribute of the input type directly below the text. // looks for >>arbitrary text<< and inserts it into the label attribute of the input type directly below the text.
var split = xml.split('\n'); var split = xml.split('\n');
var new_xml = []; var new_xml = [];
var line, i, curlabel, prevlabel = ''; var line, i, curlabel, prevlabel = '';
...@@ -579,4 +579,3 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -579,4 +579,3 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
return xml; return xml;
}` }`
return toXml markdown return toXml markdown
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
metadata: metadata:
display_name: IFrame Tool display_name: IFrame Tool
data: | data: |
<h2>IFrame Tool</h2> <h3>IFrame Tool</h3>
<p>Use the IFrame tool to embed an exercise or tool from any web site into your course content. For example, the tool below allows learners to experiment with how the shape of a triangle affects a line that is derived from the triangle.</p> <p>Use the IFrame tool to embed an exercise or tool from any web site into your course content. For example, the tool below allows learners to experiment with how the shape of a triangle affects a line that is derived from the triangle.</p>
<p>Exercises in an IFrame are not graded. To embed graded exercises, use a Custom JavaScript Problem.</p> <p>Exercises in an IFrame are not graded. To embed graded exercises, use a Custom JavaScript Problem.</p>
<p>The following code is the HTML format required to use the IFrame tool. For the IFrame in this template, you must replace the values in <i>italics</i>.</p> <p>The following code is the HTML format required to use the IFrame tool. For the IFrame in this template, you must replace the values in <i>italics</i>.</p>
<pre> <pre>
&lt;iframe title="<i>The required title of the tool</i>" &lt;iframe title="<i>The required title of the tool</i>"
src="<i>The URL of the tool, starting with https://</i>"&gt; src="<i>The URL of the tool, starting with https://</i>"&gt;
<i>Message displayed when the browser does not support IFrames.</i> <i>Message displayed when the browser does not support IFrames.</i>
&lt;/iframe&gt; &lt;/iframe&gt;
...@@ -21,7 +21,7 @@ data: | ...@@ -21,7 +21,7 @@ data: |
<p><strong>Note</strong>: The URL must start with <strong>https</strong> instead of http, to ensure that the tool appears in all browsers that support IFrames.</p></li> <p><strong>Note</strong>: The URL must start with <strong>https</strong> instead of http, to ensure that the tool appears in all browsers that support IFrames.</p></li>
<li>Replace the value of the <strong>title</strong> attribute with the title of the tool. You <strong>must</strong> include the title to provide an accessible label.</li> <li>Replace the value of the <strong>title</strong> attribute with the title of the tool. You <strong>must</strong> include the title to provide an accessible label.</li>
<li>Replace other IFrame attributes as needed. See <a href="http://www.w3.org/wiki/HTML/Elements/iframe" target="_blank">the IFrame specification</a> for more information.</li> <li>Replace other IFrame attributes as needed. See <a href="http://www.w3.org/wiki/HTML/Elements/iframe" target="_blank">the IFrame specification</a> for more information.</li>
<li>Optionally, replace the text between the opening and closing <strong>iframe</strong> tags. <li>Optionally, replace the text between the opening and closing <strong>iframe</strong> tags.
<pre>Your browser does not support IFrames.</pre> <pre>Your browser does not support IFrames.</pre>
<p>A learner sees this text if the browser does not support IFrames.</p> <p>A learner sees this text if the browser does not support IFrames.</p>
</li> </li>
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
metadata: metadata:
display_name: Full Screen Image Tool display_name: Full Screen Image Tool
data: | data: |
<h2>Full Screen Image Tool</h2> <h3>Full Screen Image Tool</h3>
<p>Use the Full Screen Image tool to allow learners to open and zoom in on a larger version of an image in your course.</p> <p>Use the Full Screen Image tool to allow learners to open and zoom in on a larger version of an image in your course.</p>
<p>With the Full Screen Image tool, learners can see the image's details as well as its context within the unit.</p> <p>With the Full Screen Image tool, learners can see the image's details as well as its context within the unit.</p>
<p>To enable users to view the larger image, you wrap the smaller image in a link to the larger version of the image.</p> <p>To enable users to view the larger image, you wrap the smaller image in a link to the larger version of the image.</p>
<p>The following HTML code shows the format required to use the Full Screen Image tool. For the example in this template, you must replace the values in <i>italics</i>.</p> <p>The following HTML code shows the format required to use the Full Screen Image tool. For the example in this template, you must replace the values in <i>italics</i>.</p>
<pre> <pre>
&lt;a href="<i>Path to full screen image</i>" class="modal-content"&gt; &lt;a href="<i>Path to full screen image</i>" class="modal-content"&gt;
&lt;img alt="<i>Text for screen readers</i>" &lt;img alt="<i>Text for screen readers</i>"
src="<i>Path to image to include in unit page</i>"/&gt; src="<i>Path to image to include in unit page</i>"/&gt;
&lt;/a&gt; &lt;/a&gt;
</pre> </pre>
...@@ -21,4 +21,4 @@ data: | ...@@ -21,4 +21,4 @@ data: |
</ol> </ol>
<p><strong>Note</strong>: Test viewing the image in full screen mode in the LMS; you cannot view it in full screen from within Studio.</p> <p><strong>Note</strong>: Test viewing the image in full screen mode in the LMS; you cannot view it in full screen from within Studio.</p>
<a href="http://static.class.stanford.edu/stanford-hills-big.jpg" class="modal-content"><img alt="An image of the Stanford Hills. Select the image to open it in full screen mode." src="http://static.class.stanford.edu/stanford-hills-small.jpg" /></a> <a href="http://static.class.stanford.edu/stanford-hills-big.jpg" class="modal-content"><img alt="An image of the Stanford Hills. Select the image to open it in full screen mode." src="http://static.class.stanford.edu/stanford-hills-small.jpg" /></a>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
metadata: metadata:
display_name: Zooming Image Tool display_name: Zooming Image Tool
data: | data: |
<h2>Zooming Image Tool</h2> <h3>Zooming Image Tool</h3>
<p>Use the Zooming Image Tool to enable learners to see details of large, complex images.</p> <p>Use the Zooming Image Tool to enable learners to see details of large, complex images.</p>
<p>With the Zooming Image Tool, the learner can move the mouse pointer over a part of the image to enlarge it and see more detail.</p> <p>With the Zooming Image Tool, the learner can move the mouse pointer over a part of the image to enlarge it and see more detail.</p>
<p>To use the Zooming Image Tool, you must first add the <a href="http://files.edx.org/jquery.loupeAndLightbox.js" target="_blank">jquery.loupeAndLightbox.js JavaScript file</a> to your course.</p> <p>To use the Zooming Image Tool, you must first add the <a href="http://files.edx.org/jquery.loupeAndLightbox.js" target="_blank">jquery.loupeAndLightbox.js JavaScript file</a> to your course.</p>
...@@ -11,10 +11,10 @@ data: | ...@@ -11,10 +11,10 @@ data: |
<pre> <pre>
&lt;div class="zooming-image-place" style="position: relative;"&gt; &lt;div class="zooming-image-place" style="position: relative;"&gt;
&lt;a class="loupe" href="<i>path to the magnified version of the image</i>"&gt; &lt;a class="loupe" href="<i>path to the magnified version of the image</i>"&gt;
&lt;img alt="<i>Text for screen readers</i>" &lt;img alt="<i>Text for screen readers</i>"
src="<i>path to the image you want to display in the unit</i>" /&gt; src="<i>path to the image you want to display in the unit</i>" /&gt;
&lt;/a> &lt;/a>
&lt;div class="script_placeholder" &lt;div class="script_placeholder"
data-src="<i>path to the jquery.loupeAndLightbox.js JavaScript file in your course</i>"/&gt; data-src="<i>path to the jquery.loupeAndLightbox.js JavaScript file in your course</i>"/&gt;
&lt;/div&gt; &lt;/div&gt;
&lt;script type="text/javascript"&gt;// &gt;![CDATA[ &lt;script type="text/javascript"&gt;// &gt;![CDATA[
...@@ -35,7 +35,7 @@ data: | ...@@ -35,7 +35,7 @@ data: |
<li>Replace the value of the image's <strong>src</strong> attribute with the path to the image that will appear in the unit.</li> <li>Replace the value of the image's <strong>src</strong> attribute with the path to the image that will appear in the unit.</li>
<li>Replace the value of the image's <strong>alt</strong> attribute with text that both describes the image and the action or destination of clicking on the image. You <strong>must</strong> include alt text to provide an accessible label.</li> <li>Replace the value of the image's <strong>alt</strong> attribute with text that both describes the image and the action or destination of clicking on the image. You <strong>must</strong> include alt text to provide an accessible label.</li>
<li>Replace the value of the div element's <strong>data-src</strong> attribute with the path to the jquery.loupeAndLightbox.js JavaScript file in your course.</li> <li>Replace the value of the div element's <strong>data-src</strong> attribute with the path to the jquery.loupeAndLightbox.js JavaScript file in your course.</li>
</ol> </ol>
<p>The example below shows a subset of the biochemical reactions that cells carry out. </p> <p>The example below shows a subset of the biochemical reactions that cells carry out. </p>
<p>You can view the chemical structures of the molecules by clicking on them. The magnified view also lists the enzymes involved in each step.</p> <p>You can view the chemical structures of the molecules by clicking on them. The magnified view also lists the enzymes involved in each step.</p>
<p class="sr">Press spacebar to open the magnifier.</p> <p class="sr">Press spacebar to open the magnifier.</p>
......
...@@ -44,5 +44,5 @@ class LibraryContentXBlockWrapper(PageObject): ...@@ -44,5 +44,5 @@ class LibraryContentXBlockWrapper(PageObject):
""" """
Gets headers of all child XBlocks as list of strings Gets headers of all child XBlocks as list of strings
""" """
child_blocks_headers = self.q(css=self._bounded_selector("div[data-id] h2.problem-header")) child_blocks_headers = self.q(css=self._bounded_selector("div[data-id] h3.problem-header"))
return frozenset(child.text for child in child_blocks_headers) return frozenset(child.text for child in child_blocks_headers)
...@@ -183,6 +183,6 @@ def wait_for_problem(display_name): ...@@ -183,6 +183,6 @@ def wait_for_problem(display_name):
world.wait_for_ajax_complete() world.wait_for_ajax_complete()
wait_func = lambda _: world.css_has_text( wait_func = lambda _: world.css_has_text(
'h2.problem-header', display_name, strip=True 'h3.problem-header', display_name, strip=True
) )
world.wait_for(wait_func) world.wait_for(wait_func)
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<% }) %> <% }) %>
</nav> </nav>
<% } %> <% } %>
<h2 class="page-title"><%- title %></h2> <h3 class="page-title"><%- title %></h3>
<p class="page-description"><%- description %></p> <p class="page-description"><%- description %></p>
</div> </div>
<div class="page-header-secondary"></div> <div class="page-header-secondary"></div>
......
...@@ -3,10 +3,10 @@ import json ...@@ -3,10 +3,10 @@ import json
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
%> %>
<h2 class="problem-header"> <h3 class="problem-header">
## Translators: "External resource" means that this learning module is hosted on a platform external to the edX LMS ## Translators: "External resource" means that this learning module is hosted on a platform external to the edX LMS
${display_name} (${_('External resource')}) ${display_name} (${_('External resource')})
</h2> </h3>
% if has_score and weight: % if has_score and weight:
<div class="problem-progress"> <div class="problem-progress">
...@@ -51,9 +51,9 @@ from django.utils.translation import ugettext as _ ...@@ -51,9 +51,9 @@ from django.utils.translation import ugettext as _
></iframe> ></iframe>
% endif % endif
% elif not hide_launch: % elif not hide_launch:
<h3 class="error_message"> <h4 class="error_message">
${_('Please provide launch_url. Click "Edit", and fill in the required fields.')} ${_('Please provide launch_url. Click "Edit", and fill in the required fields.')}
</h3> </h4>
% endif % endif
% if has_score and comment: % if has_score and comment:
......
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<h2 class="problem-header"> <h3 class="problem-header">
${ problem['name'] } ${ problem['name'] }
</h2> </h3>
<div class="problem-progress"></div> <div class="problem-progress"></div>
......
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
% if display_name is not UNDEFINED and display_name is not None: % if display_name is not UNDEFINED and display_name is not None:
<h2>${display_name}</h2> <h3>${display_name}</h3>
% endif % endif
<div <div
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment