4736 Commits

Author SHA1 Message Date
Andrew Nicols
6c1cabaa3c
Merge branch 'MDL-76996' of https://github.com/timhunt/moodle 2023-07-13 16:49:59 +02:00
Tim Hunt
931a4cbd56 MDL-76996 question bank: fix errors when qbank_statistics is disabled 2023-07-12 11:46:38 +01:00
Ilya Tregubov
8219595f7e
Merge branch 'MDL-72493-master' of https://github.com/mihailges/moodle 2023-07-12 10:05:54 +08:00
Darren Cocco
0f5a9e7680 MDL-72493 mod_quiz: Use question cache when starting attempt.
Replaced custom loading of data and then question object
creation using internal question_bank functionality with
question_bank::load_question.

Removed the call $quizobj->load_questions as it is
redundant.
2023-07-11 13:47:50 +08:00
Andrew Nicols
14029657a7
MDL-76717 question: Coding style fixes 2023-07-09 21:59:13 +08:00
Andrew Nicols
05a8ac58db
Merge branch 'MDL-76717_master' of https://github.com/marxjohnson/moodle 2023-07-08 13:01:47 +08:00
Jun Pataleta
d3767cb9f6
Merge branch 'MDL-78488' of https://github.com/t-schroeder/moodle 2023-07-06 11:17:03 +08:00
Ilya Tregubov
39662f1e32
Merge branch 'MDL-78608' of https://github.com/timhunt/moodle 2023-07-06 09:56:37 +08:00
Andrew Nicols
cee81e21c1
Merge branch 'MDL-77599' of https://github.com/stronk7/moodle 2023-07-05 21:58:47 +08:00
Eloy Lafuente (stronk7)
d9f7fe9c3f
MDL-77599 coding-style: Replace forbidden @const tags by @var
@const is not a valid phpdoc tag and @var should be used to
document both classes properties and constants (no matter how
weird that may sound, heh).

Link to (draft right now) PHP-FIG:

https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#518-var

So, with this commit we are just replacing all uses by the correct
@var one. Note that the type is entirely optional, in fact I think
that there isn't much need of it for constants because it's obvious
for both humans and machines which the type is. But, as far as it's
also correct to specify it, we haven't modified that detail.

The only detail modified are the cases where the constant name was
specified in the phpdoc, that's not needed, hence, the names have
been removed from there when present (a couple of cases).
2023-07-03 15:58:16 +02:00
Mark Johnson
f3e3bac918 MDL-78174 core_question: Build tertiary navigation using qbank plugins 2023-07-03 11:29:04 +01:00
Tim Schroeder
b42ca2cbbd
MDL-78488 question bank: don't load statistics when they are disabled 2023-06-30 11:39:04 +02:00
Tim Hunt
3534b31745 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-28 17:16:48 +01:00
mkassaei
a410223c74 MDL-77679 Drag and drop question type weird behavior 2023-06-26 16:56:56 +01:00
Mark Johnson
327c11d6a0 MDL-76717 qbank_usage: Add support for usage by version 2023-06-23 11:28:29 +01:00
Mark Johnson
c714f2b082 MDL-76717 qbank_history: Show usage column 2023-06-22 16:40:36 +01:00
Mark Johnson
e6bf0b0f9b MDL-76717 qbank_usage: Fix usage count query for random questions 2023-06-22 16:40:36 +01:00
Andrew Nicols
944129a57f Merge branch 'MDL-78477' of https://github.com/AnupamaSarjoshi/moodle 2023-06-22 14:29:38 +02:00
Andrew Nicols
5f41e5fdc7 Merge branch 'MDL-77865_Master' of https://github.com/tuanngocnguyen/moodle 2023-06-22 14:29:38 +02:00
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
Jun Pataleta
8e71a1af8e Merge branch 'MDL-78369' of https://github.com/AnupamaSarjoshi/moodle 2023-06-19 23:17:01 +08:00
Nathan Nguyen
37838804d8 MDL-77865 qtype_ddwtos: fix incorrect inplace class 2023-06-15 14:59:10 +10:00
Andrew Nicols
4d15a4ee32
Merge branch 'MDL-69231-master' of https://github.com/lameze/moodle 2023-06-15 10:58:56 +08:00
Anupama Sarjoshi
fa12b179e8 MDL-78369 Multiple choice: Increase Choice and feedback boxes size 2023-06-12 11:46:23 +01: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