diff --git a/lms/djangoapps/grades/course_data.py b/lms/djangoapps/grades/course_data.py index bbf0a58d50..56e462c247 100644 --- a/lms/djangoapps/grades/course_data.py +++ b/lms/djangoapps/grades/course_data.py @@ -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: