Commit 81d86eea by Chris Rodriguez

Changing H2 to H3 in problem templates

parent 092eae9f
......@@ -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">
<h2 class="problem-header">
<h3 class="problem-header">
Multiple Choice
</h2>
</h3>
<section class="problem-progress">(1 point possible)</section>
......
......@@ -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">
<h2 class="problem-header">
<h3 class="problem-header">
Numerical Input
</h2>
</h3>
<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>
......
<h2 class="problem-header">Problem Header</h2>
<h3 class="problem-header">Problem Header</h3>
<div class='problem-progress'></div>
......
<h2 class="problem-header">Problem Header</h2>
<h3 class="problem-header">Problem Header</h3>
<div class='problem-progress'></div>
......
......@@ -264,8 +264,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
// ]]
// <optionresponse>
// <optioninput>
// <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.
// <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.
xml = xml.replace(/\[\[((.|\n)+?)\]\]/g, function(match, group1) {
// decide if this is old style or new style
if (match.indexOf('\n') == -1) { // OLD style, [[ .... ]] on one line
......@@ -355,14 +355,14 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
groupString += ' <checkboxgroup>\n';
options = match.split('\n');
endHints = ''; // save these up to emit at the end
for (i = 0; i < options.length; i += 1) {
if(options[i].trim().length > 0) {
// detect the {{ ((A*B)) ...}} case first
// emits: <compoundhint value="A*B">AB hint</compoundhint>
var abhint = /^\s*{{\s*\(\((.*?)\)\)(.*?)}}/.exec(options[i]);
if (abhint) {
// lone case of hint text processing outside of extractHint, since syntax here is unique
......@@ -389,7 +389,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
if (select) {
hints += '\n <choicehint selected="false">' + select[2].trim() + '</choicehint>';
}
// 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.
if (hints) {
......@@ -502,16 +502,16 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
return processNumericalResponse(answersList[0]) || processStringResponse(answersList);
});
// replace explanations
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>';
return selectString;
});
// 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 new_xml = [];
var line, i, curlabel, prevlabel = '';
......@@ -579,4 +579,3 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
return xml;
}`
return toXml markdown
......@@ -2,12 +2,12 @@
metadata:
display_name: IFrame Tool
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>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>
<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;
<i>Message displayed when the browser does not support IFrames.</i>
&lt;/iframe&gt;
......@@ -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>
<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>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>
<p>A learner sees this text if the browser does not support IFrames.</p>
</li>
......
......@@ -2,14 +2,14 @@
metadata:
display_name: Full Screen Image Tool
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>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>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>
&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;
&lt;/a&gt;
</pre>
......@@ -21,4 +21,4 @@ data: |
</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>
<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
<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>
......@@ -2,7 +2,7 @@
metadata:
display_name: Zooming Image Tool
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>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>
......@@ -11,10 +11,10 @@ data: |
<pre>
&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;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;
&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;
&lt;/div&gt;
&lt;script type="text/javascript"&gt;// &gt;![CDATA[
......@@ -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>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>
</ol>
</ol>
<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 class="sr">Press spacebar to open the magnifier.</p>
......
......@@ -44,5 +44,5 @@ class LibraryContentXBlockWrapper(PageObject):
"""
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)
......@@ -183,6 +183,6 @@ def wait_for_problem(display_name):
world.wait_for_ajax_complete()
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)
......@@ -9,7 +9,7 @@
<% }) %>
</nav>
<% } %>
<h2 class="page-title"><%- title %></h2>
<h3 class="page-title"><%- title %></h3>
<p class="page-description"><%- description %></p>
</div>
<div class="page-header-secondary"></div>
......
......@@ -3,10 +3,10 @@ import json
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
${display_name} (${_('External resource')})
</h2>
</h3>
% if has_score and weight:
<div class="problem-progress">
......@@ -51,9 +51,9 @@ from django.utils.translation import ugettext as _
></iframe>
% endif
% elif not hide_launch:
<h3 class="error_message">
<h4 class="error_message">
${_('Please provide launch_url. Click "Edit", and fill in the required fields.')}
</h3>
</h4>
% endif
% if has_score and comment:
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
<h2 class="problem-header">
<h3 class="problem-header">
${ problem['name'] }
</h2>
</h3>
<div class="problem-progress"></div>
......
<%! from django.utils.translation import ugettext as _ %>
% if display_name is not UNDEFINED and display_name is not None:
<h2>${display_name}</h2>
<h3>${display_name}</h3>
% endif
<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