4714 Commits

Author SHA1 Message Date
Anupama Sarjoshi
07d2f485b8 MDL-78477 qbank_history: Fix and improve UI for edit menu delete option
Changes done to fix the warnings thrown in the history view when the
last version of a question is deleted and improved UI to display the
message and a Continue button, to navigate back to the Question bank.
2023-06-20 17:24:50 +01:00
Andrew Nicols
4d15a4ee32
Merge branch 'MDL-69231-master' of https://github.com/lameze/moodle 2023-06-15 10:58:56 +08:00
Andrew Nicols
3daea485f3
Merge branch 'MDL-78008' of https://github.com/timhunt/moodle 2023-06-08 12:09:07 +08:00
Simey Lameze
2367bc9ff6 MDL-69231 behat: remaining work for role capability generator
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
2023-06-02 12:47:27 +08:00
Andrew Nicols
08dab39234
Merge branch 'MDL-78327' of https://github.com/timhunt/moodle 2023-06-01 10:52:22 +08:00
Simey Lameze
89b0b04333 MDL-77547 behat: run recalculate task before checking values 2023-05-31 15:04:54 +02:00
Sara Arjona
ca1996a013 Merge branch 'MDL-77547-master' of https://github.com/andelacruz/moodle 2023-05-31 12:51:13 +02:00
Tim Hunt
ddd1ce66fd MDL-78327 question stats: store same timestamp for all question stats 2023-05-31 10:41:34 +01:00
Angelia Dela Cruz
898a6b7c1a MDL-77547 Behat: Coverage to check for bad multichoice questions 2023-05-23 15:14:18 +08:00
Tim Hunt
a3043c3933 MDL-78008 qtype_multianswer: random guess score with missing subqs
Sometimes, due to other bugs, subquestions can get lost, so the code
needs to be robust to this.
2023-05-22 17:01:21 +01:00
Anupama Sarjoshi
73d29dc1ce MDL-78176 Question: Fix D&D onto image and D&D markers theme issue 2023-05-19 16:16:36 +01:00
Simey Lameze
2f53549697 MDL-77218 behat: use correct label to click the button 2023-05-16 18:18:22 +08:00
Ilya Tregubov
5388970860
Merge branch 'MDL-77218-master' of https://github.com/danghieu1407/moodle 2023-05-16 15:59:53 +08:00
Jun Pataleta
88495c2f4b Merge branch 'MDL-75576' of https://github.com/timhunt/moodle 2023-05-16 10:02:13 +08:00
Tim Hunt
60dbaa0065 MDL-75576 quiz/question statistics: don't expire by time
Previously, a set of calculated quiz statistics would only 'last' for
15 minutes. Then they would be considered invalid and not used.

Now, computed statistics are kept indefinitely. Instead, when a new
batch of values are computed for a particular set of settings, older numbers
for the same settings are deleted first. Therefore,
question_stats_cleanup_task is no more.
2023-05-15 10:01:27 +01:00
Tim Hunt
174e2ae3b5 MDL-75576 quiz statistics: don't compute when a user views the qbank
Previously, when a user viewed the question bank, if the quiz statistics
had not already been calculated, we would try to compute them there an then.
This could be very, very slow, leading to session lock problems.

Now, we never try to compute the statistics on the fly. Instead, we rely
on the existing \quiz_statistics\task\recalculate scheduled task to do it.
2023-05-15 09:59:34 +01:00
Tim Hunt
056db339d6 MDL-75576 question bank: bulk-load statistics for all questions at once
There is a new method on the column class, for the column to declare any
statistics it requires. The question then efficiently loads all those
statistics in one go, and makes them available as the columns are
rendererd, or do any subsequent processing.
2023-05-15 09:59:34 +01:00
Tim Hunt
a919335213 MDL-75576 qbank_statistics: remove copy-pasted PHPdoc comments
These methods are already correctly documented on the base class.
2023-05-15 09:59:33 +01:00
Jun Pataleta
df496e57d6 MDL-78125 qtype_multianswer: Convert popover trigger to link
According to Boostrap Popovers documentation for popovers triggered
on focus:
"For proper cross-browser and cross-platform behavior, you must use the
<a> tag, not the <button> tag, and you also must include a tabindex
attribute."
2023-05-12 22:46:45 +08:00
Jun Pataleta
8cfaae5e84 Merge branch 'MDL-78011' of https://github.com/paulholden/moodle 2023-05-03 09:58:22 +08:00
Ilya Tregubov
a7c42e69f4 Merge branch 'MDL-78025' of https://github.com/timhunt/moodle 2023-05-02 11:42:45 +08:00
Jun Pataleta
70dd7244fd Merge branch 'MDL-77997' of https://github.com/timhunt/moodle 2023-04-27 10:40:59 +08:00
Tim Hunt
25596a50e5 MDL-78025 questions: questions_in_use should check question_references
This avoids the needs for plugins to do separate queries, which is
easier for them, and better performing.
2023-04-26 15:29:38 +01:00
Tim Hunt
9775be13e9 MDL-78025 question generator: make the behaviour less surprising
* The object returned by update_question is alwasy a new clone
  and the $question passed in will not be modified.

