4792 Commits

Author SHA1 Message Date
Jun Pataleta
8edafd35d8
MDL-78549 multianswer: Prevent default when clicking feedback trigger 2023-09-08 22:14:35 +08:00
Huong Nguyen
0a9eaa50e4
Merge branch 'MDL-78549-master' of https://github.com/junpataleta/moodle 2023-09-08 22:14:35 +08:00
Jun Pataleta
f566bf4601
Merge branch 'MDL-78874-master' of https://github.com/danghieu1407/moodle 2023-09-05 12:05:59 +08:00
Jun Pataleta
b5b63270c5
MDL-78549 qtype_multianswer: Configure feedback popover trigger via JS
* For some reason, the `data-trigger="hover focus"` does not work when
rendering the popover via HTML. It just defaults to click, so the
feedback popover for qtype_multianswer questions does not show on hover.
Configuring the feedback popover's trigger via JS seems to work.
2023-09-05 09:34:33 +08:00
Mark Johnson
4f07ff98f4
MDL-72321 question bank: Only update edit switch URL if present 2023-09-01 23:43:20 +08:00
Andrew Nicols
47cc73fe1a
MDL-72321 question: Ensure that all instance props are defined
Since PHP 8.2, all properties on a class must be defined as the PHP
Dynamic Property feature has been deprecated.

