Studio render XBlockAside views
PLAT-280
This commit is contained in:
@@ -326,7 +326,7 @@ def _section_data_download(course, access):
|
||||
|
||||
def null_applicable_aside_types(block): # pylint: disable=unused-argument
|
||||
"""
|
||||
get_aside method for monkey-patching into descriptor_global_applicable_aside_types
|
||||
get_aside method for monkey-patching into applicable_aside_types
|
||||
while rendering an HtmlDescriptor for email text editing. This returns
|
||||
an empty list.
|
||||
"""
|
||||
@@ -337,8 +337,8 @@ def _section_send_email(course, access):
|
||||
""" Provide data for the corresponding bulk email section """
|
||||
course_key = course.id
|
||||
|
||||
# Monkey-patch descriptor_global_applicable_aside_types to return no asides for the duration of this render
|
||||
with patch('xmodule.x_module.descriptor_global_applicable_aside_types', null_applicable_aside_types):
|
||||
# Monkey-patch applicable_aside_types to return no asides for the duration of this render
|
||||
with patch.object(course.runtime, 'applicable_aside_types', null_applicable_aside_types):
|
||||
# This HtmlDescriptor is only being used to generate a nice text editor.
|
||||
html_module = HtmlDescriptor(
|
||||
course.system,
|
||||
|
||||
@@ -9,7 +9,6 @@ from django.core.urlresolvers import reverse
|
||||
from django.conf import settings
|
||||
from lms.djangoapps.lms_xblock.models import XBlockAsidesConfig
|
||||
from openedx.core.djangoapps.user_api.api import course_tag as user_course_tag_api
|
||||
from xblock.core import XBlockAside
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.x_module import ModuleSystem
|
||||
from xmodule.partitions.partitions_service import PartitionService
|
||||
|
||||
Reference in New Issue
Block a user