Commit Graph

808 Commits

Author SHA1 Message Date
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
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
Diana Huang
fd35b2c7e3 Fix and create new test for trailing text 2013-04-12 10:59:03 -04:00
Diana Huang
c93b8076bf Add trailing text to textlines, most useful for units. 2013-04-12 10:59:03 -04:00
Diana Huang
2230fe3c23 Set the queue_len more consistently. 2013-04-03 15:08:33 -04:00
Diana Huang
8cd4220b5f Fix the conditions by which we show the queueing message
for Matlab inputs
2013-04-03 10:48:27 -04:00
Diana Huang
c658c65149 Add new Matlab unit tests. 2013-04-03 10:17:28 -04:00
John Hess
17fa312b26 Merge pull request #1695 from MITx/jmclaus/genex-save-state
Genex now saves its state
2013-04-02 07:58:17 -07:00
Will Daly
1cba122dc0 Undid accidental commit of pylint fixes to responsetypes 2013-04-01 13:47:59 -04:00
Will Daly
87d8a56a93 CustomResponse now imports chem packages into the global
context for scripts to access.
This was removed accidentally during an earlier refactoring,
which caused customresponse to raise an exception for chem problems.
Unit tests verify the changes
2013-04-01 13:27:31 -04:00