111 Commits

Author SHA1 Message Date
Jake Dallimore
164e879156 Merge branch 'MDL-66796' of git://github.com/timhunt/moodle 2019-10-15 10:52:45 +08:00
Tim Hunt
468d7ead0a MDL-66796 question bank: fix more bugs with category editing 2019-10-14 15:29:53 +01:00
Tim Hunt
9c4f0fa746 MDL-66796 question bank: 0 is a valid question category idnumber 2019-10-14 14:33:36 +01:00
Jake Dallimore
f79a974435 MDL-66796 mod_quiz: only update the id number if changed
If the idnumber is present in the DB, it's set to null. In this case,
don't update the value.
2019-10-14 13:38:20 +08:00
Jun Pataleta
75c49ad291 Merge branch 'MDL-66553' of https://github.com/timhunt/moodle 2019-10-14 09:42:03 +08:00
Tim Hunt
d4b47c5442 MDL-66553 question bank: show idnumbers on the edit categories screen 2019-10-11 13:59:26 +01:00
Tim Hunt
e740085116 MDL-66796 question bank: 0 is a valid question category idnumber 2019-09-30 14:18:35 +01:00
VinhLe
4ca60a5660 MDL-36088 questions: Add new events 2019-04-29 11:16:19 +07:00
Stephen Bourget
93e435b909 MDL-36088 questions: Add new events 2019-04-29 11:15:36 +07:00
VinhLe
2ea8fbb0bd MDL-64469 Question bank: Change link questions in category question.
Make it easier to navigate from the category list to the questions in a category.
2019-01-11 11:28:49 +07:00
Tim Hunt
2d696f8f2b MDL-63752 question import: duplicate key error when idnumbers blank
And extra checks to head off possible idnumber='' issues in two other places.
2018-10-24 11:38:31 +01:00
John Beedell
6189fda47f MDL-62708 question: Add idnumbers to question and question category 2018-09-21 12:26:24 +01:00
Shamim Rezaie
18d6ff7880 MDL-61557 Questions: Fixed moving question categories to top 2018-03-05 13:40:02 +11:00
Shamim Rezaie
9275220de3 MDL-61132 Questions: Question Bank amendments to cope with Top category
* Display "Top" categories in the category filter when listing questions in the question bank
* Prevent editing "Top" categories
* Prevent deleting "Top" categories
2018-02-05 11:58:52 +11:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Jake Dallimore
d7d4a09707 MDL-54864 core_question: Enforce context,stamp uniqueness for category
Added an upgrade step to remove duplicate stamps, added a unique index
on (contextid, stamp) and modified the question_category edit code such
that stamp duplication in the same context is not permitted.
2016-08-22 09:44:52 +08:00
David Monllao
9e313e798f MDL-51784 general: Adding missing php4 style constructors
Adding them to warn people calling the php4 constructor.
2015-12-11 14:02:42 +08:00
Marina Glancy
c4d0b752a2 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 12:48:24 +08:00
Tim Hunt
6403c8d39b MDL-48477 questions: no delete icon for only top-level category
The back end code already threw an exception if you clicked the icon,
so you could not delete the category, but we should not have shown the
icon in the first place.

Thanks to Pramith Dayananda for working out the fix for this issue. I am
just committing it.
2015-01-15 10:20:47 +00: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
Mark Nelson
58940b190a MDL-40063 mod_quiz: replaced 'addcategory' add_to_log call with an event 2014-04-10 20:38:34 -07:00
Tim Hunt
fa5c608c62 MDL-41036 Question category info should use HTML editor
This is a minimal fix. All this code could do with a clean-up, but at
the moment, it works, so I am not going to touch it.
2013-08-15 12:19:47 +01:00
Adrian Greeve
329846f198 MDL-40430 - Libraries: Deprecate print_context_name(). 2013-07-09 16:11:55 +08:00
Tim Hunt
8009810ed4 MDL-38395 question categories: wrong URLs after editing.
The problem was that array1 + array2 takes the values from
array1 when a key appears in both places.

