MA-722 Render xBlock API Support

This commit is contained in:
Nimisha Asthagiri
2015-05-27 11:48:53 -04:00
parent 60b73b48aa
commit d240785b17
20 changed files with 387 additions and 207 deletions

View File

@@ -90,7 +90,8 @@ def view_course_access(depth=0, access_action='load', check_for_milestones=False
request.user,
access_action,
course_id,
depth=depth
depth=depth,
check_if_enrolled=True,
)
except Http404:
# any_unfulfilled_milestones called a second time since has_access returns a bool

View File

@@ -209,7 +209,7 @@ def grade_histogram(module_id):
@contract(user=User, has_instructor_access=bool, block=XBlock, view=basestring, frag=Fragment, context="dict|None")
def add_staff_markup(user, has_instructor_access, block, view, frag, context): # pylint: disable=unused-argument
def add_staff_markup(user, has_instructor_access, disable_staff_debug_info, block, view, frag, context): # pylint: disable=unused-argument
"""
Updates the supplied module with a new get_html function that wraps
the output of the old get_html function with additional information
@@ -305,6 +305,7 @@ def add_staff_markup(user, has_instructor_access, block, view, frag, context):
'block_content': frag.content,
'is_released': is_released,
'has_instructor_access': has_instructor_access,
'disable_staff_debug_info': disable_staff_debug_info,
}
return wrap_fragment(frag, render_to_string("staff_problem_info.html", staff_context))