diff --git a/common/djangoapps/util/sandboxing.py b/common/djangoapps/util/sandboxing.py index 1e82b90a69..7d1c1da06f 100644 --- a/common/djangoapps/util/sandboxing.py +++ b/common/djangoapps/util/sandboxing.py @@ -3,6 +3,15 @@ from django.conf import settings def can_execute_unsafe_code(course_id): + """ + Determine if this course is allowed to run unsafe code. + + For use from the ModuleStore. Checks the `course_id` against a list of whitelisted + regexes. + + Returns a boolean, true if the course can run outside the sandbox. + + """ # To decide if we can run unsafe code, we check the course id against # a list of regexes configured on the server. for regex in settings.COURSES_WITH_UNSAFE_CODE: