From a6068201e11809a8ec8be1d9babc8339c58691d3 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 29 Aug 2013 13:11:04 -0400 Subject: [PATCH] Add in a staff warning message about duplicates --- .../combined_open_ended_modulev1.py | 3 ++- lms/djangoapps/instructor/views/api.py | 6 +++++- lms/templates/combinedopenended/combined_open_ended.html | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py index 340012a042..6f2095447e 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py @@ -386,7 +386,8 @@ class CombinedOpenEndedV1Module(): 'accept_file_upload': self.accept_file_upload, 'location': self.location, 'legend_list': LEGEND_LIST, - 'human_state': HUMAN_STATES.get(self.state, "Not started.") + 'human_state': HUMAN_STATES.get(self.state, "Not started."), + 'is_staff': self.system.user_is_staff } return context diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index e3d060e57a..e5498585a3 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -807,7 +807,11 @@ def _msk_from_problem_urlname(course_id, urlname): if urlname.endswith(".xml"): urlname = urlname[:-4] - urlname = "problem/" + urlname + # Combined open ended problems also have state that can be deleted. However, + # appending "problem" will only allow capa problems to be reset. + # Get around this for combinedopenended problems. + if "combinedopenended" not in urlname: + urlname = "problem/" + urlname (org, course_name, __) = course_id.split("/") module_state_key = "i4x://" + org + "/" + course_name + "/" + urlname diff --git a/lms/templates/combinedopenended/combined_open_ended.html b/lms/templates/combinedopenended/combined_open_ended.html index 5f088265a2..971f543273 100644 --- a/lms/templates/combinedopenended/combined_open_ended.html +++ b/lms/templates/combinedopenended/combined_open_ended.html @@ -56,5 +56,10 @@
+ % if is_staff: +
+ Staff Warning: Please note that if you submit a duplicate of text that has already been submitted for grading, it will not show up in the staff grading view. It will be given the same grade that the original received automatically, and will be returned within 30 minutes if the original is already graded, or when the original is graded if not. +
+ % endif