Commit 2bd01eb0 by Ehtesham

reverting inputtype id

parent 99bc5510
...@@ -846,6 +846,7 @@ class LoncapaProblem(object): ...@@ -846,6 +846,7 @@ class LoncapaProblem(object):
response_id_str = self.problem_id + "_" + str(response_id) response_id_str = self.problem_id + "_" + str(response_id)
# create and save ID for this response # create and save ID for this response
response.set('id', response_id_str) response.set('id', response_id_str)
response_id += 1
answer_id = 1 answer_id = 1
input_tags = inputtypes.registry.registered_tags() input_tags = inputtypes.registry.registered_tags()
...@@ -869,7 +870,7 @@ class LoncapaProblem(object): ...@@ -869,7 +870,7 @@ class LoncapaProblem(object):
# Find the label and save it for html transformation step # Find the label and save it for html transformation step
responsetype_label = response.find('label') responsetype_label = response.find('label')
problem_data[response_id_str] = { problem_data[self.problem_id + '_' + str(response_id)] = {
'label': responsetype_label.text if responsetype_label is not None else '', 'label': responsetype_label.text if responsetype_label is not None else '',
'p_ids': p_ids 'p_ids': p_ids
} }
...@@ -879,7 +880,6 @@ class LoncapaProblem(object): ...@@ -879,7 +880,6 @@ class LoncapaProblem(object):
responder = responsetype_cls(response, inputfields, self.context, self.capa_system, self.capa_module) responder = responsetype_cls(response, inputfields, self.context, self.capa_system, self.capa_module)
# save in list in self # save in list in self
self.responders[response] = responder self.responders[response] = responder
response_id += 1
# get responder answers (do this only once, since there may be a performance cost, # get responder answers (do this only once, since there may be a performance cost,
# eg with externalresponse) # eg with externalresponse)
......
<form class="choicegroup capa_inputtype" id="${id}-form"> <form class="choicegroup capa_inputtype" id="inputtype_${id}">
<fieldset> <fieldset>
% if response_data['label']: % if response_data['label']:
<legend id="${id}-legend" class="response-fieldset-legend field-group-hd">${response_data['label']}</legend> <legend id="${id}-legend" class="response-fieldset-legend field-group-hd">${response_data['label']}</legend>
......
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