4665 Commits

Author SHA1 Message Date
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
Paul Holden
813800d218
Merge branch 'MDL-75017' of https://github.com/timhunt/moodle 2023-03-30 08:47:52 +01:00
Jun Pataleta
904567404b Merge branch 'MDL-77767-master' of https://github.com/jleyva/moodle 2023-03-29 11:17:10 +08:00
Juan Leyva
fe2f96762a MDL-77767 question: Fix PHP warning in ddimageortext 2023-03-28 11:39:17 +02:00
Tim Hunt
a5fc60a997 MDL-77729 qformat_missingword: fix form of help link 2023-03-25 15:38:38 +00:00
Tim Hunt
94a584bf38 MDL-75017 questions: give a clear error if the context type is invalid 2023-03-24 12:59:22 +00:00
Tim Hunt
2e1fde188e MDL-75017 questions: fix weird setup in qformat_xml_import_export_test 2023-03-24 12:56:14 +00:00
Jun Pataleta
67ad18ce07 Merge branch 'MDL-77626' of https://github.com/timhunt/moodle 2023-03-24 10:40:47 +08:00
Tim Hunt
8489808536 MDL-77673 ddimageortext: keep JS data just for the mobile app 2023-03-21 10:13:24 +01:00
Tim Hunt
d5086a0938 MDL-77626 quiz statistics: Divide by zero if a random Q has max mark 0 2023-03-14 16:29:12 +00:00
Andrew Nicols
8393a0f288 Merge branch 'MDL-76849-master-5' of https://github.com/junpataleta/moodle 2023-03-10 09:29:28 +08:00
Sara Arjona
9ddb0132f6 Merge branch 'MDL-77323-master' of https://github.com/NashTechOpenUniversity/moodle 2023-03-09 16:48:34 +01:00
Jun Pataleta
8441270181 Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle 2023-03-09 16:02:01 +08:00
Jun Pataleta
6ae65770b5 Merge branch 'MDL-77225' of https://github.com/timhunt/moodle 2023-03-09 10:43:15 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Jun Pataleta
5e51f083a1 MDL-76849 qtype_essay: Allow question number inclusion in answer fields
* Have the following classes extend qtype_essay_format_renderer_base
  as they have been meant to:
  - qtype_essay_format_editor_renderer
  - qtype_essay_format_noinline_renderer
  - qtype_essay_format_plain_renderer
* Add a question_display_options instance variable for
qtype_essay_format_renderer_base so its subclasses can use it to
generate the label for their respective answer fields.
2023-03-09 08:59:33 +08:00
Jun Pataleta
4e4e66cfe8 MDL-76849 qtype_shortanswer: Include question number in answer fields 2023-03-09 08:59:33 +08:00
Jun Pataleta
91205c8884 MDL-76849 qtype_numerical: Include question number in answer fields
* Also covers its qtype_calculated and qtype_calculatedsimple
which extend its renderer class
2023-03-09 08:59:33 +08:00
Jun Pataleta
7f7ce0d199 MDL-76849 qtype_multianswer: Include question number in answer fields
* Add the question number to the answer fields if it's available.
* Improve multiple choice question accessibility:
  - Label the multiple choice question groups appropriately by
    enclosing them in fieldset tags and applying sr-only legend tags to
    label them.
  - Apply Bootstrap form-check classes to the radio buttons, so they
    are rendered better and become responsive as well. This also helps
    avoid the use of the table element for layout purposes when
    rendering horizontal multiple choice sub-questions.
