387 Commits

Author SHA1 Message Date
Guillermo Gomez
3be2b123e5 MDL-71642 qbank_comment: Add question comment plugin to core
This implementation will introduce a qbank plugin
"comment" which will allow users with the capability
to comment in a question. It also implements a
callback for the question preview page to view
and add comments from the preview page. Comment
plugin is implemented using the existing comments
API from the core.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
2021-10-08 14:48:13 +11:00
Safat Shahin
f9fc355ec7 MDL-71679 mod_quiz: Updates for new qbank api
This implementation will introduct changes to
the mod_quiz to implement the new qbank api
for view. Major changes are introduced in
the custom view and also all the legacy points
to the old qbank are changed to qbank plugins
where needed. It also deprecated and deletes
classes and scripts which were kept not to
break mod_quiz for the new api implementation.
2021-10-04 15:44:25 +11:00
Sara Arjona
5c78efaaea Merge branch 'master_MDL-71614-previewquestion' of https://github.com/catalyst/moodle-MDL-70329 2021-09-08 09:29:22 +02:00
Safat Shahin
0d55b26da8 MDL-71614 qbank_previewquestion: Add Preview question plugin to core
This implementation will introduce a qbank plugin "previewquestion"
which will view the preview question action in the question bank
actions by replacing the core classes, scripts and yui modules.
This plugin will also replace the preview option in the edit
question form. Having this plugin will give users the
flexibility of enabling or disabling this feature from
the question bank view.
This change will also allow other qbank plugins to add
elements or information in the preview question page
by implementing a callback. It also changes the pop
up to page redirect from base view page to make sure
any changes in preview reflects in the base view, for
example, comments added and the number of comments in
the comments colum changes while back from the preview
page. Other locations like edit and qtype plugins where
the preview is implemented, stays the same.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
2021-09-08 16:21:06 +10:00
Sara Arjona
3b903ae45d Merge branch 'master_MDL-71585-managecategories' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 10:39:06 +02:00
Guillermo Gomez
fb10b36c04 MDL-71585 qbank_managecategories: Add managecategories to core
This implementation will introduce a qbank plugin "managecategories"
which will add the question categories feature in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the category tab.
2021-09-03 09:41:18 +10:00
Safat Shahin
c1797c6c9e MDL-71639 qbank_exporttoxml: Add Export to xml plugin to core
This implementation will introduce a qbank plugin "exporttoxml"
which will implement the export to xml action in the question
bank view by replacing the core class. Having this plugin will
give users the flexibility of enabling or disabling this action.
2021-09-02 21:21:57 +10:00
Guillermo Gomez
06f192aec9 MDL-71573 qbank_exportquestion: Add plugin to core
This implementation will introduce a qbank plugin "exporquestions"
which will add the export feature in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the export questions tab.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
2021-08-23 12:06:20 +10:00
safatshahin
dfed4fd040 MDL-71516 core_question: Qbank api implementation
This commit implements the qbank api so that any plugin
can implement its own question bank. This api currently
works parallely with the moodle core classes and the
added qbank in the core, means the moment a plugin
is installed, that object is replaced with the object
from the plugin instead of core, which means the api
has flexibility till the plugins are integrated and the
plugins can be integrated in any order.

All the old classes are still there and not deprecated
as there is a different tracker for the changes to the
quiz and another tracker for class deprecation and
class renaming. Core question units tests are pointing
to the new api structure but the classes are pointing
to the location related to the plugin availability.

Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>

