Commit Graph

98 Commits

Author SHA1 Message Date
skodak 88b119010d MDL-18769 PHP5ism not allowed in 1.9 2009-04-01 15:48:57 +00:00
tjhunt d547bb0bd0 qtypes: MDL-18711 Allow qtype plugins to have custom CSS and JavaScript on the editing page. 2009-03-30 09:15:37 +00:00
tjhunt d3c7da5741 qtypes: MDL-18559 questions showing penalty information when they shouldn't.
We had a !== when it should have been !=, and our constants were defined as strings not ints. This problem has been there since forever, but no one had noticed before. Thanks to Alan Trick for finally spotting it!
2009-03-16 01:52:24 +00:00
tjhunt 4bfcbb6065 qtype base: remove debug code. 2009-03-03 04:37:46 +00:00
tjhunt a2b4f68e91 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:58 +00:00
tjhunt 190dddfc0b quiz / questions: MDL-17919 Bad link edit questions from quiz preview page.
Thanks to Ann Adamcik for noticing this. It was a regression from MDL-6085.
2009-01-16 04:47:35 +00:00
tjhunt bf28249d82 questiontypes: MDL-17800 Add extra_question_fields() support to backup/restore functions.
* Implement this in the base class, and
* use this in the shortanswer type as a proof of concept.

This makes writing new question type subclasses a bit easier. Thanks to Oleg Sychev for this code.
2009-01-15 07:29:00 +00:00
tjhunt 4328416b29 question engine: MDL-17651 this context is not used anywhere, so remove it.
(There was a bug in the get_context_instance call.)
2009-01-15 05:15:31 +00:00
tjhunt a23612213a shortanswer qtype: MDL-17706 use extra_question_fields mechanism to save on code. Changes thanks to Oleg Sychev. 2009-01-09 05:10:40 +00:00
tjhunt 110b003f86 quiz manual grading: MDL-5517 manual grading pop-up is too small. HTML editor does not fit. 2008-12-10 07:06:18 +00:00
tjhunt 51134a7b79 quiz: MDL-6085 when editing a question from various places like a preview attempt or review screen, don't use a popup, instead take advantage of the fact that question.php now takes a returnurl. 2008-12-10 06:22:04 +00:00
tjhunt ae7b2e3829 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:24 +00:00
jamiesensei 9a4ba0a430 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:19:51 +00:00
tjhunt e42effaa67 MDL-16720 The edit icon in the quiz preview screen pops up the edit form in a window that is too small 2008-09-28 09:00:05 +00:00
tjhunt 9aa1607364 MDL-15654 Incorrect escaping of HTML in the history table on the review quiz attempt page. 2008-08-20 09:46:03 +00:00
nicolasconnault e724b50ea0 MDL-15206 Fixed. My fault... 2008-06-11 08:46:50 +00:00
nicolasconnault 73b73c9819 CONTRIB-490 Added generation code for generator tool. 2008-06-10 20:52:46 +00:00
jamiesensei 3a83ce8b5d MDL-5241 "When manually grading, identity questions by their number within the quiz as well as by question name"
Also added a drop down box to select question to mark instead of the viewquestions table. The drop down box is available at the top of every page, but only if there is more than one manually gradeable question in the quiz. If there is only one question it is automatically selected for marking.

