You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jason Bau edited this page Jul 24, 2014
·
1 revision
<customresponse /> elements in "Advanced Problems" can be graded using python provided in <script type="loncapa/python"> tags, such as the example below which basically marks all responses as correct
But what kind of python code can be specified within these script tags? For example, what python libraries are available to this python code?
This code executes in a jailed environment to protect the servers. (Links for the software performing this enforcement, both of which have detailed readmes: codejail reposafe_exec in edx-platform/common/lib/capa.) First, this environment has a restricted python environment. The list of python packages available to this code is listed in the edx platform repo at requirements/edx-sandbox. In addition, python's standard libraries are available.
Also, python code specified in these script tags are subject to OS level restrictions provided by Ubuntu's apparmor package that, among other protections, limit execution time and memory consumption and prevent file and network access.