While working on this area, I updated it to use html_writer.
2013-03-15 08:12:39 +00:00
Tim Hunt
9645fe83ff MDL-32245 question bank: update URL after moving question between categories.
Also, improve the URL when you go to edit the questions in a category.
2012-12-20 12:12:22 +13:00
Tim Hunt
fc51c2bce2 MDL-27818 question bank: multilang category names don't work. 2012-08-30 22:42:15 +01:00
Ankit Agarwal
d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Petr Skoda
9aa09d8fed MDL-32251 more E_STRCT fixes 2012-03-29 16:29:29 +02:00
Petr Skoda
e2bb3c9275 MDL-32094 some more E_STRICT fixes 2012-03-18 20:40:20 +01:00
Tim Hunt
9d0ac0ffbb MDL-27143 question bank: questions not saved when deleting a category.
Based on a fix by Nikhil Gupta.
2011-12-09 18:03:52 +00:00
Tim Hunt
e0736817f0 MDL-20636 fix some more coding style issues in the question code. 2011-05-20 18:50:41 +01:00
Tim Hunt
9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01:00
Tim Hunt
5e8a85aa64 MDL-20636 Massively reduce the number of references to quiz in the question code.
This mostly involves moving lang strings around, but I don't have time to do an AMOS script now.
2011-02-23 18:53:50 +00:00
Tim Hunt
a17b297d60 MDL-20636 Add missing defined('MOODLE_INTERNAL') || die(); 2011-02-23 16:00:20 +00:00
Tim Hunt
017bc1d9f3 MDL-20636 Fix @package names in question/behaviour, question/engine and question top level. 2011-02-22 20:50:18 +00:00
Tim Hunt
d3603157bf MDL-20636 Add @package and GPL boiler-plate to files in /question. 2011-02-22 19:59:12 +00:00
Tim Hunt
0ff4bd0877 MDL-20636 Fix new stdClass -> stdClass(), and trailing whitespace. 2011-02-21 18:10:19 +00:00
Tim Hunt
f9b0500f7f MDL-20636 Quiz editing now works, as does the random question type.
However, all this needs more testing.

Also, a bit of a purge of training whitespace and global .
2011-02-10 20:50:18 +00:00
Tim Hunt
94dbfb3a82 quiz editing MDL-24750 The Add random button should also let you add questions from an existing category.
Also includes a fix for MDL-24749 by Sam Hemelryk. Thanks Sam.

This commit also includes a certain amount of code cleaning up.
2010-11-22 09:52:42 +00:00
Tim Hunt
5d548d3e0a question bank MDL-24995 clean up a lot of deprecated code to do with moving questions around.
This should also fix MDL-25172, MDL-23021 and MDL-23073. In other words, moving questions between categories should now work.
2010-11-11 21:54:22 +00:00
Tim Hunt
20d891228f MDL-24256 question category editing was messed up.
The unerlying problem seemed to be too many uses of pass-by-reference in listlib, where it was not necessary.
In investigating this code, I ended up doing a fair bit of cleaning up. Apologies that it leads to an unclear changeset.
2010-11-02 18:38:50 +00:00
Petr Skoda
7f38934243 MDL-24321 switching to stdClass in /question/ - I am sure Tim will be very happy 2010-09-21 08:20:46 +00:00
David Mudrak
5fcefc9728 MDL-21695 question: replaced help files with new help strings
AMOS BEGIN
 HLP question/categoryparent.html,[parentcategory_help,core_question]
 HLP question/categories.html,[editcategories_help,core_question]
 HLP quiz/export.html,[exportquestions_help,core_question]
 HLP quiz/exportcategory.html,[exportcategory_help,core_question]
 HLP quiz/exportcategory.html,[exportcategory_help,core_question]
 HLP quiz/importcategory.html,[importcategory_help,core_question]
 HLP quiz/matchgrades.html,[matchgrades_help,core_question]
 HLP quiz/quiz/stoponerror.html,[stoponerror_help,core_question]
 HLP qtype_multichoice/multichoiceshuffle.html,[shuffleanswers_help,qtype_multichoice]
 HLP quiz/matchshuffle.html,[shuffle_help,qtype_match]
 HLP quiz/generalfeedback.html,[generalfeedback_help,mod_quiz]
AMOS END
2010-08-02 21:24:32 +00:00
Petr Skoda
3e0e25efd1 MDL-22060 fixed $a in string to match new rules
AMOS START
 REM fixed $a[] in [cannotinsertquestioncatecontext, core_question]
AMOS END
2010-04-11 16:45:55 +00:00
Petr Skoda
8afba50b84 MDL-21233 get_query_string() is definitely not recommended in new code, instead use moodle_url constructors with proper parameters; removed some more legacy url concatenation operations; realized out_action is not needed often, because we shoudl pass arounf moodle_url instances instead of old url strings 2010-01-17 10:54:13 +00:00
Petr Skoda
b9bc201962 MDL-21233 escaped parameter is far more importatnt than the overrideparams in out() method - especially all JS urls should be converted to out(false); also it is possible to create new url with overrided parameters in constructor which might be actually work around the double encoding problems in the url (we should never use the out() in moodle_url constructor itself!) 2010-01-17 09:50:55 +00:00
Petr Skoda
eb7880654f MDL-21233 finally removed the omitquerystring parameters from the out method because: 1/ the least used parameter should nto be first, 2/ it is colliding with the other two paramters, now we have separate funtion for that instead 2010-01-17 09:37:30 +00:00
Petr Skoda
4bcc51185c MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several fixed regresions 2009-12-30 15:19:55 +00:00
Petr Skoda
b5d0cafc6f MDL-20787 final switch to new $OUTPUT->pix_url() - yay! 2009-12-16 21:50:45 +00:00
Tim Hunt
85edde5c90 question bank - MDL-20545 need a separate language string for edit question category, as opposed to edit course category. 2009-11-19 17:46:15 +00:00