142 Commits

Author SHA1 Message Date
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
2c90221888 Merge branch 'master_MDL-71641-tagquestion' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 13:06:01 +02:00
Safat Shahin
1db23e818c MDL-71641 qbank_tagquestion: Add Tag question plugin to core
This implementation will introduce a qbank plugin "tagquestion"
which will implement the tag question actions 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-06 20:39:39 +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
Sara Arjona
479bd0b9fa Merge branch 'master_MDL-71613-viewcreator' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 10:22:04 +02:00
Marc-Alexandre Ghaly
b0067846ef MDL-71613 qbank_viewcreator: Add View creator to core
This implementation will introduce a qbank plugin "viewcreator"
which will view the question creator/modifier column in
the question bank view by replacing the core classes. Having
this plugin will give users the flexibility of enabling
or disabling the question creator and modifier column
in the question bank view.

Co-Authored-By: Marc-Alexandre Ghaly <marc-alexandreghaly@catalyst-ca.net>
2021-08-31 13:53:41 +10:00
Safat Shahin
354b98c86c MDL-71576 qbank_viewquestionname: Add View question name to core
This implementation will introduce a qbank plugin "viewquestionname"
which will view the question name column in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the question name column.
2021-08-31 12:06:00 +10:00
Safat Shahin
47478d6b59 MDL-71574 qbank_editquestion: Add Edit question plugin to core
This implementation will introduce a qbank plugin "editquestion"
which will implement the edit question, add question and copy
question actions in the question bank view by replacing the
core classes. Having this plugin will give users the
flexibility of enabling or disabling these actions.
2021-08-23 11:00:16 +10:00
Ilya Tregubov
9937593420 MDL-71516 core_question: Fix url not being composed correctly. 2021-08-19 17:48:00 +02: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
safatshahin
351176bb71 MDL-71516 core_question: Create new plugin type - qbank
This commit implements the qbank plugin type which
includes the boilerplate for the qbank plugin, the
qbank plugin management admin page and required core
code addition.
2021-08-16 09:59:11 +10:00
safatshahin
86bdf87966 MDL-71516 core_question: Class movement for moodle autoloading
Movement of classes to classes/local/bank and additional
todo addition to all the existing ones to align with
future tracker for class renaming. This commit does not
contain any class renaming of the old or deprecated
classes. MDL-72004 will be used to rename, remove or
deprecate old classes after integrating all the qbank
plugins.
2021-08-16 09:59:11 +10:00
Luca Bösch
7dd58aac64 MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:30:46 +02:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Eloy Lafuente (stronk7)
cfba0366db Merge branch 'MDL-70893-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:23:26 +01:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Tim Hunt
9216860b88 MDL-71009 question bank: escape idnumbers when displayed 2021-02-26 12:46:32 +00:00
Marina Glancy
0eada7a5f9 MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
Tim Hunt
1622425260 MDL-70065 quiz: fix paging when adding questions from the bank 2020-10-29 20:25:53 +00: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
64207dab65 MDL-67183 questions: get_question & get_behaviour only init if required
This reviews all the code code, and sets $requirequestioninitialised
whenever possible in these calls, which should improve performance.
2020-05-19 20:52:07 +01:00
Tim Hunt
89692520e8 MDL-68252 question bank: for 'missingtype' questions, hide actions 2020-04-24 09:58:35 +01:00
Tim Hunt
511801eaa9 MDL-68153 qbank: question of unknown type should not cause fatal error
Regression casued by MDL-67153
2020-03-11 20:40:51 +00:00
Bas Brands
aa100b767f MDL-66999 theme_boost: @extend remove extends for questions 2019-12-12 11:27:58 +01:00
Tim Hunt
c9491626ab MDL-67153 question bank: let qtype add actions to the edit menu 2019-11-06 19:32:15 +00:00
Eloy Lafuente (stronk7)
32b625b6de Merge branch 'MDL-66956' of https://github.com/timhunt/moodle 2019-10-28 19:41:58 +01:00
Luca Bösch
f68616d750 MDL-67001 question: alignment and form spaces. 2019-10-23 10:59:24 +02:00
Tim Hunt
c11c88928e MDL-66956 question bank: move edit menu to improve usability 2019-10-18 14:27:51 +01:00
Tim Hunt
701ae1eb4b MDL-66816 question bank: replace row of edit icons with an Edit menu 2019-10-18 14:27:50 +01:00
Jun Pataleta
0aa17f2631 MDL-66553 question: Behat fixes
1. Fix sortable key for the qname/idnumber/tags column
2. Fix the default sort
3. Fix Behat test for sorting by idnumber. Added ID numbers for both
question A and question C in order for us to get consistent sorting
across DBs.
2019-10-15 20:22:12 +08:00
Tim Hunt
61cc1e6494 MDL-66553 question bank: show tags and idnumbers in question list 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
Simey Lameze
2cfd8d1678 MDL-62992 question: conditionaly enable question tags feature 2019-03-27 10:16:05 +08:00
VinhLe
d02247448b MDL-63944 Question: Add toggle all to Quiz Activity 2019-02-15 14:42:07 +07:00
Andrew Nicols
270fd3f5e4 MDL-63944 Question: Convert toggle all to generic module 2019-02-15 10:07:08 +07:00
VinhLe
b65bc972e6 MDL-63944 Questions Bank: Select all checkbox should be checked
When checkbox item be chosen then "Select All" be chosen.
When "Select All" be chosen then all checkbox item be chosen.
2019-02-15 10:07:08 +07:00
Shamim Rezaie
98e019455e MDL-64551 core_question: Fix double ampersand escaping in tag button 2019-01-14 18:21:41 +11:00
Tim Hunt
b195523758 MDL-63809 question bank: ensure question_has_capability_on can be called 2018-12-18 14:54:28 +11:00
Andrew Nicols
c96cd71102 MDL-63924 privacy: Add shared user providers to subsytsems 2018-11-08 21:26:18 +08:00
Mihail Geshoski
076288307f MDL-63564 core_question: Avoid using UNION in get_users_in_context() 2018-11-02 14:14:19 +08:00
Shamim Rezaie
bdba3b97fd MDL-63564 question: Add helper to fetch users in context
This issue is a part of the MDL-62560 Epic.
2018-11-02 13:56:01 +08:00
Shamim Rezaie
c8aff683cb MDL-63564 core_question: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-11-02 13:56:01 +08:00
Shamim Rezaie
0ce3fef70a MDL-63390 quiz_statistics: Remove Min/Median/Maximum rows
Part of MDL-62610
2018-10-01 07:53:10 +08:00
Shamim Rezaie
84140b9137 MDL-63390 quiz_statistics, question: Handling variants as well
Variants should also be treated like random questions in the sense that
a summary row
should be displayed for them as well.
This commit deals with handling variants.
Also the name of the calculated_random_question_summary class has
changed to
calculated_question_summary to be more generic as the summary row is not
specific to random questions only.
Also removed the protected function too_many_subq_and_or_variant_rows
and the const SUBQ_AND_VARIANT_ROW_LIMIT as they were not being used
anymore.

Part of MDL-62610
2018-10-01 07:52:31 +08:00
Shamim Rezaie
f4bc55871c MDL_63390 question: Fixed get_min_max_of and get_min_max_of_sd
Fixed calculated_random_question_summary:get_min_max_of and calculated_random_question_summary:get_min_max_of_sd
functions and added unit tests

Part of MDL-62610
2018-10-01 07:52:18 +08:00