diff --git a/common/lib/xmodule/xmodule/editing_module.py b/common/lib/xmodule/xmodule/editing_module.py index 4188165a24..67a4d66dad 100644 --- a/common/lib/xmodule/xmodule/editing_module.py +++ b/common/lib/xmodule/xmodule/editing_module.py @@ -20,5 +20,10 @@ class EditingDescriptor(MakoModuleDescriptor): def get_context(self): return { 'module': self, - 'data': self.definition['data'], + 'data': self.definition.get('data', ''), + # TODO (vshnayder): allow children and metadata to be edited. + #'children' : self.definition.get('children, ''), + + # TODO: show both own metadata and inherited? + #'metadata' : self.own_metadata, } diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index a049638d1b..2b55b48caf 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -117,7 +117,7 @@ def profile(request, course_id, student_id=None): student_module_cache = StudentModuleCache(request.user, course) course_module, _, _, _ = get_module(request.user, request, course.location, student_module_cache) - + context = {'name': user_info.name, 'username': student.username, 'location': user_info.location, @@ -243,6 +243,7 @@ def index(request, course_id, chapter=None, section=None, return result + @ensure_csrf_cookie def jump_to(request, location): ''' @@ -269,7 +270,7 @@ def jump_to(request, location): except NoPathToItem: raise Http404("This location is not in any class: {0}".format(location)) - + # Rely on index to do all error handling return index(request, course_id, chapter, section, position) @ensure_csrf_cookie