Commit graph

502 commits

Author SHA1 Message Date
tjhunt
4995b9c19c question types: API cleanup.
MDL-18350 remove backwards compatibility support for question types having their lang strings in the quiz language module.
MDL-16407 settings.php support for question types. Remove the old get_config_options from question types. I don't think anyone was using it.
2009-02-25 07:01:57 +00:00
tjhunt
3cac440b76 quiz editing: MDL-18173 Make clear in the UI whether a random question selects from subcategories or not. 2009-02-24 05:16:23 +00:00
pichetp
f7fa6874f7 MDL-18034 MDL-18035 correcting typo
saving answers data in $question->answerif they come from edit from.
2009-02-20 20:52:32 +00:00
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
2aef1fe52f question editing: MDL-18035 Nice refactoring from Oleg Sychev that saves 50+ lines of code between the various editing forms. 2009-02-18 06:52:11 +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
pichetp
9af77e9d17 MDL-18034 Rename answers field to answer in calculated qtype form to increase consistency 2009-02-03 00:40:40 +00:00
Francois Marier
6280ef3e58 Fix CVS-git drift (remove some files deleted in CVS) 2009-02-01 23:43:28 +00:00
pichetp
0a6555f854 MDL-18034 saving answers data in $question->answer if they come from edit from. 2009-01-27 15:00:19 +00:00
pichetp
103a800d67 MDL-17995 replacing is_null() by empty(). 2009-01-26 01:21:58 +00:00
pichetp
8795a5ae25 MDL-17995 replacing $wrapped !='' by !is_null($wrapped)
MDL-17857 Allowing multianwer (Cloze) question to have a 0 default grade as other question types
2009-01-25 14:49:02 +00:00
tjhunt
bcda961144 matching qtype: MDL-17981 extra distractors feature was not working on MS SQL server, since MDL-14420 was fixed. 2009-01-23 02:19:30 +00:00
tjhunt
714aaf918a shortanswer qtype: MDL-17800 Fix merge problem. Thanks to Oleg for spotting this. 2009-01-23 01:11:21 +00:00
Jonathan Newman
4d933beb8a cvsimport fixups 2009-01-20 23:53:34 +00:00
tjhunt
c599a68240 question bank: MDL-12787, MDL-17870 field in the question editing form to tag questions, and load and save the tags from the DB. 2009-01-16 08:00:06 +00:00
tjhunt
a18ba12ca6 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:23 +00:00
tjhunt
c795dc7843 questiontypes: MDL-17800
Fix another merge error.
2009-01-16 04:24:24 +00:00
tjhunt
815262cab6 questiontypes: MDL-17800
Fix merge error.
2009-01-16 04:23:21 +00:00
tjhunt
c51c539d11 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:07 +00:00
tjhunt
d65c238b2c 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:38 +00:00
skodak
58fa5d6f75 MDL-16483 - renamed MoodleUnitTestCase to FakeDBUnitTestCase; MDL-17841 removed bogus remove lib/simpletest/slowcodetest.php 2009-01-10 13:47:26 +00:00
tjhunt
d001dac77b shortanswer qtype: MDL-17706 use extra_question_fields mechanism to save on code. Changes thanks to Oleg Sychev. 2009-01-09 05:10:33 +00:00
tjhunt
71990c7cf6 question preview: MDL-17418 Enable previewing of random questions.
Also, fix a grade rounding issue.
2009-01-08 09:03:49 +00:00
tjhunt
7028ab335d match qtype: MDL-17326 backup and restore problems
* The shuffleanswers options was not backed up or restored.

* Responses were not properly recoded on restore.
2008-12-12 06:45:07 +00:00
dongsheng
771dc7b298 "MDL-14129, fix error() in moodle2" 2008-12-12 05:45:43 +00:00
dongsheng
60e40dda6c "MDL-14129, remove the rest error() in moodle2" 2008-12-12 04:53:32 +00:00
tjhunt
299d9fb834 matching qtype: MDL-17496 With filterall and multilang, the contents of the dropdowns was not being properly filtered
This was caused becuse the solution to MDL-9005 was not quite right.
2008-12-12 04:39:38 +00:00
tjhunt
be8563b63a numerical and shortanswer question types: problems with compare_responses and test_response.
MDL-15315 The previous fix for this issue with wildcard answers in the item analysis report caused the following two regressions. This patch fixes it properly.

MDL-17247 This is basiclly pointing out the weridness in the previous fix and gave some useful clues as to a proper solution. Thanks Oleg.

MDL-17610 This was a report of a problem with each attempt builds on last, with a shortanswer question, where the sutdent's response contains a '.

