2732 Commits

Author SHA1 Message Date
Marina Glancy
b7e662bb13 Merge branch 'MDL-46916' of git://github.com/timhunt/moodle 2014-08-25 16:49:52 +08:00
Colin Chambers
96fc865427 MDL-46895 qtype_calculated_find_formula_errors not defined causes Calculated question type test to fail 2014-08-22 13:55:44 +01:00
Tim Hunt
6d99e71847 MDL-46916 behat: improve question state test. 2014-08-21 14:16:31 +01:00
Marina Glancy
6ee21ea1d0 Merge branch 'MDL-18014-master' of git://github.com/damyon/moodle 2014-08-19 16:57:05 +08:00
Damyon Wiese
d32bc7d655 MDL-18014 Atto autosave: Atto requires $PAGE->url be set or debugging is triggered
2 quiz tests are creating forms with text editors manually - they need to ensure a valid
$PAGE->url is set so they don't trigger debugging warnings from $PAGE->url magic method
called by Atto.
2014-08-19 16:02:14 +08:00
Marina Glancy
430529bde8 Merge branch 'MDL-18014-master' of git://github.com/damyon/moodle 2014-08-19 13:50:44 +08:00
Marina Glancy
efc815848d Merge branch 'wip-MDL-46791-master' of git://github.com/satrun77/moodle 2014-08-19 10:47:55 +08:00
Tim Hunt
f276267d93 MDL-44894 question editing: fix validation with odd permissions
For users with edit permissions, but not add permissions, it was
impossible to save the editing form. The validation assuemd this value
was present, but it was not. Other code checks this field too, so I
added it rather than changing the validation and all the other uses.
2014-08-14 11:25:18 +01:00
Damyon Wiese
8593521f4c MDL-18014 Atto autosave: Fix coding style issues 2014-08-14 12:42:46 +08:00
Damyon Wiese
2ba6706d12 MDL-18014 Atto: Autosave text every N seconds. 2014-08-14 12:41:55 +08:00
Mohamed Alsharaf
6d0361ff25 MDL-46791 question: fixed incorrect 5th param for tag_set() 2014-08-13 13:57:12 +12:00
Marina Glancy
3cef86a42b Merge branch 'MDL-46308' of git://github.com/timhunt/moodle 2014-08-12 16:02:41 +08:00
Tim Hunt
013fa7a444 MDL-46308 qformat_xml: fix import of broken calculated questions.
Questions like this should not exist, of course. But they do, so we
should avoid generating errors in this case.
2014-08-08 17:58:44 +01:00
Tim Hunt
aa4dcee761 MDL-46681 qtype_multichoice: disabled unused options
For questions set to 'One answer only', the 'Clear incorrect responses'
and 'Show the number of correct responses' hint options make not sense,
and are not used. Hence we disableIf them.
2014-08-07 14:20:06 +01:00
Eric Merrill
84f74ccff6 MDL-46386 question Whitelist the Atto editor from return blocking
Prevent the question engine from blocking return/enter key presses
from being sent to the Atto editor.
2014-07-21 09:08:01 -04:00
Ankit Agarwal
82b3260eab MDL-46148 qtype_calculated: low-level defence against bad formulas
This catches things like:
 * Malicious equations coming from backup files.
 * Malicious equations in old questions in the database.
2014-07-10 17:55:11 +08:00
Damyon Wiese
539a25ff03 MDL-46148 questions: Added missing allow_commit for transaction 2014-07-10 11:35:47 +08:00
Tim Hunt
5c6c172033 MDL-46148 qtype_calculatedsimple: fix notice
... when adding a dataset with a formula error.
2014-07-09 13:47:48 +01:00
Tim Hunt
66de66fe6a MDL-46148 qtype_calculated: fix validation when importing.
In order to do this in a sane way, I cleaned up a lot of old mess,
inclduing:

1. Previously, qtype_calcuated used ->answeres when importing, and
->answer when saving the form. This was crazy, so I fixed it, and
stripped out the code that made the alternative variable name work.

2. Similarly, it could handle ->answer being either an array, such as
you would get form the HTML editor, or a simple string, which is what
you get form the form. I simplified that too.

3. Finally, I made import use a transaction around saving each
question, so we don't get half questions in the database when an error
occurs.
2014-07-09 13:35:09 +01:00
Tim Hunt
770d3ce426 MDL-46148 qtype_calculated: removed unused method. 2014-07-09 12:56:18 +01:00
Sam Hemelryk
95d294368f Merge branch 'MDL-46212' of git://github.com/timhunt/moodle
Conflicts:
	question/type/calculated/question.php
