97 Commits

Author SHA1 Message Date
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
Petr Skoda
aeb15530b8 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-04 11:57:52 +00:00
samhemelryk
7f09335135 output MDL-19799 Fixed up some set_url calls as well as fixing some regressions caused by recent upgrades 2009-10-21 04:23:35 +00:00
samhemelryk
1d58b567be question MDL-19820 Replaced deprecated functions 2009-09-25 04:16:27 +00:00
nicolasconnault
beb677cda6 MDL-19820 Converted print_box* to $OUTPUT->box* 2009-08-10 05:01:23 +00:00
nicolasconnault
723d610c91 MDL-19820 Migrated calls to print_heading 2009-08-06 08:26:06 +00:00
nicolasconnault
e42f153c33 MDL-19976 Changing redirect($url->out()) to redirect($url). NEVER, NEVER use redirect($url->out())!!! Bad Tim! :p 2009-07-31 09:30:11 +00:00
tjhunt
6acbb3192b Remove deprecated function call. 2009-07-22 07:05:57 +00:00
tjhunt
42d5737a94 MDL-19690 fix some breakage. 2009-07-02 12:35:13 +00:00
tjhunt
c8873c496b MDL-19690 - eliminate the $OUTPUT->initialise_deprecated_cfg_pixpath horrible hack.
Replace $CFG->pixpath with $OUPTUT->old_icon_url(...) instead.
2009-07-02 11:23:47 +00:00
tjhunt
a5cb8d6987 MDL-19077 - Finish eliminating customcorners-specific code in core.
The custom-corners-specific code now in theme/customcornser/renderers.php
and lib/deprecatedlib.php.

Also, $CFG->pixpath is now causing more problems than ever. If it is
giving your problems, please call $OUTPUT->initialise_deprecated_cfg_pixpath()
as a temporary fix. As you can imagine, we are thinking about a better
long-term fix, which is why that method as a silly, and easy to grep name.
2009-06-29 08:17:31 +00:00
skodak
bb4b6010f3 MDL-18293 removed obsoleted checking of return values from insert and update_record + unused strings cleanup 2009-06-13 17:17:10 +00:00
tjhunt
c65921d422 Question categories. Move code to a more appropriate place. 2009-03-05 04:19:33 +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
tjhunt
df4e224454 question bank: MDL-14434 Cannot edit the only question category in a context. 2008-11-27 11:50:29 +00:00