2023-03-09 08:59:33 +08:00
Jun Pataleta
28c6b39640 MDL-76849 qtype_match: Include question number in answer fields 2023-03-09 08:59:33 +08:00
Jun Pataleta
5739770d98 MDL-76849 qtype_truefalse: Include question number in answer fields
* Improve accessibility as well by grouping the radio buttons
in a fieldset.
2023-03-09 08:59:33 +08:00
Jun Pataleta
70ea4b9df1 MDL-76849 qtype_multichoice: Include question number in answer fields
* Improve accessibility as well by grouping the radio buttons/checkboxes
in a fieldset.
2023-03-09 08:59:33 +08:00
Jun Pataleta
5b4258d7a7 MDL-76849 qtype_ddwtos: Include question number in answer fields
* Plus include the item number so users will have an idea which blank
numbers they are currently on.
2023-03-09 08:59:33 +08:00
Jun Pataleta
fdc24f0470 MDL-76849 qtype_gapselect: Include question number in answer fields 2023-03-09 08:59:33 +08:00
Jun Pataleta
fb651434e0 MDL-76849 qtype: Add a questionidentifier instance variable
* Add an instance variable to question_display_options to store the
identifier associated with the question being rendered.
* This information can be used by question type plugins to improve the
accessibility of the answer fields being rendered by adding the
question identifier to the answer fields' labels.
* Adding the question identifier to the label can be achieved by using
question_display_options::add_question_identifier_to_label().

Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
2023-03-09 08:59:33 +08:00
Tim Hunt
1c86e18fde MDL-77225 questions: fix regrade of descriptions in finished attempts
The added logic is similar to the logic in other behaviours, and the new test fails without it.
2023-03-08 19:00:01 +00:00
Sara Arjona
7b6a00dec4 Merge branch 'MDL-77464' of https://github.com/timhunt/moodle 2023-03-08 16:14:40 +01:00
Andrew Nicols
974d7e4dab Merge branch 'MDL-52805-42' of https://github.com/Chocolate-lightning/moodle 2023-03-08 14:49:59 +08:00
Tim Hunt
1a3897d1ba MDL-77464 questions: regrading was losing question_attempt metadata
This is very similar to MDL-77090, but at the time, I missed that this
also needed to be handled. (Question metadata is, I think, only used
by the quiz 'Try another question like this one' feature.)
2023-03-07 13:40:10 +00:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Tim Hunt
72d2d24815 MDL-77464 questions: update comments in question_attempt_step
The class comment had some inaccuracies which I fixed.
I also replaced all uses of @link with @see.
2023-03-06 16:23:13 +00:00
Andrew Nicols
4ee86a5256 Merge branch 'MDL-77327' of https://github.com/timhunt/moodle 2023-03-03 12:02:44 +08:00
Jun Pataleta
916503658d Merge branch 'MDL-75012-master-5' of https://github.com/andrewnicols/moodle 2023-03-02 12:34:34 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Jake Dallimore
9abd366ab7 Merge branch 'MDL-76298' of https://github.com/timhunt/moodle 2023-03-02 10:12:43 +08:00
hieuvu
cd81f29f55 MDL-77323 question: Prevent drag item sent into two drop zone 2023-03-01 14:48:32 +07:00
Jake Dallimore
f7134f1083 Merge branch 'MDL-76897' of https://github.com/timhunt/moodle 2023-03-01 12:43:58 +08:00
Andrew Nicols
2b4c86e251 Merge branch 'MDL-77299-master' of https://github.com/meirzamoodle/moodle 2023-03-01 11:14:36 +08:00
Meirza
e4b24bdd79 MDL-77299 question: Added class properties that are not declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

Co-authored-by: Tim Hunt <t.j.Hunt@open.ac.uk>
2023-03-01 10:09:09 +07:00
Andrew Nicols
427659d202 Merge branch 'MDL-58945' of https://github.com/timhunt/moodle 2023-03-01 10:54:13 +08:00
Tim Hunt
0458c69d0d MDL-77327 qtype_ddmarker: remove use of unnecessary undeclared field
Also:
  * Fix some incorrect punctuation in two strings.
  * Add a test to verify that this change does not cause a regression.
  * Improve some PHPdoc comments.
2023-02-28 17:44:55 +00:00
Tim Hunt
4080962125 MDL-76897 quiz: quiz_update_all_attempt_sumgrades -> grade_calculator 2023-02-27 18:41:56 +00:00
Tim Hunt
4484757021 MDL-76843 quiz: fix statistics questions for missing questions 2023-02-22 14:30:23 +00:00
Tim Hunt
837d1cbf52 MDL-76843 questions behat: enhancements requried to test this issue
* New steps to set up certian sorts of broken test data.
* Fix qtype_essay_question::un_summarise_response().
2023-02-22 14:30:22 +00:00
Tim Hunt
b920f2b0d1 MDL-76298 drag-drop questions: validate the questions are complete
Previously, it was possible to create drag-drop markers and onto image
questions without any drag items or drop zones. This was non-sensical,
and broke statistics calculations.

So, missing validation added, and random guess score calculation made
robust.
2023-02-22 12:03:09 +00:00
Tim Hunt
3088bc6600 MDL-58945 qbank: showing q text should give option of plain or full 2023-02-22 11:15:02 +00:00
Andrew Nicols
6b05cf75a8 Merge branch 'MDL-76582-master' of https://github.com/NashTechOpenUniversity/moodle 2023-02-16 11:25:11 +08:00
Andrew Nicols
ea1f5eba27 Merge branch 'MDL-76904-master' of https://github.com/NashTechOpenUniversity/moodle 2023-02-09 12:04:21 +08:00
Andrew Nicols
c7a1f4c748 Merge branch 'MDL-77018' of https://github.com/timhunt/moodle 2023-02-09 10:50:58 +08:00