moodle/question/behaviour
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
..
adaptive MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
adaptivenopenalty MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
deferredcbm MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
deferredfeedback MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
immediatecbm MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
immediatefeedback MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
informationitem MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
interactive MDL-38311 questions: manual grading API should accept commentformat 2013-03-05 11:51:47 +00:00
interactivecountback MDL-37506 question code: incorrect preg_quote uses. 2013-01-18 11:18:54 +00:00
manualgraded MDL-38311 Add missing comment format. 2013-03-06 02:02:45 +01:00
missing MDL-37506 question code: incorrect preg_quote uses. 2013-01-18 11:18:54 +00:00
behaviourbase.php MDL-38538 question auto-save back end. 2013-03-28 16:51:59 +00:00
rendererbase.php MDL-36422 question: Fixed malformed HTML in manual marking 2012-11-08 10:20:22 +08:00
upgrade.txt MDL-36887 quiz: reorder upgrade.txt's 2012-11-30 11:41:01 +08:00