Commit 808c9933 by Don Mitchell

Merge pull request #1290 from MITx/feature/christina/misc

A couple of bug fixes.
parents ebca3af7 d4f79c04
...@@ -498,7 +498,7 @@ function displayFinishedUpload(xhr) { ...@@ -498,7 +498,7 @@ function displayFinishedUpload(xhr) {
} }
var resp = JSON.parse(xhr.responseText); var resp = JSON.parse(xhr.responseText);
$('.upload-modal .embeddable-xml-input').val('<img src="' + xhr.getResponseHeader('asset_url') + '"/>'); $('.upload-modal .embeddable-xml-input').val(xhr.getResponseHeader('asset_url'));
$('.upload-modal .embeddable').show(); $('.upload-modal .embeddable').show();
$('.upload-modal .file-name').hide(); $('.upload-modal .file-name').hide();
$('.upload-modal .progress-fill').html(resp.msg); $('.upload-modal .progress-fill').html(resp.msg);
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
{{uploadDate}} {{uploadDate}}
</td> </td>
<td class="embed-col"> <td class="embed-col">
<input type="text" class="embeddable-xml-input" value='{{url}}'> <input type="text" class="embeddable-xml-input" value='{{url}}' disabled>
</td> </td>
</tr> </tr>
</script> </script>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
${asset['uploadDate']} ${asset['uploadDate']}
</td> </td>
<td class="embed-col"> <td class="embed-col">
<input type="text" class="embeddable-xml-input" value='${asset['url']}'> <input type="text" class="embeddable-xml-input" value="${asset['url']}" disabled>
</td> </td>
</tr> </tr>
% endfor % endfor
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
<div class="progress-fill"></div> <div class="progress-fill"></div>
</div> </div>
<div class="embeddable"> <div class="embeddable">
<label>Embeddable XML:</label> <label>URL:</label>
<input type="text" class="embeddable-xml-input" value='<img src=""/>'> <input type="text" class="embeddable-xml-input" value='' disabled>
</div> </div>
<form class="file-chooser" action="${upload_asset_callback_url}" <form class="file-chooser" action="${upload_asset_callback_url}"
method="post" enctype="multipart/form-data"> method="post" enctype="multipart/form-data">
......
...@@ -316,15 +316,15 @@ describe 'MarkdownEditingDescriptor', -> ...@@ -316,15 +316,15 @@ describe 'MarkdownEditingDescriptor', ->
</multiplechoiceresponse> </multiplechoiceresponse>
<p>Choice checks</p> <p>Choice checks</p>
<multiplechoiceresponse> <choiceresponse>
<choicegroup type="MultipleChoiceChecks"> <checkboxgroup direction="vertical">
<choice correct="false">option1 [x]</choice> <choice correct="false">option1 [x]</choice>
<choice correct="true">correct</choice> <choice correct="true">correct</choice>
<choice correct="true">redundant</choice> <choice correct="true">redundant</choice>
<choice correct="false">distractor</choice> <choice correct="false">distractor</choice>
<choice correct="false">no space</choice> <choice correct="false">no space</choice>
</choicegroup> </checkboxgroup>
</multiplechoiceresponse> </choiceresponse>
<p>Option with multiple correct ones</p> <p>Option with multiple correct ones</p>
......
...@@ -213,8 +213,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -213,8 +213,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
// group check answers // group check answers
xml = xml.replace(/(^\s*\[.?\].*?$\n*)+/gm, function(match, p) { xml = xml.replace(/(^\s*\[.?\].*?$\n*)+/gm, function(match, p) {
var groupString = '<multiplechoiceresponse>\n'; var groupString = '<choiceresponse>\n';
groupString += ' <choicegroup type="MultipleChoiceChecks">\n'; groupString += ' <checkboxgroup direction="vertical">\n';
var options = match.split('\n'); var options = match.split('\n');
for(var i = 0; i < options.length; i++) { for(var i = 0; i < options.length; i++) {
if(options[i].length > 0) { if(options[i].length > 0) {
...@@ -223,8 +223,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -223,8 +223,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
groupString += ' <choice correct="' + correct + '">' + value + '</choice>\n'; groupString += ' <choice correct="' + correct + '">' + value + '</choice>\n';
} }
} }
groupString += ' </choicegroup>\n'; groupString += ' </checkboxgroup>\n';
groupString += '</multiplechoiceresponse>\n\n'; groupString += '</choiceresponse>\n\n';
return groupString; return groupString;
}); });
......
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