Commit graph

39 commits

Author SHA1 Message Date
tjhunt
4d41f4eee8 Add missing Id tags to all files under question, to help the unmerged files script. 2009-02-19 01:09:44 +00:00
tjhunt
5348b899c4 random question: MDL-18174 Fix notice when adding a random question to a quiz. 2009-02-17 06:14:54 +00:00
tjhunt
24e8b9b684 question bank: MDL-12719, MDL-15774, MDL-17105, and MDL-18174
These are all to do with the combination of the $form->category, and $form->categorymoveto fields on the question editing forms since Moodle 1.9. These are now resolved to a single ->category value in question.php, which simplifies the logic for the individual question types.

MDL-15774 and MDL-12719 errors editing Cloze question
MDL-17105 problems with qustion saving logic.
MDL-18174 'Select from subcategories' option not preserved when editing a random question.
2009-02-13 06:11:42 +00:00
tjhunt
f24493ec9b random essay questions: MDL-8648 Allow essay questions to be selected by random question.
In the 1.9 branch this is controlled by a new option under Admin -> Experimental. In Moodle 2.0 dev it is not optional, it just works.

The main change is letting the manual grading report know which random questions might need manual grading. MDL-4004 - this depends on the random question under consideration, which requires a new questiontype method.

I also changed the random question code so that I could remove some global variables.
2008-11-28 06:07:11 +00:00
tjhunt
bcc234b0a7 random question editing: Don't show permission information when editing a random question. It is just confusing. 2008-11-26 05:19:34 +00:00
pilpi
a9b6e4b88a question: MDL-17337 Add the new essay and random question icons 2008-11-20 18:26:35 +00:00
tjhunt
41d3730951 random questions: MDL-17185 regression from MDL-17160 random questions were no longer randomising.
Backporting Jamie's fix to 1.9, and making a minor improvement along the way.
2008-11-10 07:56:37 +00:00
jamiesensei
01bb194a4e MDL-17185 "random questions always the same!" Randomized question selection 2008-11-10 07:32:05 +00:00
tjhunt
339ef4c246 random questions: MDL-17160 Adding random questions, maximum option.
When counting how many options to put in the add NN random questions dropdown, we should only count questions of types that are usable by random.
2008-11-07 05:50:02 +00:00
jamiesensei
3efbe6bc89 MDL-14676 "In question bank, problem with moodle/question:edit* when do not have moodle/question:move*" Fixed logic for processing submission of question form and also added some validation to check that the user has permissions to move a question. 2008-10-08 10:27:38 +00:00
jamiesensei
04c8148a4f MDL-15102 "Upgrade to DMLLIB 2.0. Needs further testing and bug-fixing." fixing a couple of typos which were causing errors. 2008-07-14 06:37:39 +00:00
jamiesensei
455c3efa13 MDL-14204 "Content for Quiz Statistics report table - Random_guess_score" oops ought to give that function name a 'question_' prefix 2008-06-16 13:59:30 +00:00
jamiesensei
6f51ed72be MDL-14204 "Content for Quiz Statistics report table - Random_guess_score" added method random_guess_score to question type objects and a new function in questionlib that calls the question type method. 2008-06-16 13:29:00 +00:00
nicolasconnault
f34488b2e6 MDL-15102 Upgrade to DMLLIB 2.0. Needs further testing and bug-fixing. 2008-06-06 14:43:15 +00:00
tjhunt
949c59ace0 MDL-14928 - Adding random questions from a category with an apostrophe in the name does not work. Stupid bloody addslashes. Roll on dmllib 2.0. 2008-05-20 17:09:40 +00:00
dongsheng
2471ef8650 "MDL-14129, fix print_error" 2008-05-20 03:09:35 +00:00
tjhunt
3ff8a1877a MDL-5482 - Backup and restore problems for match, random and truefalse question types.
All the credit goes to Paulo Matos who carefully worked out and tested this fix, and updated the patch several times over more than a year while I very slowly got around to reviewing it and checking it in.
2008-05-07 12:32:03 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
tjhunt
8bb3fac17c MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:36 +00:00
tjhunt
f59dba8497 MDL-11398 - Random questions sometimes ended up with names different from the cateogry they were actually picking from. Also, the same random questoin could be used in more than one quiz, in which case editing that question would change two quizzes unexpectedly. The fix is:
* Don't let the user set the name for random questions.
* Instead force the name to be "Random (catname)" (localised) whever the question is created or saved.
* When a category is renamed, rename all the random questions in it.
* Remove the restriction that Jamie seems to have added in 1.9 that was preventing the category of random questions from being edited.
2007-09-26 16:10:38 +00:00
jamiesensei
271e6decda merging MOODLE_19_QUESTIONS with HEAD 2007-08-09 21:51:09 +00:00
tjhunt
8b192edbc1 Comment improvements. 2007-05-24 07:42:27 +00:00
tjhunt
53a4d39f1c Clean up whitespace. 2007-04-24 23:26:48 +00:00
tjhunt
99ba746d29 MDL-6368 and MDL-6369 - allow question type plugins to easily provide some bits of Javascript and CSS.
If there are any of the files styles.css, styles.php, script.js or script.php in the plugin folder, they will be linked to in the head of the quiz attempt page (only for the question types used on that page).

