Commit graph

2183 commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
6e344148c1 MDL-27418 qtype numerical - minor whitespace fix 2011-06-29 23:57:08 +02:00
Eloy Lafuente (stronk7)
88933f08cb Merge branch 'MDL-27418' of git://github.com/timhunt/moodle 2011-06-29 23:51:33 +02:00
Eloy Lafuente (stronk7)
0f744d2ca4 Merge branch 'MDL-27430' of git://github.com/timhunt/moodle 2011-06-29 23:33:01 +02:00
Eloy Lafuente (stronk7)
be13d37a02 Merge branch 'MDL-28074' of git://github.com/timhunt/moodle 2011-06-29 23:09:13 +02:00
Tim Hunt
05a5c2f9a2 MDL-28108 oops! I got the cut-off percentage wrong. 2011-06-29 22:02:59 +01:00
Tim Hunt
56a4ae4673 MDL-28074 question preview should set context/course/cm properly.
1. We need this so that, for example, when previewing a question from
the quiz editing page, the preview uses the filter settings, theme and
language set for that quiz and course.
2011-06-29 21:25:56 +01:00
Tim Hunt
3a6eb8efdf MDL-27418 qtype numerical correct grading of 'right value, wrong unit' reponses.
Probably easiest to explain by example: If the right answer is 1.23 m with alternate
unit 100 cm = 1m then the completely right answers are 1.23 m and 123 cm.
Right answer, wrong unit responses include 1.23, 1.23 frogs and 1.23 cm.
123 m is not considered to have the correct numerical value.

We may well re-consider the way this works in a future version of Moodle.

Unit grading was not implemented before Moodle 2.0. In Moodle 2.0, the unit grading
was more permissive than here, for example 123 m would have been graded correctly in
2.0. However, I'm not sure I follow the rationale for that.
2011-06-29 15:41:56 +01:00
Tim Hunt
c5aaf41739 MDL-27418 add unit tests for the problem case identified by Pierre. 2011-06-29 06:55:45 +01:00
Tim Hunt
f040d4b046 MDL-27418 add validation to stop students intering a thosands sep.
If it might be confused by a decimal point from another locale.
2011-06-28 18:26:34 +01:00
Tim Hunt
1a1353a5ce MDL-27418 qtype numeric go back to the very permissive number parsing from Moodle 2.0.
I hope my unit tests are good enough to make this change safe.
2011-06-28 18:13:44 +01:00
Tim Hunt
eef75d4b31 MDL-27418 qtype_numeric correct output of numbers in locales that use , for decimal point. 2011-06-28 17:37:09 +01:00
Tim Hunt
9048940701 MDL-27418 correct validation of numerical answers in qtype numeric.
This mostly affects locales that use , as decimal point.
2011-06-28 17:36:24 +01:00
Tim Hunt
3aa159706c MDL-27418 fix typo
I really should refactor to eliminate this duplicated code.
2011-06-28 17:34:24 +01:00
Tim Hunt
8566369f63 MDL-27430 qtype numerical put multiple-choice units back to radio buttons
It seems that people want to be able to use <sup> and <sub> here, which
makes sense, so we need to keep radio buttons for questions upgraded
from 2.0. The dropdown menu, however, is also nice, so keep that option
too for new questions.
2011-06-28 16:33:01 +01:00
Tim Hunt
0366ef262a MDL-28035 problems with upgrade/restore of ataptive quizzes from 2.0
There were two main problems:

1. The unit tests for upgrading adaptive quiz attempts had slighly the
wrong $expectedqa, and so matching that the upgrade was doing the wrong
thing in certain situations. The main issue was that it was setting
-_try = 1 on the first step, which broke the penalty calculation when
the quiz was regraded. There were also some other subtleties with
incrementing -_try that were not right before.

