Grades cleanup: remove read_only param and create method

EDUCATOR-171
This commit is contained in:
Nimisha Asthagiri
2017-09-23 17:18:36 -04:00
parent 649f3ccd41
commit 1febdbfac9
33 changed files with 214 additions and 338 deletions

View File

@@ -92,8 +92,9 @@ class CourseData(object):
def edited_on(self):
# get course block from structure only; subtree_edited_on field on modulestore's course block isn't optimized.
structure = self._effective_structure
course_block = structure[self.location]
return getattr(course_block, 'subtree_edited_on', None)
if structure:
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)