diff --git a/cms/templates/widgets/open-ended-edit.html b/cms/templates/widgets/open-ended-edit.html index bc142884ed..947131f5a9 100644 --- a/cms/templates/widgets/open-ended-edit.html +++ b/cms/templates/widgets/open-ended-edit.html @@ -83,7 +83,7 @@

                         [tasks]
-                        (Self), ({0-1}AI), ({1-3}Peer)
+                        (Self), ({2-5}AI), ({4-5}Peer)
                         [tasks]
                     
diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/edit.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/edit.coffee index aae19eac82..b5c7f69f1d 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/edit.coffee @@ -1,7 +1,7 @@ class @OpenEndedMarkdownEditingDescriptor extends XModule.Descriptor # TODO really, these templates should come from or also feed the cheatsheet @rubricTemplate : "[rubric]\n+ Color Identification\n- Incorrect\n- Correct\n + Grammar\n- Poor\n- Acceptable\n- Superb \n[rubric]\n" - @tasksTemplate: "[tasks]\n(Self), ({0-1}AI), ({1-3}Peer)\n[tasks]\n" + @tasksTemplate: "[tasks]\n(Self), ({2-5}AI), ({4-5}Peer)\n[tasks]\n" @promptTemplate: "[prompt]\nWhy is the sky blue?\n[prompt]\n" constructor: (element) -> diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py index 7ba046b2ad..4f772fe0a1 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py @@ -168,7 +168,10 @@ class OpenEndedModule(openendedchild.OpenEndedChild): #This is a student_facing_error return {'success': False, 'msg': "There was an error saving your feedback. Please contact course staff."} - qinterface = system.xqueue['interface'] + xqueue = system.get('xqueue') + if xqueue is None: + return {'success': False, 'msg': "Couldn't submit feedback."} + qinterface = xqueue['interface'] qtime = datetime.strftime(datetime.now(), xqueue_interface.dateformat) anonymous_student_id = system.anonymous_student_id queuekey = xqueue_interface.make_hashkey(str(system.seed) + qtime + @@ -176,7 +179,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild): str(len(self.child_history))) xheader = xqueue_interface.make_xheader( - lms_callback_url=system.xqueue['construct_callback'](), + lms_callback_url=xqueue['construct_callback'](), lms_key=queuekey, queue_name=self.message_queue_name ) @@ -219,7 +222,10 @@ class OpenEndedModule(openendedchild.OpenEndedChild): # Prepare xqueue request #------------------------------------------------------------ - qinterface = system.xqueue['interface'] + xqueue = system.get('xqueue') + if xqueue is None: + return False + qinterface = xqueue['interface'] qtime = datetime.strftime(datetime.now(), xqueue_interface.dateformat) anonymous_student_id = system.anonymous_student_id @@ -230,7 +236,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild): str(len(self.child_history))) xheader = xqueue_interface.make_xheader( - lms_callback_url=system.xqueue['construct_callback'](), + lms_callback_url=xqueue['construct_callback'](), lms_key=queuekey, queue_name=self.queue_name ) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index fe97e38949..657839a94b 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -218,8 +218,8 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours #this first checks to see if the descriptor is the correct one, and only sends settings if it is #Get descriptor metadata fields indicating needs for various settings - needs_open_ended_interface = descriptor.needs_open_ended_interface - needs_s3_interface = descriptor.needs_s3_interface + needs_open_ended_interface = hasattr(descriptor, "needs_open_ended_interface") and descriptor.needs_open_ended_interface + needs_s3_interface = hasattr(descriptor, "needs_s3_interface") and descriptor.needs_s3_interface #Initialize interfaces to None open_ended_grading_interface = None