59976 Commits

Author SHA1 Message Date
Tim Hunt
595708884a MDL-38538 quiz auto-save front end.
1. There is a new admin setting to control whether this feature is
enabled. The admin can set the auto-save frequency to 1, 2 or 5 minutes,
or disable it.

2. When autosave is enabled, there is code in the quiz that monitors the
main quiz form, and does an ajax save call at the given frequency when
changes are being made by the student.

3. The ajax saves go to a new script that calls the question engine to
do the work.

4. To avoid simultaneous autosave + submit and finish, the auto-save
system shuts down shortly before time expires in a timed quiz.
2013-03-28 16:57:24 +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
Damyon Wiese
d8201d49d8 weekly release 2.5dev 2013-03-28 14:44:31 +08:00
Damyon Wiese
9ee29404be Fix permissions 2013-03-28 14:36:33 +08:00
Damyon Wiese
86d66b5a1a Merge branch 'MDL-25631' of git://github.com/merrill-oakland/moodle 2013-03-28 09:39:05 +08:00
Eloy Lafuente (stronk7)
50206449b6 Merge branch 'MDL-38516-m' of https://github.com/andrewnicols/moodle 2013-03-27 23:56:57 +01:00
Eloy Lafuente (stronk7)
113f9a68bd Merge branch 'MDL-38520-m' of https://github.com/andrewnicols/moodle 2013-03-27 23:38:33 +01:00
Andrew Robert Nicols
81c8a42040 MDL-38516 JavaScript: Migrate moodle-block_navigation-navigation to use Shifter 2013-03-27 22:27:48 +00:00
Eloy Lafuente (stronk7)
9b79c017f9 Merge branch 'MDL-38473-m' of https://github.com/andrewnicols/moodle 2013-03-27 23:20:18 +01:00
Eloy Lafuente (stronk7)
59549129b1 Merge branch 'MDL-38404-m' of https://github.com/andrewnicols/moodle 2013-03-27 23:06:46 +01:00
Eloy Lafuente (stronk7)
f3804a0c00 Merge branch 'MDL-38472-m' of https://github.com/andrewnicols/moodle 2013-03-27 22:42:33 +01:00
Eloy Lafuente (stronk7)
cb39c6136b Merge branch 'MDL-38519-m' of https://github.com/andrewnicols/moodle 2013-03-27 22:29:21 +01:00
Eloy Lafuente (stronk7)
c4b39661b9 Merge branch 'MDL-38517-m' of https://github.com/andrewnicols/moodle 2013-03-27 21:43:30 +01:00
Eloy Lafuente (stronk7)
a8cdbbe053 Merge branch 'MDL-38471-m' of https://github.com/andrewnicols/moodle 2013-03-27 18:50:34 +01:00
Damyon Wiese
604a8ed4e5 Merge branch 'wip-MDL-38147-master' of git://github.com/marinaglancy/moodle 2013-03-27 14:11:27 +08:00
Marina Glancy
0a02b80cda MDL-38147 fixed bug with windows PHP different function behaviour 2013-03-27 17:06:27 +11:00
Marina Glancy
5e71c37ea9 MDL-38147 added comments for SQL-based course search that might not work on some DB 2013-03-27 17:05:51 +11:00
Marina Glancy
a32f163dfd MDL-38147 do not use DB->sql_length because it does not work on MSSQL 2013-03-27 16:07:29 +11:00
Aparup Banerjee
8963212472 Merge branch 'MDL-38632' of git://github.com/stronk7/moodle 2013-03-27 13:07:10 +08:00
Damyon Wiese
ddeea94a35 Merge branch 'MDL-38736-master' of git://github.com/danpoltawski/moodle 2013-03-27 12:17:47 +08:00
Damyon Wiese
5df15f2524 MDL-38717 Admin: Change setType for email to PARAM_EMAIL 2013-03-27 12:11:06 +08:00
Damyon Wiese
1b393ce91d Merge branch 'MDL-38717-master' of git://github.com/danpoltawski/moodle 2013-03-27 11:57:14 +08:00
Aparup Banerjee
cf457c2169 Merge branch 'MDL-38659' of git://github.com/stronk7/moodle 2013-03-27 10:38:31 +08:00
Dan Poltawski
8bd1829310 MDL-38736 mod_choice: fix missing param type 2013-03-27 10:19:57 +08:00
Damyon Wiese
0e2ca62e86 MDL-35876: Whitespace, indenting and more verbose upgrade.txt 2013-03-27 10:16:09 +08:00
Dan Poltawski
f6343982e1 MDL-38717 admin: missing setType on email 2013-03-27 10:14:35 +08:00
Damyon Wiese
df9bdfb000 Merge branch 'wip-MDL-35876-master' of git://github.com/phalacee/moodle
Conflicts:
	lib/upgrade.txt
