Commit Graph

4914 Commits

Author SHA1 Message Date
Jay Zoldak
522751e425 Ignore the js files that are compiled from coffeescript when running the xmodule jasmine tests 2013-05-06 14:28:05 -04:00
Greg Price
ec3c8458e7 Merge pull request #1911 from edx/feature/gprice/feedback-button 2013-05-06 11:03:41 -07:00
Arthur Barrett
04e75485ba merged master branch into feature/abarrett/lms-notes-app. resolved conflicts in lms/envs/common.py and lms/templates/static_htmlbook.html. 2013-05-06 13:40:38 -04:00
Greg Price
00729a8c13 Add an omnipresent help tab to the LMS
The help tab opens a modal dialog that directs the user at various resources
(e.g. the site FAQ and course forums) and allows the user to submit feedback
to the feedback endpoint (which will ultimately create a ticket for the
student support team).
2013-05-06 13:35:52 -04:00
Greg Price
87072a9a58 Add an endpoint for submission of Zendesk tickets by end users
This functionality requires the Zendesk URL, user, and API key to be specified
in django.conf.settings. Also, add a flag to MITX_FEATURES (enabled by default)
to control the endpoint and the front-end feature (yet to be added).
2013-05-06 13:35:51 -04:00
Diana Huang
a8ea201b6a Move the link map to the settings. 2013-05-06 12:55:42 -04:00
cahrens
84ff2a0941 Merge branch 'master' into feature/christina/fields 2013-05-06 12:42:18 -04:00
Christina Roberts
66185423a2 Merge pull request #1945 from edx/feature/christina/computed_default
Get rid of _computed_default.
2013-05-06 09:28:37 -07:00
Ned Batchelder
e3de0dc847 A fuller unit test with a real 8.02x problem. 2013-05-06 11:39:22 -04:00
Ned Batchelder
403218ec6b If sandboxed code raises an exception, the exception will be cached. 2013-05-06 11:39:21 -04:00
Ned Batchelder
001ef7b0fe Use only safe characters for the cache key 2013-05-06 11:39:21 -04:00
Ned Batchelder
d7ea1dafe8 On second thought, make can_execute_unsafe_code a function returning a boolean. 2013-05-06 11:39:21 -04:00
Ned Batchelder
f1fac732cf A new boolean on XModuleSystem that determines whether to allow execution of untrusted unsandboxed code. 2013-05-06 11:39:21 -04:00
Ned Batchelder
f4d84e67e1 Build the XModuleSystem anew for each test so we can fiddle with it safely. 2013-05-06 11:39:21 -04:00
Ned Batchelder
0ba4b680f9 Minor fixes of test_system in xmodule tests 2013-05-06 11:39:21 -04:00
Ned Batchelder
477fe670dd All re-randomization has to be bucketed to get a reasonable cache hit rate. 2013-05-06 11:39:20 -04:00
Will Daly
0b2aedb4fe Added datadog monitoring of safe_exec() time 2013-05-06 11:39:20 -04:00
Ned Batchelder
baa6b4e3e4 The cache key for safe_exec has to be hashed to keep it a reasonable size. 2013-05-06 11:39:20 -04:00
Ned Batchelder
09fbbe7bfa Codejail is in its own repo now. 2013-05-06 11:39:20 -04:00
Ned Batchelder
adde939831 Clarify some comments in tests. 2013-05-06 11:39:20 -04:00
Ned Batchelder
726e8db13e Add more docs 2013-05-06 11:39:20 -04:00
Ned Batchelder
fb5343237a jail_code can execute a provided file also. 2013-05-06 11:39:20 -04:00
Ned Batchelder
9683098f3d Python should have -E, not sure of a clean way to do it, but this at least only applies it to python. 2013-05-06 11:39:20 -04:00
Ned Batchelder
bde976dad2 Refactor code_jail to accommodate non-Python code. 2013-05-06 11:39:19 -04:00
Ned Batchelder
55e910aafc Not sure why my branch was ahead of master for the version of distribute. Make them the same. 2013-05-06 11:39:19 -04:00
Ned Batchelder
bcdc11c3a5 Hint functions are now run in the sandbox. 2013-05-06 11:39:19 -04:00
Ned Batchelder
ed13f0a0f1 Catch up to new exception handling in responses. 2013-05-06 11:39:19 -04:00
Ned Batchelder
5e7d328e7f Use the Django cache for sandboxed code execution. 2013-05-06 11:39:19 -04:00
Ned Batchelder
c8b908a244 capa.safe_exec can use a cache. 2013-05-06 11:39:19 -04:00
Ned Batchelder
5e8e31b2d1 Add a cache attribute to ModuleSystem 2013-05-06 11:39:19 -04:00
Ned Batchelder
182a1a1899 Cleanups 2013-05-06 11:39:19 -04:00
Ned Batchelder
0021b0acb3 Refactor to move assumed_imports into capa, so that code_jail is more pure. 2013-05-06 11:39:19 -04:00
Ned Batchelder
89f6ef8407 Move capa/safe_exec into its own directory, in prep for moving code here. 2013-05-06 11:39:18 -04:00
Ned Batchelder
d925604113 Clarify provenance 2013-05-06 11:39:18 -04:00
Ned Batchelder
efaa0eea03 More fixes to the merge, now all tests pass. 2013-05-06 11:39:18 -04:00
Ned Batchelder
be79810ff6 Fix one problem from the merges 2013-05-06 11:39:18 -04:00
Will Daly
f62dad2f57 Added symbolic response tests 2013-05-06 11:39:18 -04:00
Ned Batchelder
e61a6fe787 Make it possible for customresponse check functions to get extra arguments, though they need to be declared in the XML. 2013-05-06 11:39:18 -04:00
Ned Batchelder
c49b0c5027 Have to make the globals json-safe before sending them to the sandbox. 2013-05-06 11:39:18 -04:00
Ned Batchelder
7aa493ec85 A start on getting these tests to run again. 2013-05-06 11:39:18 -04:00
Ned Batchelder
283fc47a95 Jailed code importing random explicitly would get the wrong seed. 2013-05-06 11:39:17 -04:00
Ned Batchelder
f3e8d5bb7a Didn't mean to put this in 2013-05-06 11:39:17 -04:00
Ned Batchelder
478f967af4 We would fail if a global was defined with a non-jsonable value inside a jsonable one. Now we don't/ 2013-05-06 11:39:17 -04:00
Ned Batchelder
b95ea4422b Prevent a print statement from accidentally borking the sandbox. 2013-05-06 11:39:17 -04:00
Ned Batchelder
839c568474 Hmm, turns out exec wants just one dict to properly simulate Python module execution. 2013-05-06 11:39:17 -04:00
Ned Batchelder
1473fe377a A unit test that demonstrates the problem we're having with some sandboxed code. 2013-05-06 11:39:17 -04:00
Ned Batchelder
d9df65eef0 Add some logging to codejail 2013-05-06 11:39:17 -04:00
Ned Batchelder
771de938c7 Update the instructions for setting up the sandbox. 2013-05-06 11:39:17 -04:00
Ned Batchelder
df17c0c7dd Move symmath into capa so that it's available where needed 2013-05-06 11:39:17 -04:00
Ned Batchelder
67d0670b2e Symbolic response no longer runs its checker in the Python sandbox. 2013-05-06 11:39:16 -04:00