From 9a4ee350d7e4e9facff77e6370e7b0814f0faabc Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 7 Jan 2013 18:21:02 -0500 Subject: [PATCH] JS tweaks, move feedback into its own template --- .../js/src/combinedopenended/display.coffee | 9 ++++---- lms/templates/combined_open_ended_status.html | 2 +- lms/templates/open_ended.html | 23 +------------------ lms/templates/open_ended_evaluation.html | 22 ++++++++++++++++++ 4 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 lms/templates/open_ended_evaluation.html diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index ff06e6a850..f6ad7eb22a 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -54,10 +54,10 @@ class @CombinedOpenEnded @submit_button.show() @reset_button.hide() @next_problem_button.hide() - @skip_button.hide() @hint_area.attr('disabled', false) if @child_type=="openended" @reload_button.hide() + @skip_button.hide() if @child_state == 'initial' @answer_area.attr("disabled", false) @submit_button.prop('value', 'Submit') @@ -73,6 +73,7 @@ class @CombinedOpenEnded if @child_type=="openended" @reload_button.hide() @skip_button.show() + @skip_post_assessment() @answer_area.attr("disabled", true) @submit_button.prop('value', 'Submit post-assessment') if @child_type=="selfassessment" @@ -83,7 +84,8 @@ class @CombinedOpenEnded @answer_area.attr("disabled", true) @hint_area.attr('disabled', true) @submit_button.hide() - @skip_button.hide() + if @child_type=="openended" + @skip_button.hide() if @task_number<@task_count @next_problem() else @@ -149,8 +151,7 @@ class @CombinedOpenEnded else @errors_area.html('Problem state got out of sync. Try reloading the page.') - skip_post_assessment: (event) => - event.preventDefault() + skip_post_assessment: => if @child_state == 'post_assessment' $.postWithPrefix "#{@ajax_url}/skip_post_assessment", {}, (response) => diff --git a/lms/templates/combined_open_ended_status.html b/lms/templates/combined_open_ended_status.html index 41ec403c47..7bc66d954f 100644 --- a/lms/templates/combined_open_ended_status.html +++ b/lms/templates/combined_open_ended_status.html @@ -3,7 +3,7 @@
Step ${status['task_number']} (${status['human_state']}) : ${status['score']} / ${status['max_score']} %if status['type']=="openended": -
+
Show feedback from step ${status['task_number']}
diff --git a/lms/templates/open_ended.html b/lms/templates/open_ended.html index e995d62cb1..9ade05d0e2 100644 --- a/lms/templates/open_ended.html +++ b/lms/templates/open_ended.html @@ -32,27 +32,6 @@
- ${msg|n} - % if state == 'post_assessment': -
-
- Respond to Feedback -
-
-

How accurate do you find this feedback?

-
-
    -
  • -
  • -
  • -
  • -
  • -
-
-

Additional comments:

- -
-
- % endif + ${msg|n}
diff --git a/lms/templates/open_ended_evaluation.html b/lms/templates/open_ended_evaluation.html new file mode 100644 index 0000000000..018486a1d6 --- /dev/null +++ b/lms/templates/open_ended_evaluation.html @@ -0,0 +1,22 @@ +
+ ${msg|n} +
+
+ Respond to Feedback +
+
+

How accurate do you find this feedback?

+
+
    +
  • +
  • +
  • +
  • +
  • +
+
+

Additional comments:

+ +
+
+
\ No newline at end of file