2. It was possible in 2.0 and earlier for two question_states to get the
same seq_number, and restoring 2.0 backups was rashly assuming that that
was unique.
2011-06-27 17:10:02 +01:00
Eloy Lafuente (stronk7)
32038aaccc Merge branch 'MDL-28033' of git://github.com/timhunt/moodle 2011-06-27 17:12:40 +02:00
Eloy Lafuente (stronk7)
3bdc10150c Merge branch 'MDL-28049' of git://github.com/timhunt/moodle 2011-06-27 15:56:03 +02:00
Tim Hunt
19f7bb5b7e MDL-28049 conditional include so xml question format can work for both lesson and 3rd party qtypes.
This is a regression caused by MDL-27956.
2011-06-27 13:59:57 +01:00
Tim Hunt
2779cc7d89 MDL-28033 Fatal error upgrading form 1.9 to 2.1 due to missing include. 2011-06-27 13:43:16 +01:00
Sam Hemelryk
29e2d0a820 Merge branch 'MDL-26199' of git://github.com/timhunt/moodle 2011-06-27 16:03:48 +08:00
Tim Hunt
5cc532e8e9 MDL-28024 adaptive qbehaviour. Displayed penalties not rounded correctly. 2011-06-24 14:26:49 +01:00
Tim Hunt
f19ed874ee MDL-26199 further changes needed to make the question bank navigation behave. 2011-06-23 07:18:49 +01:00
Eloy Lafuente (stronk7)
4c15bde8f1 Merge branch 'MDL-27948' of git://github.com/timhunt/moodle 2011-06-23 01:14:19 +02:00
Eloy Lafuente (stronk7)
e345969ae2 Merge branch 'MDL-27937' of git://github.com/timhunt/moodle 2011-06-23 00:46:29 +02:00
Eloy Lafuente (stronk7)
e059fa90b1 Merge branch 'MDL-27973' of git://github.com/timhunt/moodle 2011-06-23 00:43:11 +02:00
Eloy Lafuente (stronk7)
4d05c972ea Merge branch 'MDL-27974' of git://github.com/timhunt/moodle 2011-06-23 00:37:13 +02:00
Eloy Lafuente (stronk7)
a2854474ce Merge branch 'MDL-27979' of git://github.com/timhunt/moodle 2011-06-23 00:34:03 +02:00
Tim Hunt
da72991636 MDL-27979 Should be an edit link for each question when previewing or reviewing a quiz. 2011-06-22 21:07:40 +01:00
Tim Hunt
eb624cf7e0 MDL-27937 Calculated tolerance field should have the label Tolerance +- 2011-06-22 19:49:39 +01:00
Tim Hunt
35d5f1c28d MDL-27948 The question engine should use recordsets to load attempt data
This should be good for performance (memory usage). It also avoids having to construct a meaningless, unique, first column, which is a pain on MyQSL.
2011-06-22 18:53:15 +01:00
Tim Hunt
ef01d2c8f5 MDL-27973 hopefully fix QTI2 question export.
Well, at least fix the most obvious notices.
2011-06-22 15:56:05 +01:00
Tim Hunt
3c78184552 MDL-27974 problems with gift question import/export.
Double-escapeing in match export and not initialising combined feedback on import.

