MIT: CCX. Fixes for API changes that affect the binding of descriptors to student context.
fix for making sure all descriptor fields are always available for course descriptors despite module_class tricks add required fields to cache data for tests use a different strategy to mock up the get_children method
This commit is contained in:
@@ -835,8 +835,16 @@ class CourseFields(object):
|
||||
)
|
||||
|
||||
|
||||
class CourseModule(CourseFields, SequenceModule):
|
||||
"""
|
||||
The CourseDescriptor needs its module_class to be a SequenceModule, but some code that
|
||||
expects a CourseDescriptor to have all its fields can fail if it gets a SequenceModule instead.
|
||||
This class is to make sure that all the fields are present in all cases.
|
||||
"""
|
||||
|
||||
|
||||
class CourseDescriptor(CourseFields, SequenceDescriptor):
|
||||
module_class = SequenceModule
|
||||
module_class = CourseModule
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user