2512 Commits

Author SHA1 Message Date
Jean-Michel Vedrine
60527d0c34 MDL-10516 Pre-populated answer (template) in essay questions 2013-04-03 11:30:42 +08:00
Dan Poltawski
89cc9816dc Merge branch 'MDL-38538_clean' of git://github.com/timhunt/moodle 2013-04-03 09:55:21 +08:00
Tim Hunt
d122fe3245 MDL-38538 question autosave: fix missing method.
Also change the unit tests to detect this problem.
2013-04-02 16:53:25 +01:00
Damyon Wiese
cc067484a8 Merge branch 'MDL-38711-master' of git://github.com/danpoltawski/moodle 2013-04-02 16:17:25 +08:00
Jean-Michel Vedrine
9219089a72 MDL-38808 Remove deprecated unzip_file from qformat blackboard_six 2013-04-01 09:34:07 +02:00
Jean-Michel Vedrine
1e8f4e54c7 MDL-19072 XHTML export for match questions fix for distractors 2013-03-31 15:13:44 +02:00
Jonathon Fowler
c8845ca917 MDL-38705 qformat_blackboard_six: use qti title as category name
Specifically, the title on the 'assessment' element is used.
2013-03-31 14:00:01 +10:00
Tim Hunt
dc1ee5cb29 MDL-34640 question repsponse files: remaining tidy up of this code. 2013-03-30 21:16:18 +00:00
Mathieu Petit-Clair
d0782585c8 MDL-34640: adding code to pass contextid and question type to question_file_loader. 2013-03-30 19:57:03 +00:00
Tim Hunt
8a1e7b7756 MDL-34640 quesion reponse files: PARTIAL SOLUTION to allowing resonse files to be graded automatically. 2013-03-30 19:53:15 +00:00
Colin Chambers
c7218aef8d MDL-36570 question editing: group answer/choice fields better. 2013-03-28 17:25:45 +00:00
Tim Hunt
0a606a2be2 MDL-38538 question auto-save back end.
1. Autosave works in some ways just like a normal save. We ultimately
call $behaviour->process_save() to do the work, and create a new step to
hold the data.

2. However, we come in through a completely different route through the
API, starting with separate auto-save methods. This keeps the auto-save
changes mostly separate, and so reduced the chance of breaking existing
working code.

3. When the time comes to store the auto-save step in the database, we
save it using a negative sequence number.

This is a clever trick that not only distinguises these steps, but also
avoids unique key errors when an auto-save and a real action happen
simultaneously. (There are unit tests for these tricky edge cases.)

4. When we load the data back from the database, most of the time the
auto-save steps are loaded back as if they were a real save, and so the
auto-saved data is used when the question is then rendered.

5. However, before we process another action, we remove the auto-saved
step, so it does not appear in the final history.
2013-03-28 16:51:59 +00:00
Tim Hunt
eca230b521 MDL-38538 question unit tests: improve things a bit.
1. Split the question_attempt tests into one class per file.
2. Imporve the API to give tests more control, and to test more of the
   important code. Some of this is not used here, but it is about to be.
