4697 Commits

Author SHA1 Message Date
Jun Pataleta
e6e6c7e7b3
MDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay 2023-08-31 21:07:07 +08:00
Andrew Nicols
558d836861
MDL-77381 qengine: Correct coverage for new test 2023-08-16 22:40:16 +08:00
Andrew Nicols
0d82ce2629
Merge branch 'MDL-77381-MOODLE_401_STABLE' of https://github.com/ScottVerbeek/moodle into MOODLE_401_STABLE 2023-08-16 22:40:12 +08:00
Jun Pataleta
770b11c3d9
Merge branch 'MDL-77378_401_v3' of https://github.com/TomoTsuyuki/moodle into MOODLE_401_STABLE 2023-08-10 18:44:14 +07:00
ScottVerbeek
59f7404d8b MDL-77381 question engine: don't query empty arrays 2023-08-08 09:04:00 +10:00
danghieu1407
1b4ee84aee MDL-78866 question: question_created trigger pre-saving extra fields 2023-08-01 15:59:57 +07:00
Tomo Tsuyuki
2ba3b8b27e MDL-77378 qtype_multianswer: Fix division by zero errors 2023-08-01 11:26:44 +10:00
Tim Hunt
0a6f40cb21
MDL-76757 delete questions: fix message generation logic
The order was getting scrambled.
2023-07-13 21:44:04 +02:00
Huong Nguyen
dcd80cff04
Merge branch 'MDL-76757-401' of https://github.com/danghieu1407/moodle into MOODLE_401_STABLE 2023-07-13 09:46:59 +07:00
Jake Dallimore
a6b769bddd
Merge branch 'MDL-77912_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-07-13 10:09:45 +08:00
Tim Hunt
c589ced794 MDL-76996 question bank: fix errors when qbank_statistics is disabled 2023-07-12 11:47:37 +01:00
Tim Hunt
0ece3bcfc1 MDL-77912 questions: make multi-choice stats calc robust to bad data 2023-07-11 16:57:45 +01:00
danghieu1407
cf0b6e06e2 MDL-76757 Question bank: Can not delete the question completely 2023-07-10 14:34:32 +07:00
Jun Pataleta
3601d38c01
Merge branch 'MDL-78488_401' of https://github.com/t-schroeder/moodle into MOODLE_401_STABLE 2023-07-06 11:17:57 +08:00
Ilya Tregubov
83748b3b19
Merge branch 'MDL-78608_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-07-06 09:57:21 +08:00
Tim Schroeder
be118c06b3
MDL-78488 question bank: don't load statistics when they are disabled 2023-06-30 11:47:04 +02:00
Tim Hunt
2a2dd08ff1 MDL-78608 question stats: avoid loading data for missing contexts
It turns out that there are plugins which don't (currently)
clean up their question attempts when a context is deleted.
Therefore, we need to make Moodle core robust to that.
2023-06-29 16:27:01 +01:00
mkassaei
fff6af7c20 MDL-77679 Drag and drop question type weird behavior 2023-06-26 17:07:51 +01:00
Andrew Nicols
3488b2ae01 Merge branch 'MDL-78477_401' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_401_STABLE 2023-06-22 14:37:43 +02:00
Andrew Nicols
2452db088e Merge branch 'MDL-77865_MOODLE_401_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_401_STABLE 2023-06-22 14:37:43 +02:00
Anupama Sarjoshi
e954482cb0 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-21 10:44:38 +01:00
Jun Pataleta
64f4f58cb8 Merge branch 'MDL-78369_401' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_401_STABLE 2023-06-19 23:16:46 +08:00
Nathan Nguyen
35f0386bd3 MDL-77865 qtype_ddwtos: fix incorrect inplace class 2023-06-15 15:03:54 +10:00
Andrew Nicols
196ed7530b
Merge branch 'MDL-69231-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-15 10:56:53 +08:00
Anupama Sarjoshi
6664e73599 MDL-78369 Multiple choice: Increase Choice and feedback boxes size 2023-06-12 12:02:21 +01:00
Andrew Nicols
2649d1a01e
Merge branch 'MDL-78008_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-06-08 12:10:42 +08:00
Simey Lameze
fc10598d63 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:42:35 +08:00
Andrew Nicols
036cb9a997
Merge branch 'MDL-78327_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-06-01 10:52:47 +08:00
Simey Lameze
b512186fce MDL-77547 behat: run recalculate task before checking values 2023-05-31 15:04:56 +02:00
Tim Hunt
ee3752e639 MDL-78327 question stats: store same timestamp for all question stats 2023-05-31 12:03:56 +01:00
Sara Arjona
e47c5527f6 Merge branch 'MDL-77547-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-05-31 12:51:34 +02:00
Angelia Dela Cruz
de6c14ee71 MDL-77547 Behat: Coverage to check for bad multichoice questions 2023-05-23 15:17:43 +08:00
Tim Hunt
0d0868ee97 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:02:22 +01:00
Anupama Sarjoshi
80fa181a26 MDL-78176 Question: Fix D&D onto image and D&D markers theme issue 2023-05-19 16:28:53 +01:00
Jun Pataleta
4818dae2fc Merge branch 'MDL-75576_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-05-16 09:59:01 +08:00
Tim Hunt
efe895f1bb 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:04:34 +01:00
Tim Hunt
86932a330b MDL-75576 quiz statistics: don't compute when a user views the qbank
Previously, when users 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 10:04:33 +01:00
Tim Hunt
db9a0e296a 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 10:04:33 +01:00
Tim Hunt
9ff59e99ff MDL-75576 qbank_statistics: remove copy-pasted PHPdoc comments
These methods are already correctly documented on the base class.
2023-05-15 10:04:32 +01:00
Jun Pataleta
e9f6b9c2d6 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:47:11 +08:00
Jun Pataleta
64c625e590 Merge branch 'MDL-78011-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-03 09:57:56 +08:00
Ilya Tregubov
d28386a29d Merge branch 'MDL-78025_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-05-02 11:43:30 +08:00
Jun Pataleta
6c890a6330 Merge branch 'MDL-77997_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-04-27 10:40:43 +08:00
Tim Hunt
4a9c0b1410 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:40:41 +01:00
Tim Hunt
d2d9d762ad 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 15:40:36 +01:00
Tim Hunt
a9fa52295a 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 15:38:57 +01:00
Paul Holden
b867e4db40
MDL-78011 qbank_managecategories: require library for pagesize const. 2023-04-24 15:35:54 +01:00
Jun Pataleta
952c8770b6 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:11:20 +08:00
Jun Pataleta
132ac7486d 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:11:20 +08:00
Tim Hunt
a9f629fbf9 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:23:47 +01:00