Also remove a lot of redundant breaks.
2011-06-22 15:26:34 +01:00
Rajesh Taneja
ba15c346b1 MDL-27956 Lesson - Fixed strings and readquestions scope 2011-06-22 09:11:32 +08:00
Eloy Lafuente (stronk7)
8edbfba909 Merge branch 'MDL-24594_wip' of git://github.com/timhunt/moodle 2011-06-20 12:48:55 +02:00
Sam Hemelryk
8a322fc19b Merge branch 'MDL-24255' of git://github.com/timhunt/moodle 2011-06-20 15:51:59 +08:00
Sam Hemelryk
8e307054d3 Merge branch 'MDL-27907' of git://github.com/timhunt/moodle 2011-06-20 14:10:41 +08:00
Sam Hemelryk
70e35c4d1d Merge branch 'MDL-27916' of git://github.com/timhunt/moodle 2011-06-20 13:45:12 +08:00
Tim Hunt
635971c750 MDL-27927 qtype_multianswer remove hard-coded string. 2011-06-19 10:34:39 +01:00
Tim Hunt
928e7d2a33 MDL-27927 Fix invalid HTML in the multianswer editing form. 2011-06-19 10:27:24 +01:00
Tim Hunt
2d6829727d MDL-24255 Use the proper editor element for manual grading comments.
It would be nice if someone imporoved the API for using the HTML editor outside formslib.
2011-06-18 21:15:40 +01:00
Tim Hunt
88ef9d0b2b MDL-27916 Question state was described wrongly in adaptive and immediate feedback behaviours. 2011-06-18 13:29:39 +01:00
Tim Hunt
fb17f129a3 MDL-27907 calculated* editing form inheritance mix up.
Lead to duplicate fields appearing on the editing forms.
2011-06-18 12:53:32 +01:00
Tim Hunt
35c9b65274 MDL-24594 Fix some issues with the display of HTML choices.
The most significant issue is that the HTML editor alwasy wraps <p> tags round the input, but that is not appropriate for the choices. It is especially not appropriate because we want to display the choices in a <lable> for accessibility and usability reasons. In valid HTML label can only contain inline elemnts. Therefore, I introduced a make_html_inline method, with a minimal implementation. (It could be improved in future.)

Long term, I think the best option would be a new form field type, editorinline, or something like that. That would be a smaller version of TinyMCE that only lets you enter inline elements.
2011-06-17 18:41:15 +01:00
ppichet
2a6c5c52ee MDL-24594 qtype_multichoice should allow images in the choices.
This change was massively re-worked by Tim Hunt to update Pierre Pichet's original patch for Moodle 2.0 to work in Moodle 2.1.
2011-06-17 18:41:13 +01:00
Eloy Lafuente (stronk7)
fd8f24dba8 Merge branch 'MDL-27869' of git://github.com/timhunt/moodle 2011-06-17 18:32:00 +02:00
Eloy Lafuente (stronk7)
faf1f957ac Merge branch 'MDL-27490' of git://github.com/timhunt/moodle 2011-06-17 17:24:51 +02:00
Tim Hunt
fde4560dae MDL-27490 Implement a manage question behaviours admin page
While doing this, I found various bugs in the manages question types admin page, and so fixed them, and updated the code
there to use $OUTPUT and html_writer.

AMOS BEGIN
 MOV [cannotdeletemissingqtype,admin],[cannotdeletemissingqtype,question]
 MOV [cannotdeleteqtypeinuse,admin],[cannotdeleteqtypeinuse,question]
 MOV [cannotdeleteqtypeneeded,admin],[cannotdeleteqtypeneeded,question]
 MOV [deleteqtypeareyousure,admin],[deleteqtypeareyousure,question]
 MOV [deleteqtypeareyousuremessage,admin],[deleteqtypeareyousuremessage,question]
 MOV [deletingqtype,admin],[deletingqtype,question]
 MOV [numquestions,admin],[numquestions,question]
 MOV [numquestionsandhidden,admin],[numquestionsandhidden,question]
 MOV [qtypedeletefiles,admin],[qtypedeletefiles,question]
 MOV [uninstallqtype,admin],[uninstallqtype,question]
AMOS END
2011-06-17 16:21:32 +01:00
Eloy Lafuente (stronk7)
3c158ff95e Merge branch 'MDL-27868' of git://github.com/timhunt/moodle 2011-06-17 16:45:30 +02:00
Tim Hunt
5cf69d7ff5 MDL-27868 Hints (and some other things) lost when re-editing calculated* questions. 2011-06-17 15:42:03 +01:00
Eloy Lafuente (stronk7)
5df6b3c87e Merge branch 'MDL-27877' of git://github.com/timhunt/moodle 2011-06-17 15:32:10 +02:00