Commit Graph

745 Commits

Author SHA1 Message Date
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
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
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
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
David Ormsbee
aceb666076 Merge pull request #1642 from MITx/fix/rocha/numericresponse-exponential
Make numeric response handle plus sign exponential correctly
2013-03-11 10:03:44 -07:00
Carlos Andrés Rocha
5f95c6848c Make numeric response handle plus sign exponential correctly
NumericResponse was failing to accept as correct an answer with a plus
sign in the exponential. For example: 5.0e+1 was marked as incorrect
if the answer was 50. However, 5.0e1 was marked as correct. This
caused confusion, since the answer shown to students included the plus
sign.

LMS Lighthouse [#242]
2013-03-11 12:53:01 -04:00
Calen Pennington
95f8f811c5 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	common/lib/xmodule/xmodule/course_module.py
2013-03-11 10:49:29 -04:00
Diana Huang
421e169e1e Update tests with new attributes. 2013-03-11 10:29:18 -04:00
Diana Huang
0c949d20c9 Add the ability to hide correctness markers
with a custom message for when they submit something.
2013-03-11 10:12:33 -04:00
Will Daly
607f27e715 Fixed undefined variable error in choicegroup.html 2013-03-08 14:06:45 -05:00
Calen Pennington
8ae336792a Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged 2013-03-08 12:00:10 -05:00
Will Daly
352126b417 Updated tests for correct_map to match changes made to get_npoints 2013-03-08 10:08:20 -05:00
Victor Shnayder
96541c434e Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged 2013-03-08 00:43:46 -05:00
Victor Shnayder
84f05f9f61 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	common/lib/xmodule/xmodule/capa_module.py
	common/lib/xmodule/xmodule/foldit_module.py
	common/lib/xmodule/xmodule/tests/__init__.py
	common/lib/xmodule/xmodule/tests/test_capa_module.py
	common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
	common/lib/xmodule/xmodule/tests/test_conditional.py
	common/lib/xmodule/xmodule/tests/test_self_assessment.py
2013-03-08 00:40:18 -05:00
David Ormsbee
5f44b2de04 minor comment on partial credit 2013-03-07 23:52:01 -05:00
David Ormsbee
30f3923c15 Quick patch to regression causing partial credit to break on 6.00x 2013-03-07 23:50:09 -05:00
Diana Huang
2c6ee50ac3 Fix issue where javascript was disappearing from problem html 2013-03-07 19:39:43 -05:00
Will Daly
e86ed0db91 Merge branch 'master' into fix/will/mc_checkbox_bug 2013-03-07 12:07:34 -05:00
Will Daly
8d83d2fb4e Added handling of condition when no multiple choice item selected,
but the answer is incorrect.
2013-03-07 10:52:19 -05:00
Will Daly
e841f29352 Updated CSS and template for choicegroup response
so that: a) checks/x marks appear after each option
for radio buttons, b) checks/x marks appear for the
entire problem (not individual options) for checkbox
buttons.

Also fixed issue with checks appearing on the next line
by changing <text> to display:inline instead of display:block
2013-03-07 10:17:03 -05:00
Victor Shnayder
b6a6e10bb5 Fix max_attempts=''
That's what studio defaults to, and recent changes made it break.
Added a few tests to make sure it doesn't happen again.
2013-03-06 20:16:24 -05:00
jkarni
3bb108b12e Merge pull request #1608 from MITx/feature/jkarni/genex
Feature/jkarni/genex
2013-03-06 14:35:01 -08:00
Diana Huang
5c3dfd9280 Update correctmap to handle partially correct answers, and
fix annotation tests so that they use the new test_system functionality
2013-03-06 16:43:12 -05:00
Victor Shnayder
12b6b7d403 Merge pull request #1609 from MITx/diana/refactor-chemical-equation
Refactor Chemical Equation Preview
2013-03-06 12:09:03 -08:00
Victor Shnayder
fb350ed1e3 Merge pull request #1569 from MITx/feature/abarrett/annotatable_xmodule
Feature/abarrett/annotatable xmodule DO NOT MERGE
2013-03-06 12:05:27 -08:00