* The returned object has the fields like questionbankentryid and
  the ones related to versionning, so it is more like the data
  returned by question_bank::load_question_data.
2023-04-26 10:49:35 +01:00
Tim Hunt
37e8115d68 MDL-78025 question: move hiding logic into question_delete_question
This logic belongs in the API, so it is applied consistently.

Also this avoids calling the expensive function questions_in_use
twice per question.
2023-04-26 10:49:32 +01:00
Paul Holden
3e581cbd99
Merge branch 'MDL-77766-master-2' of https://github.com/junpataleta/moodle 2023-04-25 09:38:35 +01:00
Paul Holden
d97e0fa4ec
MDL-78011 qbank_managecategories: require library for pagesize const. 2023-04-24 15:34:23 +01:00
Jun Pataleta
35e69b6ae8 MDL-77766 qtype_truefalse: Respect showstandardinstruction
* When showstandardinstruction is set to no, replace the standard
instruction with the generic "Answer" text for the answer options
fieldset's legend.
2023-04-24 20:07:57 +08:00
Jun Pataleta
75984fb226 MDL-77766 qtype_multichoice: Respect showstandardinstruction
* When showstandardinstruction is set to no, replace the standard
instruction with the generic "Answer" text for the answer options
fieldset's legend.
2023-04-24 20:07:38 +08:00
Tim Hunt
b181e78c7c MDL-77997 questions: add back Export as XML to the preview screen
The used the exist in Moodle up to 3.11, but then was removed with
insufficient thought in 4.0 (because we had grander long-term plans
which still have not happened). Until those plans happen, this
commit adds the simple link back on the preview screen.
2023-04-24 11:22:58 +01:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Jun Pataleta
8dd488cb5b Merge branch 'MDL-77989-master' of https://github.com/andrewnicols/moodle 2023-04-21 13:44:51 +08:00
Andrew Nicols
fcba0cb379 MDL-77989 core: Fix uses of legacy external API 2023-04-21 13:33:56 +08:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Paul Holden
6a5a787844
Merge branch 'MDL-77878-master-enfix' of https://github.com/vmdef/moodle 2023-04-17 19:12:36 +01:00
Víctor Déniz
b576b068bd MDL-77878 lang: Use fixed strings in tests 2023-04-17 08:49:59 +01:00
Helen Foster
ee8408c4d5 MDL-77878 lang: Import fixed English strings (en_fix) 2023-04-14 13:08:38 +01:00
Sara Arjona
d2e27ec8bb Merge branch 'MDL-77913' of https://github.com/paulholden/moodle 2023-04-14 14:02:08 +02:00
Paul Holden
dcdeb47f39
MDL-77913 qbank_previewquestion: deterministic ordering of versions.
Ensure the ordering of loaded question versions is consistent, avoids
random Oracle failures.
2023-04-13 21:13:41 +01:00
Sara Arjona
9ce4fb65fd Merge branch 'MDL-77164-master' of https://github.com/marinaglancy/moodle 2023-04-13 14:00:18 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Marina Glancy
04f8fdd021 MDL-77164 various: fix javascript AMD module name 2023-04-13 09:43:15 +01:00
Sara Arjona
948e68e9be Merge branch 'MDL-77856-master' of https://github.com/junpataleta/moodle 2023-04-13 09:42:58 +02:00
Sara Arjona
dbabe07db8 Merge branch 'MDL-77148' of https://github.com/AnupamaSarjoshi/moodle 2023-04-11 10:17:03 +02:00
Anupama Sarjoshi
e6a3295fba MDL-77148 core: Fix to export params for templates in correct format
When questions are filtered by tags in the question bank, the qtagids
params are passed in the array format. Though moodle_url handles this,
single_button::export_for_template cannot. Hence changes done in
weblib.php to provide params for export_for_template in the
suitable format.
Thanks Huong. I have added the Behat test you provided in the patch.
2023-04-06 13:22:01 +01:00
Jun Pataleta
e3c0c2f2c2 MDL-77856 qtype_multianswer: Use Bootstrap Popover for subq feedback
The YUI Overlay widget encloses the subquestion feedback in a div
which causes a div element to be enclosed in the subquestion span. This
leads to an accessibility issue in terms of HTML parsing as inline
elements (span) should not contain block elements (div)
The YUI Overlay widget is also not accessible as it does not really hide
the overlay contents via aria-hidden when the overlay is not being
shown. It's better if we stop using this and use Bootstrap's
popover component which is more accessible by default.

This patch also removes module.js for the qtype_multianswer plugin as
it only contains codes related to rendering the feedback contents in the
YUI overlay widget which is no longer necessary.
2023-04-06 05:33:46 +08:00
Mark Johnson
23630ece3d MDL-75301 question: Add "always latest" option to previews 2023-04-05 10:23:47 +01:00
Mark Johnson
bddfd39804 MDL-75301 question: Add behat generator for updating questions
This adds "core_question > updated question" as an entity for `the
following "X" exist` and calls the existing update_question() generator
which will create a new question version with the supplied data.
2023-04-03 12:31:15 +01:00