From dc0a798941553082fc3c311b6793f2598f5b089e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 3 Jan 2013 17:19:13 -0500 Subject: [PATCH] Javascript fixes to remove reset button from self assessment --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 6 +++--- .../{combinedopenended.coffee => display.coffee} | 0 .../xmodule/xmodule/js/src/selfassessment/display.coffee | 5 ----- lms/templates/combined_open_ended.html | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) rename common/lib/xmodule/xmodule/js/src/combinedopenended/{combinedopenended.coffee => display.coffee} (100%) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 5eec8f34fd..82086d6b54 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -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 diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/combinedopenended.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee similarity index 100% rename from common/lib/xmodule/xmodule/js/src/combinedopenended/combinedopenended.coffee rename to common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee diff --git a/common/lib/xmodule/xmodule/js/src/selfassessment/display.coffee b/common/lib/xmodule/xmodule/js/src/selfassessment/display.coffee index 4bf9cc8180..ea1f02c101 100644 --- a/common/lib/xmodule/xmodule/js/src/selfassessment/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/selfassessment/display.coffee @@ -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: -> diff --git a/lms/templates/combined_open_ended.html b/lms/templates/combined_open_ended.html index 3d4a69e0be..76c28b0e31 100644 --- a/lms/templates/combined_open_ended.html +++ b/lms/templates/combined_open_ended.html @@ -1,7 +1,7 @@
% for item in items: -
${item['content'] | h}
+
${item['content'] | n}
% endfor