From 0ec1db81693f86c2787a0cb9547d951af381a96a Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 7 Jan 2013 15:38:04 -0500 Subject: [PATCH] Add in a message area --- .../xmodule/js/src/combinedopenended/display.coffee | 12 ++++-------- lms/templates/combined_open_ended.html | 1 - lms/templates/combined_open_ended_status.html | 4 ++-- lms/templates/open_ended.html | 1 + lms/templates/self_assessment_prompt.html | 2 ++ 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 45d0db8dac..4ad0bde631 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -74,13 +74,9 @@ class @CombinedOpenEnded @hint_area.attr('disabled', true) @submit_button.hide() if @task_number<@task_count - @next_problem_button.show() + @next_problem else - @next_problem_button.hide() - #if @allow_reset @reset_button.show() - #else - # @reset_button.hide() find_assessment_elements: -> @@ -161,8 +157,7 @@ class @CombinedOpenEnded else @errors_area.html('Problem state got out of sync. Try reloading the page.') - next_problem: (event) => - event.preventDefault() + next_problem: => if @child_state == 'done' $.postWithPrefix "#{@ajax_url}/next_problem", {}, (response) => if response.success @@ -203,7 +198,7 @@ class @CombinedOpenEnded processData: false contentType: false success: (response) => - @gentle_alert response.message + @gentle_alert response.msg @$('section.evaluation').slideToggle() @message_wrapper.html(response.message_html) @child_state = 'done' @@ -216,4 +211,5 @@ class @CombinedOpenEnded if @el.find('.open-ended-alert').length @el.find('.open-ended-alert').remove() alert_elem = "
" + msg + "
" + @el.find('.open-ended-action').after(alert_elem) @el.find('.open-ended-alert').css(opacity: 0).animate(opacity: 1, 700) \ No newline at end of file diff --git a/lms/templates/combined_open_ended.html b/lms/templates/combined_open_ended.html index 84bded0bec..6b30c3f418 100644 --- a/lms/templates/combined_open_ended.html +++ b/lms/templates/combined_open_ended.html @@ -8,6 +8,5 @@ - diff --git a/lms/templates/combined_open_ended_status.html b/lms/templates/combined_open_ended_status.html index e53c8136e3..6450f5a43e 100644 --- a/lms/templates/combined_open_ended_status.html +++ b/lms/templates/combined_open_ended_status.html @@ -1,10 +1,10 @@
%for status in status_list: - +
Step ${status['task_number']} (${status['state']}) : ${status['score']} / ${status['max_score']} %if status['type']=="openended": ${status['post_assessment']} %endif - +
%endfor
\ No newline at end of file diff --git a/lms/templates/open_ended.html b/lms/templates/open_ended.html index 423b2dc709..838c847841 100644 --- a/lms/templates/open_ended.html +++ b/lms/templates/open_ended.html @@ -51,5 +51,6 @@ % endif +
diff --git a/lms/templates/self_assessment_prompt.html b/lms/templates/self_assessment_prompt.html index 479e42a126..d8186954a7 100644 --- a/lms/templates/self_assessment_prompt.html +++ b/lms/templates/self_assessment_prompt.html @@ -16,4 +16,6 @@
${initial_message}
+
+