diff --git a/common/lib/xmodule/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py index 9cc60a47f2..d49eafebb1 100644 --- a/common/lib/xmodule/xmodule/library_content_module.py +++ b/common/lib/xmodule/xmodule/library_content_module.py @@ -176,7 +176,8 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule): pool = valid_block_keys - selected if mode == "random": num_to_add = min(len(pool), num_to_add) - added_block_keys = set(random.sample(pool, num_to_add)) + rand = random.Random() + added_block_keys = set(rand.sample(pool, num_to_add)) # We now have the correct n random children to show for this user. else: raise NotImplementedError("Unsupported mode.")