Refactor for new capa question/answer framework
This commit is contained in:
@@ -36,7 +36,7 @@ function ${ id }_load() {
|
||||
$('#show_${ id }').click(function() {
|
||||
postJSON('/modx/problem/${ id }/problem_show', {}, function(data) {
|
||||
for (var key in data) {
|
||||
$("#answer_${ id }_"+key).text(data[key]);
|
||||
$("#answer_"+key).text(data[key]);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
13
schematicinput.html
Normal file
13
schematicinput.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<span>
|
||||
<input type="hidden" class="schematic" height="${height}" width="${width}" name="input_${id}" id="input_${id}" value="${value}" />
|
||||
<span id="answer_${id}"></span>
|
||||
% if state == 'unsubmitted':
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;" id="status_${id}"></span>
|
||||
% elif state == 'correct':
|
||||
<span class="ui-icon ui-icon-check" style="display:inline-block;" id="status_${id}"></span>
|
||||
% elif state == 'incorrect':
|
||||
<span class="ui-icon ui-icon-close" style="display:inline-block;" id="status_${id}"></span>
|
||||
% elif state == 'incomplete':
|
||||
<span class="ui-icon ui-icon-close" style="display:inline-block;" id="status_${id}"></span>
|
||||
% endif
|
||||
</span>
|
||||
13
textinput.html
Normal file
13
textinput.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<span>
|
||||
<input type="text" name="input_${id}" id="input_${id}" value="${value}" />
|
||||
<span id="answer_${id}"></span>
|
||||
% if state == 'unsubmitted':
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;" id="status_${id}"></span>
|
||||
% elif state == 'correct':
|
||||
<span class="ui-icon ui-icon-check" style="display:inline-block;" id="status_${id}"></span>
|
||||
% elif state == 'incorrect':
|
||||
<span class="ui-icon ui-icon-close" style="display:inline-block;" id="status_${id}"></span>
|
||||
% elif state == 'incomplete':
|
||||
<span class="ui-icon ui-icon-close" style="display:inline-block;" id="status_${id}"></span>
|
||||
% endif
|
||||
</span>
|
||||
Reference in New Issue
Block a user