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