114 Commits

Author SHA1 Message Date
Tim Hunt
f2393804bf MDL-67934 questions: give a sensible default idnumber when duplicating 2020-03-12 18:07:11 +00:00
Simey Lameze
9bec0e7e74 MDL-65207 core: replace typos by actually 2019-04-01 08:49:18 +08:00
Tim Hunt
d6388d0acf MDL-64332 questions: idnumber should not prevent easy duplication 2018-12-06 14:41:28 +00:00
Ryan Wyllie
81f43bc6d4 MDL-61138 question: add question exporters 2018-04-18 11:45:01 +08:00
Simey Lameze
2cf7bde8e9 MDL-61364 question: adjust code and fix phpunit errors 2018-03-27 16:14:46 +08:00
Ryan Wyllie
081eb156c5 MDL-61363 question: add course context tagging 2018-03-07 10:31:47 +08:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Marina Glancy
b355a1c97c MDL-50851 core_question: use new tag API 2016-01-10 15:25:47 +08:00
Tim Hunt
50b5dde8d1 MDL-28075 question editing: tidy code
Remove an unnecessary else (the if, and else if, always end in a redirect)
and unindent that code.
2014-10-02 22:03:12 +01:00
Tim Hunt
04bf7ac857 MDL-28075 question editing: sort out nav bar when editing in a quiz
If you edited a question from the Edit quiz page in a quiz, the navigation
bar was far too long. This was due to some odd code that was trying too
hard to be clever.

Instead, editing a question is now always treated as being logically within
the question bank for the purposes of navigation. That is, even if the
returnurl will end up taking you back to where you where when you have finished.
2014-10-02 22:03:12 +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
Mark Nelson
cc033d48b5 MDL-44316 core_tag: changed the API to accept a contextid and component 2014-03-22 13:50:08 -07:00
Tim Hunt
8011be189e MDL-33653 fix preview links on calc qtype edit forms.
Also, refactor how we render preview icons, to eliminate duplication.
2014-03-07 19:46:56 +00:00
M Kassaei
7756e2bc85 MDL-33653 questions, a way to save changes and continue editing 2014-03-07 12:42:51 +00:00
M Kassaei
435d32798b MDL-33839d, Remove the move icon from the question bank 2014-01-24 14:40:16 +00:00
M Kassaei
e0c41591e1 MDL-32523 Duplicate questions in question bank 2014-01-17 10:54:12 +00:00
Tim Hunt
a560d636f4 MDL-34399 questions: cache to help load question definitions.
At the moment, it takes several DB queries to load each question definition,
so this cache is potentially a big win.
2012-10-26 11:58:02 +08: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
Frederic Massart
21c08c63ca MDL-34458 Librairies: Replaced deprecated get_context_instance() 2012-07-24 16:58:17 +08:00
Tim Hunt
76cf77e4d3 MDL-32240 quiz editing: check permissions questions are added.
We also check permissions when removing questions from the quiz, so that
we do not let users make mistakes they cannot immediately undo.
2012-03-29 14:14:12 +01:00
Tim Hunt
51c5e6057c MDL-32239 question bank: wrong cap checks editing/viewing quesitions
None of these problems affect the default roles. They only occur when
the permissions have been edited to allow restricted subsets of the
question capabilities.

In some cases, things that the restriced subset of capabilities should
have allowed were blocked by errors. In other cases, users were allowed
to do more than they should bave been due to failures to check the
right capabilities in the right places.

For full details, see the bug report.

Two of the bugs were previously reported separately as MDL-26395 and
MDL-27232.
2012-03-29 14:14:10 +01:00
Tim Hunt
4bf1be3596 MDL-28437 Question bank pages should all use General type: admin. 2011-07-25 08:50:06 +01:00
Tim Hunt
9c197f4445 MDL-20636 Fix some more codechecker issues. 2011-05-14 22:53:25 +01:00
Tim Hunt
42663bb78e MDL-20636 Fix a bunch of missing strings caused by separating question from quiz. 2011-03-02 17:42:53 +00: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
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
a13d4fbd20 MDL-20636 Fix lots of minor quiz editing glitches. 2011-02-11 17:36:30 +00:00
Tim Hunt
06f8ed54fd MDL-20636 More progress. 2011-01-13 18:35:34 +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
fde29fa59c quiz & qbank MDL-24453 some more return URLs that I missed the first time.
Also, fix a double-escaping bug when cancelling the form.
2010-10-18 15:53:54 +00:00
Tim Hunt
fb6dcdab11 quiz & qbank MDL-24453 fix all the ways you can edit a question, so that that returnurl paramterer acutally works.
I hope. Please test thoroughly.
2010-10-18 15:28:59 +00:00
Pierre Pichet
99d671ebd3 MDL-24249 adding an else if ($originalreturnurl && $wizardnow !== '') for multipage question edition 2010-09-17 16:33:23 +00:00
Tim Hunt
e934fa008b question editing MDL-23758 notice on clicking cancel. 2010-08-11 16:37:11 +00:00
Dongsheng Cai
fe6ce23489 MDL-16094 File storage conversion Quiz and Questions 2010-08-10 09:56:48 +00:00
Tim Hunt
90c7912e93 quiz editing MDL-22371 with JS off, clicking add question, then cancel, did not work.
Also, other simpilar issues with other buttons.
And, finally fix the absolute URLs being passed as returnurl. Apache mod_security did not like that.
2010-08-04 19:44:59 +00:00
Rossiani Wijaya
0f56fde284 MDL-20447 - bulk upload: add page heading 2010-06-02 06:13:27 +00:00
Tim Hunt
a27aa5c620 MDL-19967 No validation when adding a question with JS off.
There was no check that a question type had been selected.
2010-05-06 22:33:21 +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
340d461269 MDL-21233 simplifying moodle_url->out() api 2010-01-17 09:18:11 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Sam Hemelryk
d8ae33a95c question MDL-21169 removed update_module_button calls from question these are now added by the module extending the navigation if there is a module specified for question pages.
Also fixed bug in moodle_url object coding_error to coding_exception
2009-12-23 02:45:22 +00:00
Tim Hunt
7846a624d5 question editing: MDL-20380 Highlight the last edited question when you cancel the form too. 2009-11-19 17:59:54 +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
1d58b567be question MDL-19820 Replaced deprecated functions 2009-09-25 04:16:27 +00:00
samhemelryk
b0f4e4e442 questions MDL-20276 Fixed minor issue with URL handling within the paging bar for the question bank 2009-09-16 02:43:58 +00:00
samhemelryk
d412354cc6 question MDL-19820 Updated print_header and build_navigation to OUTPUT and PAGE equivalents 2009-09-07 02:36:39 +00:00
nicolasconnault
fef8f84e4b MDL-19822 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:19:00 +00:00
nicolasconnault
9b59580b36 MDL-19820 Converted all print_footer() calls 2009-08-06 14:19:16 +00:00