This commit goes one step further and switches this class to using
constructor property promotion. This language feature has been available
since PHP 8.0 and allows for simplified creation of class properties
which are initially defined in the constructor.
2023-09-01 09:52:33 +08:00
Andrew Nicols
1ce54ee87e
Merge branch 'MDL-72321_master-squashed' of https://github.com/marxjohnson/moodle 2023-08-31 23:02:35 +08:00
Nathan Nguyen
d9a75f5315 MDL-72321 core: backup/restore filter condition 2023-08-31 15:00:39 +01:00
Nathan Nguyen
e3bd166b3d MDL-72321 mod_quiz: Use new datafilters for random questions 2023-08-31 15:00:39 +01:00
Mark Johnson
823af3a8f1 MDL-72321 core_question: Replace old conditions with new datafilters 2023-08-31 15:00:39 +01:00
Mark Johnson
d2f68abc89 MDL-72321 qbank_usage: Only load javascript if plugin is enabled 2023-08-31 15:00:38 +01:00
Nathan Nguyen
43866217da MDL-72321 qbank_comment: Only initialise javascript if plugin is enabled 2023-08-31 15:00:38 +01:00
Mark Johnson
6f2e91a169 MDL-72321 qbank_bulkmove: Rewrite unit test
This reduces code duplication and removes the dependency on
\core_question\local\bank\view from the test.
2023-08-31 15:00:38 +01:00
Jun Pataleta
37aaae3b13
Merge branch 'MDL-79107-master' of https://github.com/junpataleta/moodle 2023-08-31 21:09:56 +08:00
Jun Pataleta
5df9996f60
MDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay 2023-08-31 20:46:11 +08:00
Jun Pataleta
be35034f1c
Merge branch 'MDL-76974' of https://github.com/paulholden/moodle 2023-08-28 17:03:27 +08:00
danghieu1407
436a403aef MDL-78874 accessibility: Improve descriptive text for check button 2023-08-24 20:45:56 +07:00
Paul Holden
b30245b3e2
MDL-76974 javascript: convert remaining uses of old preferences API.
Implement component preference definition callbacks, update JS code
to use the `core_user/repository` module instead of the now deprecated
API.
2023-08-22 14:43:34 +01:00
Stefan Topfstedt
7b04638c52 MDL-71212 core_course: adds controls to the course index drawer. 2023-08-18 11:00:55 -07:00
Andrew Nicols
ad923a4d96
MDL-77381 qengine: Correct coverage for new test 2023-08-17 09:12:36 +02:00
Andrew Nicols
c622af3dba
Merge branch 'MDL-77381-master' of https://github.com/ScottVerbeek/moodle 2023-08-17 09:12:36 +02:00
Ilya Tregubov
04cdf6889d
Merge branch 'MDL-78939' of https://github.com/paulholden/moodle 2023-08-10 18:31:51 +07:00
Jun Pataleta
ec200c0e6c
Merge branch 'MDL-77378_master_v3' of https://github.com/TomoTsuyuki/moodle 2023-08-10 18:31:50 +07:00
ScottVerbeek
a3b02e0c6a MDL-77381 question engine: don't query empty arrays 2023-08-10 08:09:16 +10:00
Ilya Tregubov
58664d0b26
Merge branch 'master_MDL-78860' of https://github.com/mattporritt/moodle 2023-08-09 09:42:37 +08:00
Paul Holden
69caa83345
MDL-78939 qformat_xml: fix reference to calculated question files. 2023-08-08 08:08:33 +01:00
Matt Porritt
d84389391c MDL-78860 qtype_calculatedmulti: PHP 8.2 compatibility
PHP 8.2 has deprecated setting properties on objects dynamically.
The qtype_calculatedmulti question type had two properties being
set this way($correctanswerlength and$correctanswerformat).
This patch extends the question_answer class to add the properties
when the object is instantiated.
2023-08-04 15:44:13 +10:00
Ilya Tregubov
05655afa6b
Merge branch 'MDL-78866-master' of https://github.com/danghieu1407/moodle 2023-08-03 09:38:32 +08:00
Huong Nguyen
ddae9c4ae1
Merge branch 'MDL-78815_master' of https://github.com/marxjohnson/moodle 2023-08-02 14:58:23 +07:00
Mark Johnson
1055a2c1c2 MDL-78815 qbank_comment: Delete comments in event observer 2023-08-02 08:34:59 +01:00
Mark Johnson
a2c8eed5c8 MDL-78815 qbank_customfields: Delete custom field data in event observer 2023-08-02 08:34:59 +01:00
Mark Johnson
36ab582177 MDL-78815 qbank_tagquestion: Delete tags in event observer 2023-08-02 08:34:59 +01:00
Mark Johnson
b7b932a3c1 MDL-78823 core: Add new events when enabling and disabling qbank plugins 2023-08-02 08:34:32 +01:00
danghieu1407
a5af041c40 MDL-78866 question: question_created trigger pre-saving extra fields 2023-08-01 16:01:31 +07:00
Tomo Tsuyuki
eacffa413e MDL-77378 qtype_multianswer: Fix division by zero errors 2023-08-01 11:24:32 +10:00
Andrew Nicols
de919962ea
Merge branch 'MDL-77328-master-fix' of https://github.com/junpataleta/moodle 2023-07-21 11:58:36 +08:00
Andrew Nicols
094f5dbb5b
Merge branch 'MDL-77745_master' of https://github.com/marxjohnson/moodle 2023-07-21 11:58:34 +08:00
Jun Pataleta
26905eeb93
MDL-77328 question: Declare $qbank as a proper view_component property 2023-07-21 11:57:14 +08:00
Jun Pataleta
73259066c4
MDL-77328 qformat_xml: Avoid dynamic declaration for question_answer
Declare qformat_xml::answerfiles and qformat_xml::feedbackfiles instead
of dynamically declaring answerfiles and feedbackfiles for the
question_answer instance when exporting questions and answers to XML
format.
2023-07-21 11:57:14 +08:00
Jun Pataleta
185c14ad1a
MDL-77328 qtype_caclulatedmulti: Use qtype_calculated_answer
The question answers for question type plugins extending
\qtype_calculated now have the type
\qtype_calculated\qtype_calculated_answer. So the answers for test
helper functions make_calculatedmulti_question_singleresponse() and
make_calculatedmulti_question_multiresponse() should also be changed
accordingly.
2023-07-21 11:57:13 +08:00
Jun Pataleta
9119d4513f
MDL-77328 qtype_caclulatedsimple: Use qtype_calculated_answer
The question answers for question type plugins extending
\qtype_calculated now have the type
\qtype_calculated\qtype_calculated_answer. So the answers for
make_calculatedsimple_question_sum() should be changed accordingly.
2023-07-21 11:57:13 +08:00
Jun Pataleta
6ec75e40e0
MDL-77328 qtype_calculated: Add upgrade.txt notes
* Question type plugins that extend qtype_calculated should be made
aware of the changes about the new question_answer type
\qtype_calculated\qtype_calculated_answer.
2023-07-21 11:57:13 +08:00
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