Ned Batchelder
|
b9d134e3d1
|
Merge pull request #2101 from edx/ned/fix-code-import-for-check-functions
Check functions need access to course-local code also, so we need to sav...
|
2013-05-22 12:32:43 -07:00 |
|
Ned Batchelder
|
392de8d40e
|
Check functions need access to course-local code also, so we need to save the python path from the problem setup, and use it for the check function.
|
2013-05-22 13:27:24 -04:00 |
|
Ned Batchelder
|
e59d345917
|
Use a different arbitrary dotted module, which Christina doesn't already have imported
|
2013-05-21 14:27:50 -04:00 |
|
Ned Batchelder
|
d0c4afb32f
|
More info in the capa/safe_exec/README
|
2013-05-16 17:02:45 -04:00 |
|
Ned Batchelder
|
e947218285
|
Merge master to here.
|
2013-05-16 14:21:51 -04:00 |
|
Ned Batchelder
|
bbd1d8d09e
|
From code review: the hash was shallow, so nested objects could have hashed differently when they didn't need to.
|
2013-05-16 13:58:05 -04:00 |
|
Ned Batchelder
|
f05b25d17a
|
Added more to the safe_exec docstring.
|
2013-05-16 13:15:28 -04:00 |
|
Calen Pennington
|
52d209d053
|
Use coffee installed in local node_modules for tests
|
2013-05-15 15:25:41 -04:00 |
|
Calen Pennington
|
964c21ff2b
|
Add a jasmine test runner for capa
|
2013-05-15 15:23:56 -04:00 |
|
Calen Pennington
|
ef17e9368c
|
Make capa specify distribute 0.6.28 like the rest of the project
|
2013-05-15 15:23:56 -04:00 |
|
Ned Batchelder
|
b32878e6c7
|
Added instructions for getting capa sandboxed.
|
2013-05-15 12:59:56 -04:00 |
|
Carlos Andrés Rocha
|
9a671f12d7
|
Fix import con resposetype when importing xqueue_interface
|
2013-05-14 17:15:46 -04:00 |
|
Ned Batchelder
|
4ea7607648
|
Check that the directory being added to the Python path is really inside the course.
|
2013-05-14 14:59:19 -04:00 |
|
Peter Baratta
|
d80024472c
|
Pylint fixes
|
2013-05-13 12:40:32 -04:00 |
|
Peter Baratta
|
06efd40ba9
|
Comment capitalization
|
2013-05-13 11:29:46 -04:00 |
|
Peter Baratta
|
2b9d78dfd5
|
Pep8 fixes and changes to NaN tests
|
2013-05-13 10:18:19 -04:00 |
|
Peter Baratta
|
a1db394bcd
|
Test for infinity in numerical and formula responses
|
2013-05-10 15:22:23 -04:00 |
|
Peter Baratta
|
f970bbd121
|
Add tests on the problem level that show the infinite answer bug
|
2013-05-10 15:21:29 -04:00 |
|
ichuang
|
2bb180a353
|
Merge pull request #1935 from edx/fix/formularesponse_needs_samples
formularesponse requires the "samples" attribute
|
2013-05-09 19:02:57 -07:00 |
|
Ned Batchelder
|
6264d41f92
|
Very minor docstring tweak :)
|
2013-05-08 14:48:46 -04:00 |
|
Will Daly
|
4f33b8e0c0
|
Fixed a UnicodeEncodeError that occurred when generating cache keys
from non-ASCII unicode code submissions.
|
2013-05-06 15:04:20 -04: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
|
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
|
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
|
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
|
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
|
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
|
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
|
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 |
|
Ned Batchelder
|
94f6e685df
|
Mock the response from the snuggletex server, and unskip the SymbolicResponse test.
|
2013-05-06 10:55:07 -04:00 |
|
Ned Batchelder
|
81c4e4f74f
|
Make check_function more flexible so symbolicresponse can pass in more information.
|
2013-05-06 10:55:06 -04:00 |
|
Ned Batchelder
|
a40aed58d0
|
Clean up
|
2013-05-06 10:55:06 -04:00 |
|