If you need to do something more complicated in your question type, you can override the get_html_head_contributions method instead.
2007-04-12 15:58:32 +00:00
pichetp
830e47a817 Give the question bank code sensible PHPdocumentor package names. 2007-03-21 02:04:53 +00:00
pichetp
1976496e38 Give the question bank code sensible PHPdocumentor package names. 2007-03-19 22:04:30 +00:00
tjhunt
5dba65907b MDL-8177 - Random questions selected deleted questions. Merged from MOODLE_18_STABLE. 2007-03-10 00:34:05 +00:00
skodak
32db0d42c9 MDL-8166 some forgotten set_defaults converted to set_data 2007-01-12 19:01:31 +00:00
jamiesensei
24f7485b15 some extra validaton for multichoice and some bug fixes for multichoice and random qtype. 2007-01-08 10:35:57 +00:00
jamiesensei
490d89e591 removing more redundant files after qtype form formslib migration 2007-01-07 17:22:31 +00:00
jamiesensei
6e9b6ba207 numerical and random question type creation form migrated to formslib 2007-01-07 16:10:42 +00:00
skodak
d2ce367fb9 MDL-8062 Remove name attribute from <form> and related javascript code cleanup (tested with FF, IE, Konq and Opera) 2007-01-06 19:22:58 +00:00
tjhunt
bb080d2046 MDL-7896 - error from random question type in adaptive mode. Merged from MOODLE_17_STABLE. 2006-12-11 23:46:15 +00:00
tjhunt
a21567892f Refactor how question types register themselves with the question bank. This change makes it easier for 3rd party question types to control their destiny, but is also backwards compatible, in that old 3rd party plugins will still work. See http://moodle.org/mod/forum/discuss.php?d=51796 for more details. 2006-08-15 21:25:38 +00:00
tjhunt
1b8a7434e2 Bug 6239 - Allow questions to have some teacher-supplied commentary.
While implementing this, I removed the ~100 lines of very similar code from the top of each question type's editquestion.html template, and moved this to a the function print_question_form_start() in the base class, which uses the template question/type/editquestionstart.html. This is described in more detail here: http://moodle.org/mod/forum/discuss.php?d=51590, and is why this patch makes the codebase 523 lines smaller.
2006-08-11 14:59:18 +00:00
gustav_delius
f57c624262 Use the missingtype question type to print the explanation message when a random question is missing 2006-04-30 17:31:33 +00:00
gustav_delius
4572d78f71 When a teacher deletes a question that was already used as a random question in a quiz the student now gets a useful message about the fact rather than just a php error. 2006-04-30 16:59:23 +00:00
gustav_delius
0a5b58af89 Many bugfixes accummulated during CVS outage, more to come. 2006-04-05 05:53:18 +00:00
gustav_delius
aaae75b04f Renaming question/questiontypes/ to question/types/ as requested by Martin 2006-03-24 19:54:13 +00:00