Merge pull request #21503 from edx/BOM-269

BOM-269 Python 3 fixes
This commit is contained in:
Aarif
2019-09-03 13:56:02 +05:00
committed by GitHub

View File

@@ -4,6 +4,8 @@ Code used to get and cache the requested course-data
from __future__ import absolute_import
from django.utils.encoding import python_2_unicode_compatible
from lms.djangoapps.course_blocks.api import get_course_blocks
from openedx.core.djangoapps.content.block_structure.api import get_block_structure_manager
from xmodule.modulestore.django import modulestore
@@ -11,6 +13,7 @@ from xmodule.modulestore.django import modulestore
from .transformer import GradesTransformer
@python_2_unicode_compatible
class CourseData(object):
"""
Utility access layer to intelligently get and cache the
@@ -102,8 +105,8 @@ class CourseData(object):
course_block = structure[self.location]
return getattr(course_block, 'subtree_edited_on', None)
def __unicode__(self):
return u'Course: course_key: {}'.format(self.course_key)
def __str__(self):
return 'Course: course_key: {}'.format(self.course_key)
def full_string(self):
if self.effective_structure: