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
Ned Batchelder
4fb73248ba
Try to get <symbolicresponse> test running. (Not yet)
2013-05-06 10:55:06 -04:00
Ned Batchelder
4b234a63a3
Future division is really a capa concern, not a general-purpose codejail concern. Move it.
2013-05-06 10:55:06 -04:00
Ned Batchelder
7187b10f9c
Use the python_path argument to safe_exec
2013-05-06 10:55:06 -04:00
Ned Batchelder
a04317b31d
Files are properly copied in both implementations of safe_exec, and a new python_path argument adds to the python path.
2013-05-06 10:55:06 -04:00
Ned Batchelder
abb9174559
Refactor how script chunks are run.
2013-05-06 10:55:06 -04:00
Ned Batchelder
12b6876753
safe_exec seeds the random module, and now we have tests for it.
2013-05-06 10:55:06 -04:00
Ned Batchelder
716a97ea59
Symbolic response doesn't need to pre-import symmath any more, I think?
2013-05-06 10:55:05 -04:00
Ned Batchelder
7c498be606
Move packages around so we can install packages into the sandbox.
2013-05-06 10:55:05 -04:00
Ned Batchelder
5db5426e05
Use the real safe_exec; make the seed available in the context.
2013-05-06 10:55:04 -04:00
Ned Batchelder
19e3a0ceb9
Implement safe_exec on top of jailpy (old unsafe safe_exec is still here); Remove some crazy stuff from the context; always pass globals and locals, locals are the things that can be changed.
2013-05-06 10:55:04 -04:00
Ned Batchelder
908f44b9cd
snippets aren't used. Remove them.
2013-05-06 10:55:04 -04:00
Ned Batchelder
248017b4ea
No longer need to support <coderesponse> without <codeparam>, so scrap the code.
2013-05-06 10:55:04 -04:00
Ned Batchelder
a6677aa0a8
Computed answers are run through safe_exec.
2013-05-06 10:55:04 -04:00
Ned Batchelder
37ca6bf77e
Move our specialization of safe_exec into a new module to avoid circular imports.
2013-05-06 10:55:04 -04:00
Ned Batchelder
33abe54e0d
Work in progress to sandbox the uses of eval in LMS.
2013-05-06 10:55:03 -04:00
ichuang
60977b0e74
formularesponse requires the "samples" attribute; enforce this,
...
instead of just failing with an obscure error
2013-05-02 18:56:15 -04:00
Sarina Canelake
2cb3af1e35
Only throw factorial-related exception on factorial raised exception
2013-05-01 10:53:22 -04:00
Sarina Canelake
95a224fcea
Fix pep8 violations
2013-04-30 11:21:20 -04:00
Sarina Canelake
573116073e
Add error message when factorial given non-integral value
2013-04-30 11:16:14 -04:00
Sarina Canelake
f95331dcc1
fix more pep8 violations
2013-04-29 15:01:11 -04:00
Sarina Canelake
6993daf116
Fix pep8 violations
2013-04-29 15:01:05 -04:00
Sarina Canelake
46792c82de
Remove debugging print statements
2013-04-29 15:00:54 -04:00
Sarina Canelake
ed43afb08f
Add additional unit test comment
2013-04-29 15:00:45 -04:00
Sarina Canelake
696879bd26
Add unit tests for formularesponse type
2013-04-29 15:00:36 -04:00
Sarina Canelake
c79843c541
Add factorial as a default function for formula response
2013-04-29 15:00:26 -04:00
Diana Huang
32881ed265
Change the name of the button so that it is clearer.
2013-04-22 16:38:41 -04:00
Diana Huang
181eebc942
Miscellaneous updates and fixes.
...
* Hide "Test Code" button after we check the problem
* Only set the state of the problem to 'queued' if we have successfully
queued the problem
* Unit tests for bugs and new functionality
2013-04-18 16:37:36 -04:00
Diana Huang
03daefb924
Change the name of the plot button
2013-04-18 14:31:51 -04:00
Will Daly
a4717aca90
Pep8 fixes
2013-04-18 09:49:05 -04:00
Will Daly
a57a093e73
Rebased to master
2013-04-17 15:56:05 -04:00
Will Daly
841d3484c8
Added test for textline input template
2013-04-17 15:46:24 -04:00
Will Daly
52c2f3ae37
Tested additional values of rerandomize (true/false/per_student)
...
Pylint fixes
2013-04-17 15:32:39 -04:00
Will Daly
754d1eb702
Added tests for ChoiceGroup template
2013-04-17 15:32:39 -04:00
Will Daly
917945807b
Pep8 fixes for drag and drop tests
2013-04-12 16:37:52 -04:00
Diana Huang
ff1189c5e8
Pylint and Pep8 fixes
2013-04-12 13:23:42 -04:00
Diana Huang
06a54a8c38
Consolidate tests into one larger test
2013-04-12 10:59:03 -04:00
Diana Huang
ab7a616552
Add the ability to handle escaped HTML characters in trailing text
...
Add tests for unicode and escaped HTML characters
2013-04-12 10:59:03 -04:00
Diana Huang
d6e722a698
Remove unnecessary check and add better textline documentation
2013-04-12 10:59:03 -04:00