Merge pull request #1715 from robertjmarks/master
changes to allow multiple choicetextresponses in one problem @adampalay will do!
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
% else:
|
% else:
|
||||||
<% my_id = content_node.get('contents','') %>
|
<% my_id = content_node.get('contents','') %>
|
||||||
<% my_val = value.get(my_id,'') %>
|
<% my_val = value.get(my_id,'') %>
|
||||||
<input class="ctinput" type="text" name="${content_node['contents']}" id="${content_node['contents']}" value="${my_val|h} "/>
|
<input class="ctinput" type="text" name="${content_node['contents']}" id="${content_node['contents']}" value="${my_val|h}"/>
|
||||||
%endif
|
%endif
|
||||||
<span class="mock_label">
|
<span class="mock_label">
|
||||||
${content_node['tail_text']}
|
${content_node['tail_text']}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
(function () {
|
(function () {
|
||||||
var update = function () {
|
var update = function () {
|
||||||
// Whenever a value changes create a new serialized version of this
|
// Whenever a value changes create a new serialized version of this
|
||||||
// problem's inputs and set the hidden input fields value to equal it.
|
// problem's inputs and set the hidden input field's value to equal it.
|
||||||
var parent = $(this).closest('.problems-wrapper');
|
var parent = $(this).closest('section.choicetextinput');
|
||||||
// find the closest parent problems-wrapper and use that as the problem
|
// find the closest parent problems-wrapper and use that as the problem
|
||||||
// grab the input id from the input
|
// grab the input id from the input
|
||||||
// real_input is the hidden input field
|
// real_input is the hidden input field
|
||||||
var real_input = $('input.choicetextvalue', parent);
|
var real_input = $('input.choicetextvalue', parent);
|
||||||
var all_inputs = $('.choicetextinput .ctinput', parent);
|
var all_inputs = $('input.ctinput', parent);
|
||||||
var user_inputs = {};
|
var user_inputs = {};
|
||||||
$(all_inputs).each(function (index, elt) {
|
$(all_inputs).each(function (index, elt) {
|
||||||
var node = $(elt);
|
var node = $(elt);
|
||||||
|
|||||||
Reference in New Issue
Block a user