From b30407d7c8d21efc8c428207f69ba065755cc4d4 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 7 Feb 2013 10:22:33 -0500 Subject: [PATCH] Work on showing results properly --- .../lib/xmodule/xmodule/open_ended_module.py | 5 +++ lms/templates/open_ended_feedback.html | 7 ++-- lms/templates/open_ended_rubric.html | 34 ++++++++++--------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/common/lib/xmodule/xmodule/open_ended_module.py b/common/lib/xmodule/xmodule/open_ended_module.py index 0ad6a26995..07db43c502 100644 --- a/common/lib/xmodule/xmodule/open_ended_module.py +++ b/common/lib/xmodule/xmodule/open_ended_module.py @@ -306,6 +306,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild): 'grammar': 1, # needs to be after all the other feedback 'markup_text': 3} + do_not_render = ['topicality', 'prompt-overlap'] default_priority = 2 @@ -360,6 +361,10 @@ class OpenEndedModule(openendedchild.OpenEndedChild): if len(feedback) == 0: return format_feedback('errors', 'No feedback available') + for tag in do_not_render: + if tag in feedback: + feedback.pop(tag) + feedback_lst = sorted(feedback.items(), key=get_priority) feedback_list_part1 = u"\n".join(format_feedback(k, v) for k, v in feedback_lst) else: diff --git a/lms/templates/open_ended_feedback.html b/lms/templates/open_ended_feedback.html index 7fffddb88f..c169198040 100644 --- a/lms/templates/open_ended_feedback.html +++ b/lms/templates/open_ended_feedback.html @@ -1,17 +1,14 @@
-
Feedback
+

Score: ${score}

- % if grader_type == "ML": -

Check below for full feedback:

- % endif + ${rubric_feedback | n}
${ feedback | n}
- ${rubric_feedback | n}
diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index c340da3af7..3f3eb95629 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -1,11 +1,11 @@
-

Rubric

% if view_only and has_score: -

This is the rubric that was used to grade your submission. The highlighted selection matches how the grader feels you performed in each category.

+

% elif view_only: -

Use the below rubric to rate this submission.

+

Use the below rubric to rate this submission.

% else: -

Select the criteria you feel best represents this submission in each category.

+

Rubric

+

Select the criteria you feel best represents this submission in each category.

% endif
% for i in range(len(categories)): @@ -14,23 +14,25 @@
    % for j in range(len(category['options'])): <% option = category['options'][j] %> - %if option['selected']: -
  • + %if option['selected']: +
  • %else: -
  • +
  • % endif % if view_only: - ## if this is the selected rubric block, show it highlighted -
    - ${option['points']} points : ${option['text']} -
    + % if option['selected']: + ## if this is the selected rubric block, show it highlighted +
    + ${option['points']} points : ${option['text']} +
    + % endif % else: - + % endif -
  • + % endfor
% endfor