4900 Commits

Author SHA1 Message Date
Jun Pataleta
fa3395bb8b
Merge branch 'MDL-77328-master' of https://github.com/rezaies/moodle 2023-07-21 11:57:12 +08:00
Tim Hunt
3ea0bdfba6 MDL-76757 delete questions: fix message generation logic
The order was getting scrambled.
2023-07-13 17:10:13 +01:00
Huong Nguyen
256f83cc34
Merge branch 'MDL-76757-master' of https://github.com/danghieu1407/moodle 2023-07-13 16:51:04 +02:00
Andrew Nicols
3ed796bc10
Merge branch 'MDL-75125_master' of https://github.com/marxjohnson/moodle 2023-07-13 16:51:03 +02:00
Jake Dallimore
66e6111165
Merge branch 'MDL-77912' of https://github.com/timhunt/moodle 2023-07-13 16:49:59 +02:00
Andrew Nicols
6c1cabaa3c
Merge branch 'MDL-76996' of https://github.com/timhunt/moodle 2023-07-13 16:49:59 +02:00
Meirza
2eb879360c MDL-77328 qtype_multianswer: Refactor for PHP 8.2 compatibility
This commit addresses compatibility issues in the qtype_multianswer
question type. The following changes were made:

- The usage of the undeclared property $maxmark on subquestions in
  qtype_multianswer was identified as problematic. To resolve this,
  the existing declared property $defaultmark is now being used for
  the same purpose.

By switching to the declared property $defaultmark, compatibility with
PHP 8.2 is ensured and the issue with the undeclared property is
resolved.
2023-07-13 21:03:23 +10:00
Shamim Rezaie
9f00818d00 MDL-77328 qtype_calculated: Refactor for PHP 8.2 compatibility
This commit addresses compatibility issues in the qtype_calculated
question type. The following problems were identified and resolved:

- qtype_calculated was reusing the qtype_numerical_answer class and
  setting two additional properties ($correctanswerlength and
  $correctanswerformat) that were not declared. To resolve this, a new
  class, qtype_calculated_answer, was defined and utilised.
- During grading in qtype_numerical, there were references to an
  undeclared property ($unitisright) used to track calculation details.
  This issue was fixed using a 'replace temp with query' refactoring.

These changes ensure the qtype_calculated question type is compatible
with PHP 8.2 and addresses the identified issues.
2023-07-13 21:03:23 +10:00
Meirza
2b23c8cee2 MDL-77328 qtype_truefalse: Refactor for PHP 8.2 compatibility
This commit addresses the following issues and improvements in the
qtype_truefalse class:

- Added missing class properties:
 - public $truefeedbackformat
 - public $falsefeedbackformat
 - public $showstandardinstruction
- Updated qtype_truefalse_question to include type hinting for better
  IDE support.
2023-07-13 21:03:22 +10:00
Mark Johnson
ab8a4dd8cb MDL-77745 core_question: Show question version in info box 2023-07-13 11:11:43 +01: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
Tim Hunt
744e6f836e MDL-77912 questions: make multi-choice stats calc robust to bad data 2023-07-11 16:57:11 +01: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
danghieu1407
ab4cb28883 MDL-76757 Question bank: Can not delete the question completely 2023-07-10 14:30:01 +07: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
Mark Johnson
0fd25d1edd MDL-75125 core_question: Deprecate old action column classes
Final removal in Moodle 4.7 MDL-78090
2023-06-02 11:42:02 +01:00
Mark Johnson
359bb7e31a MDL-75125 qbank: Convert qbank plugins to new actions API 2023-06-02 11:15:40 +01:00
Safat Shahin
be1bc85028 MDL-75125 core_question: Add action as a feature
This commit will implement question bank actions as a feature.
Previously, it used to implement columns and actions together in one
feature.
With this change it will have actions a different feature which will
allow
developers to implement actions in an easier way.

The existing "action column" API will be deprecated in a separate
commit.

Co-authored-by: Mark Johnson <mark.johnson@catalyst-eu.net>
2023-06-02 11:14:23 +01: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