Also added a new constant QUESTION_EVENTS_GRADED during a general refactoring of UI code in grading report and some improvements to efficiency of SQL in report.
2008-05-25 11:35:29 +00:00
tjhunt 86462cee30 MDL-14762 - find and update links to files in answer->feedback when moving questions between contexts. 2008-05-09 13:13:45 +00:00
tjhunt 978af5c28b Fix dangerous comment. (MDL-13536) 2008-02-19 17:14:10 +00:00
tjhunt 9e1a55242f MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:34 +00:00
scyrma f9348b84bc MDL-13020 : deprecates make_table 2008-01-16 08:24:27 +00:00
tjhunt 49aeee2bf6 MDL-12369 - get_actual_response should not truncate the student's response. 2007-11-28 12:45:42 +00:00
tjhunt 5ee185d12e MDL-12286 - 'Save as new question' button ignores the setting in the 'Save in category' dropdown. 2007-11-20 17:51:45 +00:00
jamiesensei cb14dd6316 modifiedby and timemodified is now set when a question is created as well as createdby and timecreated instead of being left as zero 2007-09-27 07:41:58 +00:00
tjhunt 411efaee25 MDL-5327 - When making up a default question name from the question text, strip any HTML tags. Merged from MOODLE_18_STABLE. 2007-09-27 06:54:17 +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
tjhunt b92ffdf9ac Whitespace cleanup. 2007-09-24 15:45:29 +00:00
tjhunt 80fdc53efd Related to MDL-10916 - saving Cloze questions in Moodle 1.9 generates Notices because of changes to questionstupe_base::save_question. 2007-09-24 14:18:47 +00:00
tjhunt c5ccb82c61 XHTML Strict in question state history table. Merged from MOODLE_18_STABLE. 2007-09-20 15:10:04 +00:00
tjhunt c767d3b7d3 MDL-11317 - Slashes displayed in incorrect responses for short answer questions. Fix by adding stripslashes in the appropriate place. Merged from MOODLE_18_STABLE. 2007-09-18 12:15:22 +00:00
tjhunt ace1bf9d8e MDL-11284 - Can't save edited questions 2007-09-14 09:33:30 +00:00
jamiesensei ffba1f0bec added some comments 2007-08-16 05:20:35 +00:00
jamiesensei e7e62d45be Fix for MDL-10823 Access to question edit page denied from quiz preview screen. 2007-08-14 04:22:05 +00:00
tjhunt ceeae340f9 MDL-10799 - Question types do not accurately determine whether their state has changed or not. Merged from MOODLE_18_STABLE. 2007-08-10 15:21:29 +00:00
jamiesensei 271e6decda merging MOODLE_19_QUESTIONS with HEAD 2007-08-09 21:51:09 +00:00
tjhunt e3fa6587ee Helper method to help when calling print_error from a question type. 2007-08-09 15:38:35 +00:00
tjhunt 215bd82630 Fix typo. Thanks to Adriane Boyd. 2007-08-09 09:00:30 +00:00
tjhunt 3d3867b69a MDL-10730 - After submitting a question in adaptive mode, go back to that question, not the top of the page. Code thanks to Tony Gardner-Medwin, based on my suggestion. 2007-08-06 14:10:46 +00:00
tjhunt 5fceb049cc Use of get_html_head_contributions was causing unwanted interaction bewteen question types. Switched to using a class variable. 2007-07-30 17:04:46 +00:00
tjhunt ca9000df6f Fix typo in a comment. 2007-06-19 16:33:16 +00:00
tjhunt 6e9debfbf1 Removing remaining references to RQP in core code. I had not realised there were so many. By the way, I am committing this from a pub in York. Pub's with wireless, whatever next? 2007-05-24 17:25:37 +00:00
jamiesensei 9ab75b2bcc passing cmid to question.php and removed use of session modform var. Question.php now independent of quiz module. Small improvement to displayed breadcrumbs. 2007-05-04 05:47:59 +00:00
tjhunt 27987cbb78 Eliminate support for old-style question editing forms. 2007-04-25 18:20:04 +00:00
tjhunt 295043c21c Base class methods preparitory to deleting a lot of essentially duplicated code from the various question types. 2007-04-24 23:31:41 +00:00
tjhunt c85607f0be MDL-9432 - When restoring questions, links are not recoded. Merged from OU moodle. 2007-04-18 15:56:21 +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
tjhunt 54074fb872 MDL-9303 - General Feedback not shown for essay questions on review screen. Merged from MOODLE_17_STABLE. 2007-04-11 19:04:52 +00:00
tjhunt 88495aa8d2 Followup to MDL-8994 - validate the category id we got from the form. Merged from MOODLE_18_STABLE. 2007-03-22 22:02:14 +00:00
tjhunt 6000365ee4 MDL-8994 - Question category selector on the question type editing forms is ignored. Merged from MOODLE_18_STABLE. 2007-03-22 00:10:47 +00:00