MIT: CCX. Fix issues identified in code review
Original Commit Messages: use edx's own get_parent method, rather than our own. add field to unique constraint to avoid MultipleObjectsReturned in case of multiple browser clicks on submit fix 0011 migration, inherit from TimeStampedField and add composite index (migration only) fix bug where adding an already registered user to a ccx would cause a crash due to an undefined variable add assertNumQueries tests to test modules where override field providers are used remove unnecessary teardown implement recommended style for checking empty list import utility methods rather than use duplicate code added comment explaining date conversion to string for json add logging for invalid users or emails when enrolling students add comment about xmodule user state avoid using get_or_create, which seems to be causing a race condition on schedule change save relocate badly placed edvent handlers to fix multiple submit problem
This commit is contained in:
committed by
cewing
parent
3425424696
commit
b3da2a54bb
@@ -1213,12 +1213,15 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
|
||||
|
||||
|
||||
"""
|
||||
# If this descriptor has been bound to a student, return the corresponding
|
||||
# XModule. If not, just use the descriptor itself
|
||||
try:
|
||||
module = getattr(self, '_xmodule', None)
|
||||
if not module:
|
||||
module = self
|
||||
except UndefinedContext:
|
||||
module = self
|
||||
|
||||
all_descriptors = []
|
||||
graded_sections = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user