Also, lots of unit tests to try to ensure the new code is right.
2008-12-12 03:48:39 +00:00
tjhunt
f932b81953 matching qtype: MDL-14420 Could not use '0' as a question stem. Oops, more tests need to be corrected. 2008-12-11 05:01:37 +00:00
tjhunt
9ce0983b0d matching qtype: MDL-14420 Could not use '0' as a question stem. Bloody PHP! 2008-12-11 04:57:39 +00:00
tjhunt
f8394114c3 matching qtype: whitespace cleanup. 2008-12-11 04:55:41 +00:00
tjhunt
26b266625b numerical qtype: MDL-15159 Error moving a numerical question type with no units from one category to another. 2008-12-11 04:33:41 +00:00
tjhunt
e8f99abc68 quiz manual grading: MDL-5517 manual grading pop-up is too small. HTML editor does not fit. Merged from MOODLE_19_STABLE.
Also MDL-17585 Improve layout of manual grading forms to make them look more like formslib forms. The standard trick of stealing the HTML and class names that formslib works, so the standard style rules apply to your form.
2008-12-10 09:11:30 +00:00
dongsheng
ff9b4ea40a "MDL-17570,clean align property, merged from 1.9" 2008-12-10 07:24:11 +00:00
tjhunt
aafdb447bf 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. Merged from MOODLE_19_STABLE.
And MDL-17568 minor niggles with new queston navigation:
* The bit that scrolls down to the question you just submitted in adaptive mode was not working with random questions.
* Teachers reviewing an open attempt were shown the qusetions as editable, not read only!
2008-12-10 06:26:47 +00:00
tjhunt
0a9356aad3 truefalse qtype: MDL-12027 remove spurious alt attribute from truefalse qtype radio buttons. 2008-12-10 00:54:27 +00:00
pichetp
636bbc8728 MDL-17524 Deleting a calculated question delete datasetdefinitions shared by other question
} missing...
2008-12-04 16:04:48 +00:00
pichetp
57db70affb MDL-17524 Deleting a calculated question delete datasetdefinitions shared by other question 2008-12-04 15:56:01 +00:00
pichetp
77f60b432a removing an echo diagnostic output... 2008-12-01 04:03:48 +00:00
pichetp
cae0b24abb Modify a DB call so that the first index is not multiple .
Eliminate references to datasetdefinition->type  other  than 1
as the dataset tables are just used by calculated that used type =1 i.e. LITERAL.
2008-12-01 04:00:54 +00:00
pichetp
0bddf4b6ac Displacing <label> to enclose correctly answer text in question display
so no possible XML problem.
Cleaning comments
Better handling of empty responses when grading,
2008-11-29 15:02:27 +00:00
jamiesensei
2280e147c5 MDL-12418 "Item Analysis shows duplicate responses for Multiple Choice questions with LaTeX in answers" This problem was caused by the formatting of questions in get_actual_responses. Now formatting is done in response_summary rather than get_actual_response which returns an array of unformatted strings.
Have fixed the formatting in responses report and in statistics report to use the correct formatting for the question type.

Created new functions format_responses and format_response. format_responses works on an array and normally just walks through the array calling format_response.
2008-11-28 10:14:19 +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
16590517fa fix notices: MDL-15974 Some systems that were upgraded have nullable columns, leading to notices
A new install has NOT NULL DEFAULT 0.
2008-11-27 05:12: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
pichetp
fd97082c59 MDL-17264 Adding control of usecase for the shortanswer type using SHORTANSER_C or
SAC or MWC
2008-11-24 04:10:43 +00:00
pilpi
a9b6e4b88a question: MDL-17337 Add the new essay and random question icons 2008-11-20 18:26:35 +00:00
tjhunt
fa583f5f6e quiz editing: MDL-17285 This is Olli Savolainen's new interface for editing quizzes.
This was started and usability tested as a Finnish Summer of Code project, and then Olli did further work on it in his own time to get it in shape for inclusion in Moodle 2.0. I reviewed all the code. There are a number of minor outstanding issues that will be fixed soon. See the subtasks of MDL-17284 for a list.

The goal of these changes is to:
* help teachers new to Moodle, so when they first see the quiz editing page, they don't go "Huh! What on earth am I supposed to do here?"
* help novice Moodle users understand and learn to use some of the more advanced quiz feature;
* but, without slowing down more experienced quiz users.

Naturally, with ambitous goals like that, we won't have managed to satisy everybody, but I think this change is a big step in the right direction.

There is extensive documentation on this project at http://docs.moodle.org/en/Development:Quiz_UI_redesign.
2008-11-20 06:59:11 +00:00
pichetp
f96e83d4b6 MDL-17228 Synchronizing dataitems between calculated questions in a quiz 2008-11-18 18:28:20 +00:00