Commit graph

1992 commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
0c93bbde9e Merge branch 'MDL-31721_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-02-27 22:06:46 +01:00
Tim Hunt
ea9f1a8faa MDL-31729 questions: files for hints are not moved or deleted.
The files that belong to the question hints are neither moved when the
question is moved to another context, nor deleted when the question is
deleted.

Oops! How come no one noticed that until today.
2012-02-23 12:04:30 +00:00
Tim Hunt
db15713237 MDL-31721 question editing: improve working for Show num correct
AMOS BEGIN
 CPY [shownumpartscorrect,question],[shownumpartscorrectwhenfinished,question]
AMOS END
2012-02-23 12:04:10 +00:00
Michael Aherne
b81c860628 MDL-31495 Performance improvement in question engine upgrade SQL 2012-02-15 09:37:51 +08:00
Eloy Lafuente (stronk7)
d4184875ce Merge branch 'MDL-30854_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-01-31 19:38:48 +01:00
Eloy Lafuente (stronk7)
26be1bf17a Merge branch 'MDL-30484_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-01-31 17:16:51 +01:00
Tim Hunt
699f075ad2 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 17:05:56 +00:00
Tim Hunt
d4d8a51fae 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:31:02 +00:00
Aparup Banerjee
c8a11c7410 Merge branch 'MDL-31392_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-01-30 14:25:35 +08:00
Tim Hunt
e2a4d8f9d0 MDL-31392 qeupgradehelper partial upgrade support broken since 2.2 2012-01-26 16:32:10 +00:00
M Kassaei
5d2dce09b3 MDL-31306 question preview: disable 'Fill correct' for qtypes that can't 2012-01-24 13:27:34 +08:00
Eloy Lafuente (stronk7)
b19a440a04 Merge branch 'MDL-31065_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-01-24 00:07:06 +01:00
Tim Hunt
2f7d4b4213 MDL-31058 qtype match 1.9 restore: fix restore of dodgy questions. 2012-01-20 18:06:53 +00:00
Tim Hunt
4eac963a41 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:46:01 +00:00
Tim Hunt
2b18b65f9a MDL-31065 qtype shortanswer: refactor the unit tests to use a proper helper. 2012-01-20 17:45:56 +00:00
Petr Skoda
a1317d1b99 MDL-31006 some more PHP54 notices
PHP54 compatibility - PhpStorm IDE is the best tool for this kind of work!!
2012-01-18 01:17:09 +01:00
Sam Hemelryk
282dcd3c03 Merge branch 'MDL-31102_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-01-16 16:27:38 +08:00
Jonathon Fowler
0a2569e55c MDL-31130 question bank: toggling show all / 20 per page broken. 2012-01-12 12:44:44 +00:00
Tim Hunt
16f75808c7 MDL-31102 question preview: fix HTML validation errors. 2012-01-12 11:33:00 +00:00
Sam Hemelryk
859624f26c Merge branch 'MDL-24394_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2012-01-10 14:30:22 +13:00
Tim Hunt
c4989dc75f MDL-24394 qtype_match: should be able to use multilang for the choices. 2012-01-09 18:06:11 +00:00
Eloy Lafuente (stronk7)
f36884dde7 Merge branch 'MDL-30031-22' of git://github.com/bostelm/moodle into MOODLE_22_STABLE 2012-01-09 02:14:31 +01:00
Henning Bostelmann
fb93cfac00 MDL-30031 Adaptive question behaviour: ignore invalid answers without penalty 2011-12-28 17:20:51 +00:00
Tim Hunt
404e01f59e MDL-27200 missing {} in various lang strings. 2011-12-23 11:19:24 +00:00
Eloy Lafuente (stronk7)
0016ed0115 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:00 +01:00
Eloy Lafuente (stronk7)
ceec817f95 Merge branch 'MDL-30739_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2011-12-20 02:21:30 +01:00
Sam Hemelryk
9f83ba0887 Merge branch 'MDL-30760_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2011-12-20 13:34:53 +13:00
Sam Hemelryk
6005434b55 Merge branch 'MDL-30646_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2011-12-20 13:21:11 +13:00
Sam Hemelryk
d613d7d78e Merge branch 'MDL-37049_22' of git://github.com/jamiepratt/moodle into MOODLE_22_STABLE 2011-12-19 15:05:42 +13:00
Sam Hemelryk
3bcb2c1dff Merge branch 'MDL-30734_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2011-12-19 11:52:32 +13:00
Sam Hemelryk
265dbb3a54 Merge branch 'MDL-30742_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2011-12-19 11:30:42 +13:00
Tim Hunt
9660c98e57 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:57:49 +00:00
Tim Hunt
76ffac7f93 MDL-30646 default qbank sort should only use visible columns. 2011-12-15 18:40:32 +00:00
Tim Hunt
abe73c6d99 MDL-30739 qtype numerical: upgrade script uses SQL that is not cross-DB. 2011-12-15 12:22:27 +00:00
Jamie Pratt
9abb69aacb MDL-30749 fixing typo referring to question instead of answer object 2011-12-15 14:47:15 +07:00
Eloy Lafuente (stronk7)
a30e3c5a1a Merge branch 'MDL-30592_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2011-12-14 22:44:33 +01:00
Tim Hunt
51d861632b MDL-30742 restoring 1.9 backups with missing question data should be robust 2011-12-14 17:18:04 +00:00
Tim Hunt
9831354928 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:30:25 +00:00
Aparup Banerjee
a23463acec Merge branch 'MDL-29772-22' of git://github.com/bostelm/moodle into MOODLE_22_STABLE 2011-12-13 17:05:07 +08:00
Aparup Banerjee
a3bb5afdd0 Merge branch 'MDL-30562_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE 2011-12-13 14:01:57 +08:00
Henning Bostelmann
1f00dc45d4 MDL-29772 Adaptive question behaviour: improve penalty information
also fixes MDL-29780: suppress penalty information if question penalty is 0
2011-12-12 15:38:16 +00:00
Tim Hunt
2a1733aafc MDL-30592 question_bank: make files in qtext work in the question list. 2011-12-09 19:24:20 +00:00
Valeriy Streltsov
00c7590c95 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 17:58:31 +00:00
Tim Hunt
d7320fc84a MDL-27143 question bank: questions not saved when deleting a category.
Based on a fix by Nikhil Gupta.
2011-12-09 17:56:05 +00:00
Tim Hunt
00aa596e8e MDL-30558 question bank, missing string with obscure permissions.
AMOS BEGIN
 MOV [selectcategoryabove,mod_quiz],[selectcategoryabove,question]
AMOS END
2011-12-09 10:47:19 +08:00
Eloy Lafuente (stronk7)
4dbdc834ff MDL-30604 Added 2 missing messages andd deleting an incorrect one 2011-12-09 02:10:18 +01:00
Aparup Banerjee
bc3801cb9c MDL-30604 Added upgrade lines to upgrade.php(s) 2011-12-09 02:03:58 +01:00
Sam Hemelryk
4117b4fcd8 Merge branch 'MDL-30322' of git://github.com/timhunt/moodle 2011-11-30 13:02:15 +13:00
Sam Hemelryk
b64a3e1ac1 MDL-30485 whitespace fix 2011-11-30 11:55:55 +13:00
Tim Hunt
3385a144b8 MDL-30485 XML import from 1.9 does not handle files in subfolders. 2011-11-28 17:26:17 +00:00