31 Commits

Author SHA1 Message Date
James Pratt
99caa248a8 MDL-43478 quiz responses report : display last / first / all tries
when using multiple try question behaviour
2014-02-23 13:39:08 +07:00
Eloy Lafuente (stronk7)
f39c82ebed MDL-42701 Bump all versions near 2.6 release 2013-11-05 02:36:00 +01:00
Tim Hunt
f3460297a9 MDL-32188 question engine: behaviour static methods -> new classes
It was always a bit of a hack to use static methods on the
qbehaviour_whatever classes to return metadata about the behaviour. It
is better design to have real qbehaviour_whatever_type classes to report
that metadata, particularly now that we are planning to add more such.

For example, inheritance works better with real classes. See, for
example, the improvements in
question_engine::get_behaviour_unused_display_options().

This change has been implemented in a backwards-compatbile way. Old
behaviours will continue to work. There will just be some developer debug
output to prompt people to upgrade their code properly.
2013-10-04 12:15:01 +01:00
Jean-Michel Vedrine
d56ab3b992 MDL-29758 make Cloze question feedback display more informative
as it was in Moodle 1.9
2013-05-09 07:55:43 +02:00
Eloy Lafuente (stronk7)
cedb0aab5a MDL-39434 Bump all versions near 2.5 release 2013-05-01 18:03:29 +02:00
Tim Hunt
53b8e25626 MDL-38311 questions: manual grading API should accept commentformat
Comment format (FORMAT_...) was correctly being processed when the
manual grading happened as the result of a form submission. It was only
when done using the question_usage or question_attempt API method that
there was no way to specify the format. (Although I think the only place
this API as used was in the unit tests.)

Note that question_attempt::manual_grade API had to change, but I don't
think that is a real API change. Calling code should be using
question_usage::question_attempt, which is backwards compatible.

Note that now, if you don't pass format, then no error is generated, but
a developer debugging message is generated.
2013-03-05 11:51:47 +00:00
Tim Hunt
03cefcc91b MDL-37506 question code: incorrect preg_quote uses.
For preg_quote to work reliably, you must pass the delimiter you are
using for your regular expression. In many places we were failing to do
that.
2013-01-18 11:18:54 +00:00
Eloy Lafuente (stronk7)
663dbbc2e6 MDL-36933 Bump everything to 2012112900
(versions, requires and dependencies)
2012-11-30 03:30:09 +01:00
Tim Hunt
a3e6ad77d2 MDL-34066 adaptive behaviour: refactor logic out of renderer.
These changes move the logic to the behaviour class, which is how things
should be.

It also makes it easier to re-use the code that displays the messages
like "Marks for this submission: 1.00/1.00. Accounting for previous
tries, this gives 0.33/1.00." in other places.

To try to make it clearer what is going on, I introduced a new class
qbehaviour_adaptive_mark_details to hold and document the data that the
behaviour needs to return, and the renderer can base its display on.

As far as my testing can tell (and there are new unit tests), this
commit does not change the existing behaviour.

This commit also replaces all the string concatenation that is going on,
which should help translators. At the moment, a few of the old strings
are still in the language file, and are used in the unit tests to verify
that the behaviour has not changed.

Thanks to Oleg Sychev for making a helpful suggestion about the API.
2012-07-19 12:50:17 +01:00
Eloy Lafuente (stronk7)
c5e783e512 MDL-33794 version.php: Bump all versions, requires and dependencies to 2012061700 2012-06-18 02:37:00 +02:00
Petr Skoda
2338458ac5 MDL-32569 drop all migrated question simpletests 2012-04-21 16:43:34 +02:00
Petr Skoda
603bd00112 MDL-32323 convert question tests
1/ type/match/tests/walkthrough_test.php - tests are failing randomly, looks like some weird randomisation is going on there - see TODOs

2/ type/multianswer/tests/upgradelibnewqe_test.php contains invalid expected value - see TODO
2012-04-10 15:27:11 +02:00
Tim Hunt
3159bf92e0 MDL-31065 qtype shortanswer: refactor the unit tests to use a proper helper. 2012-01-20 17:27:55 +00:00
Henning Bostelmann
096c30165b MDL-30031 Adaptive question behaviour: ignore invalid answers without penalty 2011-12-28 17:17:52 +00:00
Henning Bostelmann
4c0b36283a MDL-29772 Adaptive question behaviour: improve penalty information
also fixes MDL-29780: suppress penalty information if question penalty is 0
2011-12-06 10:46:50 +00:00
Tim Hunt
3d17cd3f1c MDL-30300 qbehaviours: convert to the new is_compatible_question API. 2011-11-16 11:11:10 +00:00
Tim Hunt
75a31c9039 MDL-29808 qbehaviours: update to use ->dependencies in version.php 2011-11-10 19:12:25 +00:00
Henning Bostelmann
cc9fc649a1 MDL-28219 QE2 adaptive behaviour: fix scores and penalties 2011-10-12 23:27:10 +01:00
Tim Hunt
5cc532e8e9 MDL-28024 adaptive qbehaviour. Displayed penalties not rounded correctly. 2011-06-24 14:26:49 +01:00
Tim Hunt
88ef9d0b2b MDL-27916 Question state was described wrongly in adaptive and immediate feedback behaviours. 2011-06-18 13:29:39 +01:00
Tim Hunt
9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01:00
Tim Hunt
1631ceeaec MDL-20636 Fix codechecker issues in the question behaviours. 2011-04-08 07:24:24 +01:00
Tim Hunt
6d03fd9830 MDL-20636 Fix for Bug 11593 merged from our 1.9 version. #268 2011-03-16 14:34:19 +00:00
Tim Hunt
f7970e3ca7 MDL-20636 Eliminate integer and boolean in PHPdoc comments. should be int and bool. 2011-02-23 16:25:25 +00:00
Tim Hunt
a17b297d60 MDL-20636 Add missing defined('MOODLE_INTERNAL') || die(); 2011-02-23 16:00:20 +00:00
Tim Hunt
017bc1d9f3 MDL-20636 Fix @package names in question/behaviour, question/engine and question top level. 2011-02-22 20:50:18 +00:00
Tim Hunt
0ff4bd0877 MDL-20636 Fix new stdClass -> stdClass(), and trailing whitespace. 2011-02-21 18:10:19 +00:00
Tim Hunt
aa9bdbe31c MDL-20636 Boilerplate and other cleanup in the question core code.
This includes converting behaviours to pluginname strings.
2011-02-21 18:00:15 +00:00
Tim Hunt
cce1b6556c MDL-20636 Fix a bunch of minor errors in the truefalse preview.
Most significantly, all behaviours now work.
2011-01-13 18:35:46 +00:00
Tim Hunt
2b7da64586 MDL-20636 It is now possible to save a truefalse question you have created.
This includes all the necessary DB upgrades.

Also all unit tests in question/type/simpletest and question/type/truefalse now pass.
2011-01-13 18:35:41 +00:00
Tim Hunt
d1b7e03d5d MDL-20636 Current work-in-progress converting the question engine to Moodle 2.0 2011-01-13 18:35:29 +00:00