Commit graph

394 commits

Author SHA1 Message Date
Dan Poltawski
aefc7e28ff Merge branch 'MDL-32213_manual_grade_question_upgrade' of git://github.com/davosmith/moodle 2012-04-02 16:59:10 +08:00
Petr Skoda
97621c33c9 MDL-32250 fixed case typo
Thanks Dan!
2012-04-02 09:21:14 +02:00
Petr Skoda
caee6e6c26 MDL-32251 E_STRICT fixes part 3 2012-03-29 15:24:30 +02:00
Petr Skoda
0bb48cc2a1 MDL-32250 import latest SimpleTest 1.1.0 2012-03-29 15:07:53 +02:00
Davo Smith
1892a35625 MDL-32213 Question upgrade now correctly handles non-core manually-graded question types 2012-03-27 13:44:07 +01:00
Sam Hemelryk
ef844d0a15 Merge branch 'w12_MDL-32094_m23_phpstrict' of git://github.com/skodak/moodle 2012-03-20 16:47:17 +13:00
Petr Skoda
072db71c90 MDL-32094 fix question related E_STRICT problems 2012-03-18 18:33:54 +01:00
Tim Hunt
8cb7a6d512 MDL-31594 question manual grading: did not handle comma as decimal. 2012-03-15 18:46:43 +00:00
Eloy Lafuente (stronk7)
f1fbdbea33 Merge branch 'MDL-31829' of git://github.com/timhunt/moodle 2012-03-06 21:18:04 +01:00
Tim Hunt
296e1e9782 MDL-31829 question engine SQL typo breaks some regrades.
Also, some MySQL-only code had not been updated.

This problem only affected a small minority of question attempts, like
this:
1. Suppose you have a shortanswer question with correct answer 'Toad'
and some hints.
2. Suppose a student attempts this using the interactive behaviour and
on the first try responds 'Frog', and on the second try responds 'Toad'.
3. Then suppose the teacher edits the question to make 'Frog' correct.
4. Then, when the quiz is regraded, the question_attempt_step for the
second try will need to be deleted. That is where the buggy code was.
2012-03-01 12:33:14 +00:00
Tim Hunt
7a26403fc9 MDL-31828 attachements to essay questions do not work on Oracle. 2012-03-01 12:10:39 +00:00
Michael Aherne
2af7d0d8d0 MDL-31495 Performance improvement in question engine upgrade SQL 2012-02-10 15:24:43 +00: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
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
M Kassaei
da22c0127b MDL-31306 question preview: disable 'Fill correct' for qtypes that can't 2012-01-24 13:26:44 +08: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
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
Dan Poltawski
a530d4a93b MDL-29091 quiz - switch to use moodle_url::out_as_local_url 2012-01-13 10:16:52 +00: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
Sam Hemelryk
f67911b6ac Merge branch 'MDL-30760' of git://github.com/timhunt/moodle 2011-12-20 13:39:54 +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
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
Tim Hunt
94c0ec2159 MDL-30185 question engine reporting: add redundant where to query for perf.
Without this, MySQL fails to cope.
2011-11-15 11:19:15 +00:00
Tim Hunt
75a31c9039 MDL-29808 qbehaviours: update to use ->dependencies in version.php 2011-11-10 19:12:25 +00:00
Eloy Lafuente (stronk7)
10dd4995da Merge branch 'MDL-29474' of git://github.com/timhunt/moodle 2011-10-26 10:33:37 +02:00
Eloy Lafuente (stronk7)
35454bd55d Merge branch 'MDL-29815' of git://github.com/timhunt/moodle 2011-10-25 17:43:51 +02:00
Tim Hunt
deef04a44e MDL-29339 Manually cast objects to string before calling dmllib. 2011-10-24 11:08:10 +01:00
Tim Hunt
304f0d850f MDL-29815 question engine DB: bad group-by clause detected by Oracle.
Thanks to Yanfei Lu for finding this and suggesting the fix.
2011-10-20 11:14:14 +01:00
Tim Hunt
36ca62cab7 MDL-29474 display the dependancy information on the upgrade screen. 2011-10-20 11:13:33 +01:00
Henning Bostelmann
cc9fc649a1 MDL-28219 QE2 adaptive behaviour: fix scores and penalties 2011-10-12 23:27:10 +01:00
Eloy Lafuente (stronk7)
033d656617 MDL-29520 - mysql multitable delete, outer join some tables 2011-10-09 22:15:27 +02:00
Eloy Lafuente (stronk7)
cec6a15b99 Merge branch 'MDL-29644' of git://github.com/timhunt/moodle 2011-10-04 23:34:15 +02:00
Tim Hunt
77d0f5f07b MDL-29644 qtype multianswer, hints lost doing Moodle XML export.
This commit also includes a lot of useful tidying up of some of the unit
test helper code. I turned out that I could not use all the helper code
in my new tests, but despite that it will be useful in the future, so I
am committing it here.
2011-10-04 22:23:58 +01:00
Tim Hunt
f0bfd964ba MDL-29520 question engine: work-around bad MySQL delete performance.
This is a temporary fix, until the new API from MDL-29589 is available.

(amended to fix comments)
2011-10-04 12:03:41 +02:00
Tim Hunt
7042a252c5 MDL-29571 questions: improve class=accesshide screen-reader hints.
This changes the hint that comes before the question text. There are
unit tests to verify the new behaviour.

(amended to fix comments)
2011-10-04 11:50:56 +02:00
Tim Hunt
9d1658a07e MDL-29571 qtype description refactor unit test code a bit. 2011-10-04 11:50:12 +02:00
Tim Hunt
f123d67f60 MDL-29511 cannot review previous steps of a question attempt since MDL-28679. 2011-09-29 21:48:23 +01:00
Eloy Lafuente (stronk7)
bde5c82a20 Merge branch 'MDL-28686' of git://github.com/bostelm/moodle 2011-09-27 00:45:45 +02:00
Tim Hunt
d47d12d0d4 MDL-28679 question response history displays states incorrectly. 2011-09-16 16:05:12 +01:00
Sam Hemelryk
d609d96261 MDL-28599 textlib Separated collator to collatorlib with static methods, and added support for locale aware sorting of objects 2011-09-06 15:39:00 +12:00
Henning Bostelmann
987e0e915c MDL-28686 QE2 upgrade: recognize manually graded, deleted questions 2011-08-26 14:38:50 +01:00
Eloy Lafuente (stronk7)
d12d4d59a6 MDL-28684 QE2 upgrade: whitespace fix 2011-08-23 22:52:16 +02:00
Henning Bostelmann
fbf51a480a MDL-28684 QE2 upgrade: recognize empty answer in multichoice questions 2011-08-19 10:33:35 +01:00
Tim Hunt
25d9a6a664 MDL-28653 question output. Add a class to the main div based on question state.
This makes it possible themes do cool things. For example change more of the display depending on whether the answer was correct or not.
2011-08-09 11:31:37 +01:00
Tim Hunt
22c97c6446 MDL-28471 Further tweaks to the question flag code. 2011-07-26 17:43:55 +01:00
Wale Olujide
474ee9389a MDL-28471 make the question flag smaller, and give it a label. 2011-07-26 16:38:07 +01:00
Tim Hunt
aa5257ce7e MDL-28103 one more problem. 2011-07-01 21:17:06 +01:00
Tim Hunt
1645ad22d8 MDL-28103 code to deal with missing question_attempts was buggy. 2011-07-01 21:07:49 +01:00