Commit Graph

1366 Commits

Author SHA1 Message Date
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
Will Daly
1df35507a3 Changed 'in' to '==' to fix bug #258 2013-03-25 14:13:47 -04:00
Victor Shnayder
f0e1b477f7 Merge pull request #1703 from MITx/feature/diana/matlab-input
Matlab Input Type
2013-03-25 08:27:56 -07:00
Diana Huang
4bda05d9eb Fix seed assignment priority and add clearer documentation 2013-03-25 11:22:56 -04:00
Diana Huang
cda0fa0aa5 Check for None specifically when setting a new seed. 2013-03-25 11:08:51 -04:00
Jay Zoldak
08c5ab3cc9 pep8 fixes 2013-03-22 11:38:58 -04:00
Diana Huang
204f89d4dc Make sure we are still showing the
message when we are queued as well.
2013-03-20 17:16:04 -04:00
Diana Huang
af1af8c6d1 Address code review feedback:
- improve docstrings
- only pass in the state for a particular input and
not the whole dictionary
- refactor some common code
- minor syntax cleanup
2013-03-20 14:14:54 -04:00
Diana Huang
10c6e7615b More polish for matlab input type 2013-03-20 10:09:44 -04:00
Diana Huang
57f7acf863 Unbreak grading for capa problems
Clean up some pylint errors
2013-03-20 09:23:25 -04:00
Diana Huang
a2957cb3b7 Add in some JS messages for when things go wrong. 2013-03-20 09:23:25 -04:00
Diana Huang
f4d68d77f6 Add Javascript for new button and fix Python backend issues 2013-03-20 09:23:25 -04:00
Diana Huang
521c469a35 Add the ability for input types to have their own state
and add in a handler for ungraded responses via xqueue
2013-03-20 09:23:25 -04:00
Diana Huang
45d8086e1c Set up ajax to submit to XQueue. Add some unit tests to make sure
this is working properly
2013-03-20 09:23:25 -04:00
Diana Huang
eda6169b8b Pass along a url creator as opposed to just a url through
the ModuleSystem.
2013-03-20 09:23:25 -04:00
Diana Huang
58e8f7db12 - Pep8 and pylint fixes
- beginnings of new Matlab input type
- update progress after getting a response from xqueue
2013-03-20 09:23:25 -04:00
jmclaus
8e7990598c Merge branch 'master' into jmclaus/genex-save-state 2013-03-20 09:23:16 +01:00
jmclaus
57b43d7a6c Genex now saves its state 2013-03-19 16:36:55 +01:00
Will Daly
568f557dfc Pep8 fixes
Changed constant to uppercase
2013-03-18 13:57:26 -04:00
Will Daly
8423816076 LMS contentstore lettuce tests now dynamically create courses in mongo
using terrain.factories.py and capa.tests.response_xml_factory
2013-03-15 14:04:22 -04:00
Calen Pennington
f1d4096bcd Mark snippets as raw strings to avoid having to escape backslashes 2013-03-15 11:52:50 -04:00
Calen Pennington
6b64b4214f Make relative imports explicitly relative 2013-03-15 11:23:22 -04:00
Calen Pennington
fd3ba7db2a Don't make cms.djangoapps a python module 2013-03-15 10:50:46 -04:00
Calen Pennington
cfd7e6d214 Coerce correctmap keys to strings, so that they are pickleable 2013-03-12 09:32:19 -04:00
Calen Pennington
2113541632 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	.ruby-version
	cms/djangoapps/contentstore/tests/test_contentstore.py
	cms/djangoapps/models/settings/course_metadata.py
	common/lib/xmodule/xmodule/course_module.py
	common/lib/xmodule/xmodule/modulestore/tests/factories.py
2013-03-12 07:23:28 -04:00