one more array fix
2021-08-17 18:57:31 +10:00
Luca Bösch
7dd58aac64 MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:30:46 +02:00
Tim Hunt
5fbb14524d MDL-69077 questions: question tag capabilties are relevant 2020-06-17 13:06:57 +01:00
Martin Hanusch
08fe534986 MDL-63284 question: Moving questions with tags disabled bug fix 2020-05-29 16:42:04 +02:00
Adrian Greeve
b2978c1787 Merge branch 'MDL-68757' of https://github.com/timhunt/moodle 2020-05-26 10:33:03 +08:00
Victor Deniz Falcon
a735d4d1d4 Merge branch 'MDL-68252' of https://github.com/timhunt/moodle 2020-05-26 00:55:02 +01:00
Tim Hunt
4a45b7112c MDL-68757 questions: don't do output in low-level functions 2020-05-18 20:54:27 +01:00
Tim Hunt
1d47cb2168 MDL-68615 questions: fix fiendish default idnumber edge case 2020-05-05 16:19:54 +01:00
Tim Hunt
fa7431ce50 MDL-68252 question tags: fix tag editing for missingtype questions 2020-04-24 11:26:12 +01:00
Tim Hunt
7459856d26 MDL-68300 questions: un-break duplicating questions without idnumbers
This was a regression caused by MDL-67934
2020-03-31 11:00:39 +01:00
Jake Dallimore
9b8fc9be6d Merge branch 'MDL-67934' of https://github.com/timhunt/moodle 2020-03-25 08:28:27 +08:00
Tim Hunt
f2393804bf MDL-67934 questions: give a sensible default idnumber when duplicating 2020-03-12 18:07:11 +00:00
Tim Hunt
1b6b554118 MDL-67981 questions: avoid errors deleting contextless questions 2020-03-06 17:57:11 +00:00
Eloy Lafuente (stronk7)
2b97ab8adb Merge branch 'MDL-67947' of https://github.com/timhunt/moodle 2020-02-19 17:48:14 +01:00
Tim Hunt
887daf932c MDL-67947 questions: questions_in_use should ask all components
Previously it was only checking mods.
2020-02-19 11:55:04 +00:00
Sara Arjona
855d4db87a Merge branch 'bugfix-MDL-67142' of https://github.com/AngadSethi/moodle 2020-02-11 10:18:49 +01:00
Angad Sethi
86127e774f MDL-67142 quiz: fixed error when deleting saved questions long-name-quiz
An error was showing up while deleting questions
(in the question_save_from_deletion method) which had been saved
and which belonged to a quiz with a super long name, not exceeding 255
characters, as the 'name' field in 'question_categories' table had a
max size of 255 characters. The shorten_text function was used to
shorten the string to 255 characters and a unit test was added with
the name test_question_save_from_deletion_quiz_with_long_name to test
the patch.
2020-02-08 19:40:44 +05:30
Tim Hunt
1aacbb72d3 MDL-67832 quiz: fix lots of PHPdoc in attemptlib.php 2020-01-31 19:09:03 +00:00
Eloy Lafuente (stronk7)
ee439d017e MDL-67115 core: php74 params order for implode()/join()
Passing parameters to implode() in reverse order is deprecated, use
implode($glue, $parts) instead of implode($parts, $glue).

This commit corresponds to phpunit and manual detections, core files.
2020-01-19 18:47:07 +01:00
Shamim Rezaie
35ca1475b5 MDL-67151 core_question: Support scientific format at question preview 2019-12-03 16:52:22 +11:00
Tim Hunt
a3f42f998c MDL-66553 question bank: show idnumbers in category drop-down 2019-10-11 13:59:26 +01:00
Tim Hunt
d30c6cdc17 MDL-66553 question bank: fix lots of phpdoc and other warnings 2019-10-09 13:26:12 +01:00
Jun Pataleta
cbd8641a8a MDL-65994 question: Convert checkboxes to checkbox-toggleall element 2019-07-19 10:29:18 +08:00
Adrian Greeve
eee677c024 Merge branch 'MDL-53140-master' of git://github.com/rezaies/moodle 2019-05-01 10:30:22 +08:00
Shamim Rezaie
197e074eba MDL-53140 question: Support localised floats when previewing a question 2019-05-01 12:10:32 +10: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
Simey Lameze
9bec0e7e74 MDL-65207 core: replace typos by actually 2019-04-01 08:49:18 +08:00
Shamim Rezaie
8e93e515ed MDL-63809 question: handling bad questions in question_has_capability_on 2018-12-18 15:05:37 +11:00
Tim Hunt
616442a2fa MDL-63738 question bank: a link to download a single question 2018-10-29 10:38:24 +00:00
John Beedell
6189fda47f MDL-62708 question: Add idnumbers to question and question category 2018-09-21 12:26:24 +01:00
Andrew Nicols
e36019c2f3 Merge branch 'wip-MDL-62742-master' of git://github.com/marinaglancy/moodle 2018-08-29 08:31:08 +08:00
Marina Glancy
442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
John Beedell
d0a60444a1 MDL-63165 Question: xml import of question categories 2018-08-24 15:20:18 +01:00
Shamim Rezaie
94fe904ed6 MDL-62897 Questions: Fix multi top cats in question_save_from_deletion 2018-07-23 14:37:40 +10:00
Andrew Nicols
cc98914e85 MDL-61407 question: Allow formatters to ignore caps 2018-05-02 19:13:30 +08:00
Simey Lameze
02b1868c32 MDL-61364 core: fix cibot coding issues 2018-03-28 10:18:33 +08:00
Simey Lameze
e7329cd026 MDL-61364 question: refactor question_has_capability_on 2018-03-27 16:14:44 +08:00
Eloy Lafuente (stronk7)
4dca6ab54d Merge branch 'MDL-61589-master' of git://github.com/rezaies/moodle 2018-03-21 00:21:24 +01:00
Eloy Lafuente (stronk7)
9a79102a4c Merge branch 'MDL-61410-master' of git://github.com/lameze/moodle 2018-03-20 23:53:28 +01:00
Shamim Rezaie
ae9f5a04b1 MDL-61615 Questions: Only move question categories if there is any 2018-03-20 17:30:21 +11:00
Simey Lameze
6307622b28 MDL-61410 question: move tag sorting logic to a new function 2018-03-19 11:45:55 +08:00