Commit dc0a7989 by Vik Paruchuri

Javascript fixes to remove reset button from self assessment

parent 8ca12ce5
......@@ -42,8 +42,8 @@ class CombinedOpenEndedModule(XModule):
DONE = 'done'
TASK_TYPES=["self", "ml", "instructor", "peer"]
#, resource_string(__name__, 'js/src/combinedopenended/display.coffee'), resource_string(__name__, 'js/src/openended/display.coffee')
js = {'coffee': [resource_string(__name__, 'js/src/selfassessment/display.coffee')]}
#, resource_string(__name__, 'js/src/openended/display.coffee')
js = {'coffee': [resource_string(__name__, 'js/src/selfassessment/display.coffee'), resource_string(__name__, 'js/src/combinedopenended/display.coffee')]}
js_module_name = "SelfAssessment"
def __init__(self, system, location, definition, descriptor,
......@@ -133,7 +133,7 @@ class CombinedOpenEndedModule(XModule):
'allow_reset': True,
}
html = system.render_template('combined_open_ended.html', context)
html = self.system.render_template('combined_open_ended.html', context)
return html
......
......@@ -29,7 +29,6 @@ class @SelfAssessment
# rebind to the appropriate function for the current state
@submit_button.unbind('click')
@submit_button.show()
@reset_button.hide()
@hint_area.attr('disabled', false)
if @state == 'initial'
@answer_area.attr("disabled", false)
......@@ -47,10 +46,6 @@ class @SelfAssessment
@answer_area.attr("disabled", true)
@hint_area.attr('disabled', true)
@submit_button.hide()
if @allow_reset
@reset_button.show()
else
@reset_button.hide()
find_assessment_elements: ->
......
<div id="combined-open-ended" class="combined-open-ended" data-ajax-url="${ajax_url}" data-allow_reset="${allow_reset}">
% for item in items:
<div class="item">${item['content'] | h}</div>
<div class="item">${item['content'] | n}</div>
% endfor
<input type="button" value="Reset" class="reset-button" name="reset"/>
......
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