fix: do not instantiate the PartitionService during XBlock validation in Studio
This commit is contained in:
committed by
Piotr Surowiec
parent
0bde216d6f
commit
f6a60cdc1c
@@ -3287,7 +3287,11 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
|
||||
Create the proper runtime for this course
|
||||
"""
|
||||
services = self.services
|
||||
services["partitions"] = PartitionService(course_entry.course_key)
|
||||
# Only the CourseBlock can have user partitions. Therefore, creating the PartitionService with the library key
|
||||
# instead of the course key does not work. The XBlock validation in Studio fails with the following message:
|
||||
# "This component's access settings refer to deleted or invalid group configurations.".
|
||||
if not isinstance(course_entry.course_key, LibraryLocator):
|
||||
services["partitions"] = PartitionService(course_entry.course_key)
|
||||
|
||||
return CachingDescriptorSystem(
|
||||
modulestore=self,
|
||||
|
||||
Reference in New Issue
Block a user