From 995a075f8f8062f4a0e6ad65fc250341deeb6b5b Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Sat, 9 Feb 2013 00:18:04 -0500 Subject: [PATCH] Separate the rubric templates --- lms/templates/open_ended_combined_rubric.html | 29 ++++++++++++ lms/templates/open_ended_rubric.html | 46 ++++--------------- .../open_ended_view_only_rubric.html | 12 +++++ 3 files changed, 49 insertions(+), 38 deletions(-) create mode 100644 lms/templates/open_ended_combined_rubric.html create mode 100644 lms/templates/open_ended_view_only_rubric.html diff --git a/lms/templates/open_ended_combined_rubric.html b/lms/templates/open_ended_combined_rubric.html new file mode 100644 index 0000000000..f58ed2f03d --- /dev/null +++ b/lms/templates/open_ended_combined_rubric.html @@ -0,0 +1,29 @@ +
+
+ % for i in range(len(categories)): + <% category = categories[i] %> + ${category['description']}
+
    + % for j in range(len(category['options'])): + <% option = category['options'][j] %> +
  • +
    + %for grader_type in category['options'][j]['grader_types']: + % if grader_type in grader_type_image_dict: + <% grader_image = grader_type_image_dict[grader_type] %> + % if grader_type in human_grader_types: + <% human_title = human_grader_types[grader_type] %> + % else: + <% human_title = grader_type %> + % endif + + % endif + %endfor + ${option['points']} points : ${option['text']} +
    +
  • + % endfor +
+ % endfor +
+
diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index 58e74a68da..da2be513d9 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -1,52 +1,22 @@
- % if view_only and has_score: -

- % elif view_only: -

Use the below rubric to rate this submission.

- % else: -

Rubric

-

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

- % endif +

Rubric

+

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

% for i in range(len(categories)): <% category = categories[i] %> - ${category['description']}
+ ${category['description']}
    % for j in range(len(category['options'])): <% option = category['options'][j] %> - %if option['selected'] and not view_only: + %if option['selected']:
  • %else:
  • % endif - % if view_only: - % if option['selected'] and combined_rubric==False: - ## if this is the selected rubric block, show it highlighted -
    - ${option['points']} points : ${option['text']} -
    - % elif combined_rubric == True: -
    - %for grader_type in category['options'][j]['grader_types']: - % if grader_type in grader_type_image_dict: - <% grader_image = grader_type_image_dict[grader_type] %> - % if grader_type in human_grader_types: - <% human_title = human_grader_types[grader_type] %> - % else: - <% human_title = grader_type %> - % endif - - % endif - %endfor - ${option['points']} points : ${option['text']} -
    - % endif - % else: - - % endif +
  • % endfor
diff --git a/lms/templates/open_ended_view_only_rubric.html b/lms/templates/open_ended_view_only_rubric.html new file mode 100644 index 0000000000..55bf5338cf --- /dev/null +++ b/lms/templates/open_ended_view_only_rubric.html @@ -0,0 +1,12 @@ +
+
+ % for i in range(len(categories)): + <% category = categories[i] %> + % for j in range(len(category['options'])): + <% option = category['options'][j] %> + % if option['selected']: + ${category['description']} : ${option['points']} points + % endfor + % endfor +
+