1999 Commits

Author SHA1 Message Date
Michael Aherne
2af7d0d8d0 MDL-31495 Performance improvement in question engine upgrade SQL 2012-02-10 15:24:43 +00:00
Eloy Lafuente (stronk7)
ba353742ce Merge branch 'MDL-30854' of git://github.com/timhunt/moodle 2012-01-31 19:30:58 +01:00
Eloy Lafuente (stronk7)
7ce92ac1ad Merge branch 'MDL-30484' of git://github.com/timhunt/moodle 2012-01-31 17:16:04 +01:00
Tim Hunt
94815ccfa0 MDL-30484 question engine: don't lose response files when regrading.
The problem was mostly that, in the past, we did not worry if
question_attempt_step.id changed during regrade (because we deleted the
old step row and inserted a new one). However, now that steps can have
associated files, we can't be that slack, becuase the step id is used as
the file itemid.

So, now, we have to update the existing rows during a regrade. We do
this by having the question engine tell the question_engine_unit_of_work
that the step has first been deleted, and then added back. Then we make
the unit-of-work spot that delete + add = update.

This also means that during regrading, we have to pass around some extra
ids so that new steps know the id of the step they are replacing.

Naturally, this requires some quite trickly logic, so I finally got
around to writing unit tests for question_engine_unit_of_work, which is
a good thing.

Along the way I also got around to renaming
question_attempt->set_number_in_usage, which got missed out when
everthing else was renamed to slot ages ago.

Finally, while working on this code, I noticed and fixed some PHPdoc
comments.
2012-01-30 16:57:23 +00:00
Tim Hunt
72553162ba MDL-30854 quiz/question editing: fix create calc question & add on page.
This was one of those innocent seeming issues where, once you start
digging, you find a mess. In this case, the code that is now in
question_wizard_form::add_hidden_fields used to exist in four different
places, in four inconsistent versions. This is now all nicely
re-factored, and that solves the problem.

Along the way, I found and fixed some wrong string references in
qtype_random, and stripped out some unnecessary &s in function
declarations.
2012-01-30 12:32:12 +00:00
Aparup Banerjee
fd174542e3 Merge branch 'MDL-31392' of git://github.com/timhunt/moodle 2012-01-30 14:24:31 +08:00
Tim Hunt
6401b3c5bb MDL-31392 qeupgradehelper partial upgrade support broken since 2.2 2012-01-26 16:31:44 +00:00
Eloy Lafuente (stronk7)
2def471913 Merge branch 'MDL-30120' of git://github.com/timhunt/moodle 2012-01-25 00:47:10 +01:00
M Kassaei
da22c0127b MDL-31306 question preview: disable 'Fill correct' for qtypes that can't 2012-01-24 13:26:44 +08:00
Eloy Lafuente (stronk7)
697cd1963b Merge branch 'MDL-31065' of git://github.com/timhunt/moodle 2012-01-24 00:07:18 +01:00
Tim Hunt
0b94d6bff3 MDL-30120 questions: remove support for legacy qtype string names. 2012-01-20 19:42:42 +00:00
Tim Hunt
24400682a0 MDL-31065 question stats: fix analysis of responses not matching a given answer
When shortanswer, numerical, calculated and calculatedsimple questions
did not have a '*' match-anything answer, then any student response that
did not match any of the teacher-given answers were classified as
'[No response]', which was not right.

This patch fixes that. Such responses are now classified as
[Did not match any answer].