2013-03-28 16:05:34 +00:00
Eloy Lafuente (stronk7)
cf20e809aa Merge branch 'MDL-38582' of git://github.com/timhunt/moodle 2013-03-26 16:03:37 +01:00
Dan Poltawski
e380d57fb6 MDL-38711 qtype_multianswer: missing setType param 2013-03-26 16:57:01 +08:00
Damyon Wiese
96a9273343 Merge branch 'MDL-38528' of git://github.com/timhunt/moodle 2013-03-26 14:57:04 +08:00
Jonathon Fowler
8bcefa699d MDL-38390 qformat_blackboard_six: use pool title as category name
If the category title is empty, generate a sequentially-numbered
title to use instead.
2013-03-23 17:35:16 +10:00
Tim Hunt
ba203de1d3 MDL-38582 testing: Let any component have a data generator.
Plus a simple core_question generator to test the concept.
2013-03-22 10:28:24 +00:00
Tim Hunt
d6b8e1923a MDL-38528 qtype_calc* dataset forms: disable short-forms for now.
At the moment using short-forms no these forms really does not work. In
future is may be possible to do a complete overhaul, but for now, just
disabling short-forms is a simple fix.
2013-03-22 10:28:03 +00:00
Eloy Lafuente (stronk7)
8b994ec0b9 Merge branch 'MDL-38490' of git://github.com/timhunt/moodle 2013-03-20 00:43:09 +01:00
Eloy Lafuente (stronk7)
65b5f400b8 Merge branch 'MDL-38395' of git://github.com/timhunt/moodle 2013-03-19 23:06:06 +01:00
Eloy Lafuente (stronk7)
989b9ab6fb Merge branch 'MDL-38363' of git://github.com/timhunt/moodle 2013-03-19 21:02:48 +01:00
Eloy Lafuente (stronk7)
28a5cd942d Merge branch 'MDL-38355' of git://github.com/timhunt/moodle 2013-03-19 21:00:21 +01:00
Eloy Lafuente (stronk7)
49ac0c5d6a Merge branch 'MDL-38388' of git://github.com/jonof/moodle 2013-03-19 18:47:39 +01:00
Eloy Lafuente (stronk7)
b81d5eab90 Merge branch 'MDL-38542' of git://github.com/timhunt/moodle 2013-03-19 16:48:37 +01:00
Eloy Lafuente (stronk7)
1e1815bead Merge branch 'MDL-38444' of https://github.com/ppichet/moodle 2013-03-19 16:33:28 +01:00
Tim Hunt
1736fe3f74 MDL-38542 shortanswer qtype: was broken for responses of '0'.
This was a regression caused by MDL-37157 & MDL-37746.
2013-03-19 13:40:51 +00:00
Eloy Lafuente (stronk7)
70ca006538 Merge branch 'MDL-38397' of git://github.com/timhunt/moodle 2013-03-19 12:28:01 +01:00
Damyon Wiese
864ce820c4 MDL-38005 formslib: Removing additional duplicate headers in calculated question form. 2013-03-18 14:11:09 +08:00
Damyon Wiese
7c211f565a Merge branch 'MDL-38005-master' of git://github.com/FMCorz/moodle 2013-03-18 13:45:41 +08:00
ppichet
e605209ad6 MDL-38444 Saving datasets from edit_calculatedsimple_form.php
Bypassing the 3 steps savequestion() of calculated.
2013-03-16 23:36:44 -04:00
Tim Hunt
c52bcbf65f MDL-38363 qtype_calculated. Fix warnings. 2013-03-15 11:22:38 +00:00
Tim Hunt
8009810ed4 MDL-38395 question categories: wrong URLs after editing.
The problem was that array1 + array2 takes the values from
array1 when a key appears in both places.

While working on this area, I updated it to use html_writer.
2013-03-15 08:12:39 +00:00
Frederic Massart
807cf3d0ae MDL-38005 form: Headers have a proper name 2013-03-15 11:06:25 +08:00
Jonathon Fowler
e5ca31fa4d MDL-38388 qformat_blackboard_six: fix question image import
This works on the expectation that the returned array from readdata()
is opaque and will be fed directly into readquestions() since
filebase is different per file and needs to be set up appropriately
before each parse.
2013-03-15 09:08:57 +10:00
Tim Hunt
c81175f532 MDL-38355 qtype_multianswer: input boxes too big in Russian.
... and any other language where the characters take multiple
bytes in UTF-8.

This fix was worked out by Dušan Ristić. I am just committing it.
2013-03-14 22:24:37 +00:00
Tim Hunt
1aecaa3d79 MDL-38397 question editing: only validate default mark if present.
Most qtypes have that field, but not all. multianswer is an example in core.
Also some contrib qtypes.
2013-03-14 22:11:49 +00:00
Tim Hunt
2443f3d21d MDL-38490 question preview, variant is attempt (not display) option 2013-03-14 17:21:16 +00:00
Jean-Michel Vedrine
3f28674535 MDL-33424 Images missing when restoring a 1.9 backup 2013-03-09 13:51:34 +01:00
Eloy Lafuente (stronk7)
69d0129389 Merge branch 'MDL-38311' of git://github.com/timhunt/moodle 2013-03-06 10:36:24 +01:00
Tim Hunt
770e4a467f MDL-38311 question manual grading: comment fixes. 2013-03-06 09:27:11 +00:00
Eloy Lafuente (stronk7)
6026f23559 MDL-38311 Add missing comment format. 2013-03-06 02:02:45 +01:00
Eloy Lafuente (stronk7)
9f4da038c8 Merge branch 'MDL-38311' of git://github.com/timhunt/moodle 2013-03-06 01:22:32 +01:00
Eloy Lafuente (stronk7)
af733564f4 Merge branch 'MDL-38119' of git://github.com/timhunt/moodle 2013-03-05 16:45:01 +01: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
Aparup Banerjee
810fb772c3 Merge branch 'MDL-38240' of git://github.com/timhunt/moodle 2013-03-05 16:00:49 +08:00
Damyon Wiese
915b7aca62 Merge branch 'MDL-38279' of git://github.com/timhunt/moodle 2013-03-05 15:22:38 +08:00
Damyon Wiese
ffb95d5fdc Merge branch 'MDL-38241' of git://github.com/timhunt/moodle 2013-03-05 14:13:42 +08:00
Damyon Wiese
6fbf382cd4 Merge branch 'MDL-38280' of git://github.com/timhunt/moodle 2013-03-05 14:10:00 +08:00
Sam Hemelryk
44cfa89576 Merge branch 'MDL-38094' of git://github.com/timhunt/moodle 2013-03-05 16:57:50 +13:00