Commit Graph

790 Commits

Author SHA1 Message Date
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
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
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
Victor Shnayder
9c4a88b570 Merge pull request #1743 from MITx/fix/will/bug_288
Fix/will/bug 288
2013-04-01 07:22:20 -07:00
David Ormsbee
24e64e3946 Merge pull request #1773 from MITx/hotfix/dave/mult_choice_display
HOTFIX: Accept either a list of possible values, or a string as a value for

I'm pulling this in myself because it's urgent, it's the weekend, and I don't want this to get forgotten.
2013-03-30 08:55:45 -07:00
David Ormsbee
dfd3a699b9 Accept either a list of possible values, or a string as a value for
comparison of correctness in multiple choice.

Multiple choice code is scattered and sometimes sends a list of
choices for the value, and sometimes a single string. We used to use
"in" which scarily handled both cases (list or substring search),
but that caused a bug when you had two choices like choice_1 and
choice10. Moving to == caused us to break when lists were sent to
us. So this ugly code is extra paranoid and checks both possibilities.

This really needs a better cleanup.
2013-03-30 11:09:44 -04:00
Ned Batchelder
0cfcd183b2 No need to wrap comments that tightly. 2013-03-29 15:05:22 -04:00
Ned Batchelder
e8f8e9e197 Enough is enough. 2013-03-29 14:49:24 -04:00
Will Daly
f90dd49556 Fixed bug in parsing of urandom struct so that seed
is set to an integer (and correctly saved) instead of a tuple.
2013-03-29 10:18:11 -04:00
Will Daly
f038237ee9 Changed log.exception to log.warning 2013-03-27 16:34:08 -04:00
Will Daly
df1be87739 * Changed 404 errors to 400 errors
* Removed duplicate traceback log message
* Now provide string, not Exception, as second tuple item to raise
2013-03-27 15:20:40 -04:00
Will Daly
99cd3fafdb Added error handling of XModule processing errors to CMS
Added tests for SchematicResponse error handling
2013-03-27 14:48:44 -04:00
Will Daly
ac86687fa1 Added exception handling that solves SchematicResponse exceptions
causing a 500 error.

When XModule raises a ProcessingError during an AJAX request,
this module_render now returns a 404 to further reduce number of 500
responses.
2013-03-27 14:33:59 -04:00
Will Daly
0f5e8c5f3b pep8 fixes 2013-03-27 11:17:21 -04:00
Will Daly
5bc44e50da Changed error messages to account for NumericalResponse formatting,
which is the only other response type to use StudentInputError.
2013-03-27 11:13:31 -04:00
Will Daly
285e3ee1ed Capa response now displays full stack trace on student input error
if the user is a staff member.
Otherwise, it displays just the exception message.
2013-03-27 10:49:47 -04:00
Diana Huang
967cf7e6f3 Fix a problem where trying to show image response answers
was causing 500 errors. Add test to verify that this won't
happen again.
2013-03-26 14:43:41 -04:00
Will Daly
cd6f92c7e2 Modified log.debug call to use exc_info=True 2013-03-26 14:27:41 -04:00
Will Daly
1b07b85ef2 Removed extra 'pass' statement 2013-03-26 13:43:26 -04:00
Will Daly
47e47303dc Refactored CustomResponse to use the same private
func to handle all errors related to execution of
python code.

CustomResponse now returns subclasses of Exception
instead of general Exceptions

CustomResponse no longer includes tracebacks
in the exceptions it raises (and shows to students)
2013-03-26 13:36:27 -04:00
Will Daly
3084361042 Updated template to correctly handle checkbox values 2013-03-25 15:12:06 -04:00