diff --git a/xmodule/capa/responsetypes.py b/xmodule/capa/responsetypes.py index 73378e7c0a2b..6155fe926ea7 100644 --- a/xmodule/capa/responsetypes.py +++ b/xmodule/capa/responsetypes.py @@ -2140,6 +2140,9 @@ def check_function(expect, ans, **kwargs): globals_dict, python_path=self.context['python_path'], extra_files=self.context['extra_files'], + limit_overrides_context=get_course_id_from_capa_block( + self.capa_block + ), slug=self.id, random_seed=self.context['seed'], unsafely=self.capa_system.can_execute_unsafe_code(), @@ -2291,6 +2294,9 @@ def execute_check_function(self, idset, submission): # lint-amnesty, pylint: di cache=self.capa_system.cache, python_path=self.context['python_path'], extra_files=self.context['extra_files'], + limit_overrides_context=get_course_id_from_capa_block( + self.capa_block + ), slug=self.id, random_seed=self.context['seed'], unsafely=self.capa_system.can_execute_unsafe_code(), @@ -3274,6 +3280,9 @@ def get_score(self, student_answers): cache=self.capa_system.cache, python_path=self.context['python_path'], extra_files=self.context['extra_files'], + limit_overrides_context=get_course_id_from_capa_block( + self.capa_block + ), slug=self.id, random_seed=self.context['seed'], unsafely=self.capa_system.can_execute_unsafe_code(),