2013-03-27 10:06:30 +08:00
Eloy Lafuente (stronk7)
3b597dd4ee Merge branch 'wip-mdl-38543' of git://github.com/deraadt/moodle 2013-03-27 02:00:02 +01:00
Eloy Lafuente (stronk7)
49ef0c56ef Merge branch 'MDL-38552-master' of git://github.com/FMCorz/moodle 2013-03-27 01:51:35 +01:00
Eloy Lafuente (stronk7)
381ffd46fc Merge branch 'MDL-38566-master' of git://github.com/FMCorz/moodle
Conflicts:
	theme/base/style/core.css
2013-03-27 01:49:10 +01:00
Eloy Lafuente (stronk7)
18ceea60af Merge branch 'MDL-38484_master' of git://github.com/dmonllao/moodle 2013-03-27 00:47:32 +01:00
Eloy Lafuente (stronk7)
2477bb29cc Merge branch 'MDL-38531_master' of git://github.com/dmonllao/moodle 2013-03-27 00:46:05 +01:00
Eloy Lafuente (stronk7)
64a807ae44 Merge branch 'MDL-38483_master' of git://github.com/dmonllao/moodle 2013-03-27 00:43:19 +01:00
Eloy Lafuente (stronk7)
cf140de945 Merge branch 'MDL-38557' of git://github.com/timhunt/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2013-03-26 23:38:07 +01:00
Eloy Lafuente (stronk7)
b741fac308 Merge branch 'MDL-38651' of git://github.com/timhunt/moodle 2013-03-26 23:27:16 +01:00
Eloy Lafuente (stronk7)
d89eed6fca Merge branch 'MDL-38647' of git://github.com/timhunt/moodle 2013-03-26 23:22:25 +01:00
Eloy Lafuente (stronk7)
45679e3a9e Merge branch 'w13_MDL-38589_m25_pear' of git://github.com/skodak/moodle 2013-03-26 23:14:24 +01:00
Eloy Lafuente (stronk7)
e01812b333 Merge branch 'w13_MDL-37783_m12_testinfo' of git://github.com/skodak/moodle 2013-03-26 23:13:33 +01:00
Eloy Lafuente (stronk7)
8ef5dc58ea Merge branch 'MDL-38563-master-int' of git://github.com/FMCorz/moodle 2013-03-26 23:10:11 +01:00
Eloy Lafuente (stronk7)
4efcfaa3ae Merge branch 'w13_MDL-37742_m25_dirtyoracle' of git://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-03-26 23:04:48 +01:00
Petr Škoda
e788339786 MDL-37742 add debugging message when $DB->sql_empty() used 2013-03-26 22:12:17 +01:00
Eric Merrill
c9deaa8e79 MDL-25631 backup Decoupling legacy files from course config settigs. If they are present, they will be restored. 2013-03-26 17:01:55 -04:00
Eloy Lafuente (stronk7)
2ac738f8ed Merge branch 'w13_MDL-37782_m25_testtrans' of git://github.com/skodak/moodle 2013-03-26 16:09:06 +01:00
Eloy Lafuente (stronk7)
0d377c8d56 Merge branch 'w13_MDL-38671_m25_adodb' of git://github.com/skodak/moodle 2013-03-26 16:07:12 +01:00
Eloy Lafuente (stronk7)
cf20e809aa Merge branch 'MDL-38582' of git://github.com/timhunt/moodle 2013-03-26 16:03:37 +01:00
Eloy Lafuente (stronk7)
6341d977a3 MDL-38659 environment: fix incorrect feedback messages 2013-03-26 15:34:50 +01:00
Eloy Lafuente (stronk7)
d9b9ef5d4e MDL-38659 environment: verify feedback matches levels 2013-03-26 15:34:06 +01:00
Eloy Lafuente (stronk7)
38495379a8 Merge branch 'MDL-38719' 2013-03-26 13:37:13 +01:00
Eloy Lafuente (stronk7)
caa30cd625 MDL-38719 forms: detectMissingSetType() handle of repetitions.
It seems that formslib, for repetition, relies in the type
especified by the main (non existent at the end) element, instead
of assingning a type to each repetition.

Surely a result of storing types apart from elements. :-(

With the patch, detectMissingSetType() will detect
repeated elements (name containing '[') and will
perform the verification against that main element type.
2013-03-26 13:28:47 +01:00