While I was doing this, I noticed that the display of tolerance
intervals for numerical questions in the response analysis was horrible,
so I improved it.
2012-01-20 17:44:22 +00: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
Tim Hunt
c9b8a56f58 MDL-31058 qtype match 1.9 restore: fix restore of dodgy questions. 2012-01-20 17:27:23 +00:00
Petr Skoda
927010240f MDL-31006 some more PHP54 notices
PHP54 compatibility - PhpStorm IDE is the best tool for this kind of work!!
2012-01-18 01:17:25 +01:00
Sam Hemelryk
b1baa8a2f2 Merge branch 'MDL-31102' of git://github.com/timhunt/moodle 2012-01-16 16:30:48 +08:00
Sam Hemelryk
864777cb73 Merge branch 'MDL-31130' of git://github.com/timhunt/moodle 2012-01-16 11:49:33 +08:00
Dan Poltawski
a530d4a93b MDL-29091 quiz - switch to use moodle_url::out_as_local_url 2012-01-13 10:16:52 +00:00
Jonathon Fowler
2902edb4ec MDL-31130 question bank: toggling show all / 20 per page broken. 2012-01-12 12:41:25 +00:00
Tim Hunt
079caafc16 MDL-31102 question preview: fix HTML validation errors. 2012-01-12 12:10:54 +00:00
Sam Hemelryk
7dd813b948 Merge branch 'MDL-24394' of git://github.com/timhunt/moodle 2012-01-10 14:30:32 +13:00
Tim Hunt
e73af46d4c MDL-24394 qtype_match: should be able to use multilang for the choices. 2012-01-09 18:05:06 +00:00
Eloy Lafuente (stronk7)
30c99be2f0 Merge branch 'MDL-30031' of git://github.com/bostelm/moodle 2012-01-09 02:14:20 +01:00
Eloy Lafuente (stronk7)
94d59c9b23 Merge branch 'MDL-30635' of git://github.com/timhunt/moodle 2012-01-09 00:15:21 +01:00
Tim Hunt
f8a3a3fb9a MDL-30757 questions: kill legacy global $QUESTION_EDITTABCAPS 2012-01-06 18:43:03 +00:00
Tim Hunt
c2f5e2ab81 MDL-30635 enable standard cron for all question and quiz plugin types.
* Support for old non-standard cron for quiz reports dropped. (Standard
cron support was added in 2.2

* Cron support added for qbehaviour, qformat and quizacces plugins.

* qtypes were already supported in the standard way.
2012-01-06 18:42:35 +00:00
Sam Hemelryk
a46fe43ba2 Merge branch 'MDL-27200' of git://github.com/timhunt/moodle 2012-01-03 11:12:14 +13:00
Henning Bostelmann
096c30165b MDL-30031 Adaptive question behaviour: ignore invalid answers without penalty 2011-12-28 17:17:52 +00:00
Tim Hunt
658ad69fa0 MDL-27200 missing {} in various lang strings. 2011-12-23 11:51:24 +00:00
Petr Skoda
527c8239a2 MDL-30610 remove outdated question upgrade code 2011-12-23 10:39:34 +01:00
Eloy Lafuente (stronk7)
63637e9dd8 MDL-30760 question engine: reduce summary max size
MySQL only accepts 65536 (aprox) bytes in default TEXT
columns. So we define the max allowed as 32000 to allow
99.9% of utf-8 contents to fit. If some day MDL-19603 is
implemented and all current TEXTs are moved (MySQL) to
the BIG counterparts, this restriction can be out (MDL-19603).
2011-12-23 01:16:25 +01:00
Eloy Lafuente (stronk7)
80472947dc Merge branch 'MDL-30739' of git://github.com/timhunt/moodle 2011-12-20 02:21:00 +01:00
Sam Hemelryk
f67911b6ac Merge branch 'MDL-30760' of git://github.com/timhunt/moodle 2011-12-20 13:39:54 +13:00
Sam Hemelryk
eae0b9a9e3 Merge branch 'MDL-30646' of git://github.com/timhunt/moodle 2011-12-20 13:23:45 +13:00
Sam Hemelryk
c3f90a5722 Merge branch 'MDL-37049' of git://github.com/jamiepratt/moodle 2011-12-19 15:06:01 +13:00
Sam Hemelryk
90179a5093 Merge branch 'MDL-30734' of git://github.com/timhunt/moodle 2011-12-19 11:52:49 +13:00
Sam Hemelryk
6ccf06637f Merge branch 'MDL-30742' of git://github.com/timhunt/moodle 2011-12-19 11:37:10 +13:00
Tim Hunt
c83ed025ef MDL-30760 question engine: question summary can be longer than 64k!
1. So we will truncate the question summary to 65000 chars if necessary.

2. Also, fix one minor error in mutlianswer save_question_options.

question_bank::MAX_SUMMARY_LENGTH is not the most logical class to add
the constant to, but it needs to be accessible during upgrade, so I was
lazy and put it there.
2011-12-16 15:56:23 +00:00
Tim Hunt
29ded2d68a MDL-30646 default qbank sort should only use visible columns. 2011-12-15 18:39:21 +00:00
Tim Hunt
732793f1a5 MDL-30739 qtype numerical: upgrade script uses SQL that is not cross-DB. 2011-12-15 12:22:00 +00:00
Jamie Pratt
a24e35701f MDL-30749 fixing typo referring to question instead of answer object 2011-12-15 15:06:45 +07:00
Eloy Lafuente (stronk7)
12727710d4 Merge branch 'MDL-30592' of git://github.com/timhunt/moodle 2011-12-14 22:03:26 +01:00
Tim Hunt
b5f65ba14c MDL-30742 restoring 1.9 backups with missing question data should be robust 2011-12-14 17:17:07 +00:00
Tim Hunt
ad73a2cb4e MDL-30734 question engine: sum_usage_marks_subquery edge-case.
When all qas in a useage are 'gaveup' state, it gives NULL, not 0.0, for the total.
2011-12-14 14:29:00 +00:00
Aparup Banerjee
0ef92d976c Merge branch 'MDL-29772' of git://github.com/bostelm/moodle 2011-12-13 16:51:23 +08:00
Aparup Banerjee
1ff57577da Merge branch 'MDL-30562' of git://github.com/timhunt/moodle 2011-12-13 13:48:43 +08:00
Tim Hunt
0019a9b7aa MDL-30592 question_bank: make files in qtext work in the question list. 2011-12-09 19:23:53 +00:00
Valeriy Streltsov
56565037dd MDL-30562 qtypes: extra_answer_fields & questionid_column_name public
Will let us make more of qtype backup and restore work automatically.
2011-12-09 18:38:38 +00:00
Tim Hunt
9d0ac0ffbb MDL-27143 question bank: questions not saved when deleting a category.
Based on a fix by Nikhil Gupta.
2011-12-09 18:03:52 +00:00
Aparup Banerjee
29459d8e15 Merge branch 'MDL-30558' of git://github.com/timhunt/moodle 2011-12-09 10:46:23 +08:00