2014-07-08 11:43:09 +12:00
Tim Hunt
88ec9f308d MDL-46148 qtype_calculated: validate formulas everywhere. 2014-07-07 14:33:34 +01:00
Tim Hunt
155bc75472 MDL-46148 qtype_calculated: function to validate equations in text. 2014-07-07 14:33:29 +01:00
Tim Hunt
29005a5418 MDL-46148 qtype_calculated: Remove unused function. 2014-07-07 14:33:24 +01:00
Tim Hunt
44f726a7b1 MDL-46148 qtype_calculated: unit tests + fixes for validation 2014-07-07 14:33:20 +01:00
Tim Hunt
f4fe3968a2 MDL-46212 questions: add {} whenver vars are put into "" strings
Having had one subtle bug cased be this, I decided to do a search and
fix all of these.
2014-07-03 14:02:39 +01:00
Tim Hunt
0e30442ca8 MDL-46212 question editing: extra answer fields notice.
It turns out that PHP does not interpret "$field[$key]" the way we were
expecting.
2014-07-03 13:56:11 +01:00
Marina Glancy
9422f6ee42 MDL-46163 question/quiz: fix elements ids and their labels 2014-07-03 10:13:00 +01:00
Tim Hunt
84deaaf8bb MDL-46163 quiz/questions: fix missing hidden fields.
I have done this by eliminating the duplication between the base class
and the subclass.

This was a regression introdcued by MDL-40313.
2014-07-02 14:32:53 +01:00
Dan Poltawski
9cafb3433f MDL-46163 question: fix missing ; 2014-07-02 07:22:15 +01:00
Dan Poltawski
c4058e6e0c Merge branch 'MDL-46163_category_selector_renders_as_nested_form' of https://github.com/MorrisR2/moodle 2014-07-01 14:16:04 +01:00
Dan Poltawski
2d8c48a995 Merge branch 'MDL-40457-question_bank_plugins_columns' of git://github.com/MorrisR2/moodle 2014-07-01 10:12:52 +01:00
Ray Morris
17f229fae3 MDL-40457 Question Bank: Allow plugins to add columns to question bank view
Allows plugins to add columns to the question bank view by extending core_question\bank\column_base
Columns to display are set in $CFG->questionbankcolumns. Columns are namespaced and autoloaded to support this.
2014-06-29 21:28:52 -05:00
Ray Morris
1c906d4945 MDL-46163 Question bank: Category selector renders as nested form 2014-06-26 12:09:38 -05:00
Sam Hemelryk
78c12cdb0f MDL-43365 lib: converted text and plugin deprecated classes to new scheme
Four core library classes renamed for autoloading with deprecated stubs
have been converted to the new scheme for autoloading.
They are:

 * textlib
 * collatorlib
 * plugin_manager
 * plugininfo_base

These will be removed in 2.9 by MDL-46124
2014-06-25 09:30:38 +12:00
Damyon Wiese
ca4f7f6105 MDL-45763 Question types: Allow saving '0' as question text. 2014-06-11 17:28:52 +08:00
Marina Glancy
5528117324 MDL-45763 question: fix SQL syntax for Oracle 2014-06-11 12:13:19 +08:00
Eric Merrill
516a3ddc76 MDL-45763 question: Correct random question text if set to true or false 2014-06-10 06:05:33 -04:00
Eric Merrill
a871a7a757 MDL-45763 question Random qtype should use '0' or '1' question text.
Some time ago, it when from using '0' for no-subcategories to blank.
Change to properly define '0' or '1', update old questions, and make
sure to fix newly restored questions.
2014-06-02 15:31:23 -04:00
Eloy Lafuente (stronk7)
f94891cc00 MDL-45503 upgrade: add v2.7.0 sep lines 2014-05-28 01:13:42 +02:00
Sam Hemelryk
36c95fe075 Merge branch 'MDL-45660' of git://github.com/timhunt/moodle 2014-05-26 11:52:32 +12:00
Jean-Michel Vedrine
8974442b72 MDL-45686 qtype_multichoice get_num_selected_choices return wrong result 2014-05-25 09:11:33 +02:00
Tim Hunt
8b431dca97 MDL-45660 question statistics: make comparison more robust. 2014-05-22 17:30:34 +01:00
Damyon Wiese
84f08cfa9d MDL-45606 Unit test fix for MySQL and added a comment about the removed code. 2014-05-20 18:01:32 +08:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Eloy Lafuente (stronk7)
538bf99ece MDL-45486 Bump all versions to planned release
This bumps all versions to planned 2.7 release
(2014051200) version and all the dependencies to
current 2.7rc2 (2014050800)
2014-05-09 02:12:28 +02:00
James Pratt
96a0b9aaaa MDL-45373 quiz response analysis : count all tries at question
don't filter repeated tries.
2014-05-06 12:26:02 +07:00
James Pratt
9b604f28d2 MDL-45114 quiz simulate report : multi-choice multi qtype response data
fixing download.
2014-04-19 15:04:16 +07:00
Dan Poltawski
72de455146 Merge branch 'MDL-45003-master' of git://github.com/jamiepratt/moodle 2014-04-15 10:33:30 +08:00
Dan Poltawski
34f7e31ffb Merge branch 'MDL-40063_master' of https://github.com/markn86/moodle 2014-04-11 14:31:27 +08:00