4648 Commits

Author SHA1 Message Date
Paul Holden
b867e4db40
MDL-78011 qbank_managecategories: require library for pagesize const. 2023-04-24 15:35:54 +01:00
Paul Holden
242ecbf7f3
Merge branch 'MDL-77878-401-enfix' of https://github.com/vmdef/moodle into MOODLE_401_STABLE 2023-04-17 19:12:36 +01:00
Víctor Déniz
1265b0ad84 MDL-77878 lang: Use fixed strings in tests 2023-04-17 09:26:52 +01:00
Helen Foster
2db1ddd290 MDL-77878 lang: Import fixed English strings (en_fix) 2023-04-16 20:54:48 +01:00
Sara Arjona
96f0478ec1 Merge branch 'MDL-77913-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-04-14 14:02:18 +02:00
Paul Holden
39cf556111
MDL-77913 qbank_previewquestion: deterministic ordering of versions.
Ensure the ordering of loaded question versions is consistent, avoids
random Oracle failures.
2023-04-13 21:45:28 +01:00
Sara Arjona
69749509ab Merge branch 'MDL-77856-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-04-13 09:43:05 +02:00
Anupama Sarjoshi
8b31922739 MDL-77148 core: Fix to export params for templates in correct format
When questions are filtered by tags in the question bank, the qtagids
params are passed in the array format. Though moodle_url handles this,
single_button::export_for_template cannot. Hence changes done in
weblib.php to provide params for export_for_template in the
suitable format.
Thanks Huong. I have added the Behat test you provided in the patch.
2023-04-06 14:38:29 +01:00
Jun Pataleta
85a7c17414 MDL-77856 qtype_multianswer: Use Bootstrap Popover for subq feedback
The YUI Overlay widget encloses the subquestion feedback in a div
which causes a div element to be enclosed in the subquestion span. This
leads to an accessibility issue in terms of HTML parsing as inline
elements (span) should not contain block elements (div)
The YUI Overlay widget is also not accessible as it does not really hide
the overlay contents via aria-hidden when the overlay is not being
shown. It's better if we stop using this and use Bootstrap's
popover component which is more accessible by default.

This patch also removes module.js for the qtype_multianswer plugin as
it only contains codes related to rendering the feedback contents in the
YUI overlay widget which is no longer necessary.
2023-04-06 05:35:11 +08:00
Mark Johnson
6417d795b9 MDL-75301 question: Add "always latest" option to previews 2023-04-05 12:49:58 +02:00
Mark Johnson
c55473ad2e 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-05 12:49:51 +02:00
Paul Holden
5d10e53ba1
Merge branch 'MDL-75017_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-03-30 08:47:54 +01:00
Tim Hunt
c1c1ca6e4d MDL-77729 qformat_missingword: fix form of help link 2023-03-25 15:39:27 +00:00
Tim Hunt
fd9b8bf4d0 MDL-75017 questions: give a clear error if the context type is invalid 2023-03-24 13:00:09 +00:00
Tim Hunt
e405e6fd6a MDL-75017 questions: fix weird setup in qformat_xml_import_export_test 2023-03-24 13:00:07 +00:00
Tim Hunt
4bc3782c4c MDL-77626 quiz statistics: Divide by zero if a random Q has max mark 0 2023-03-14 16:34:30 +00:00
Andrew Nicols
23e2b0358c Merge branch 'MDL-76849-401-5' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-03-10 09:29:40 +08:00
Sara Arjona
69a91b30cc Merge branch 'MDL-77323-401' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_401_STABLE 2023-03-09 16:48:39 +01:00
Jun Pataleta
bb61d8392b Merge branch 'MDL-77559-401-2' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-03-09 15:57:44 +08:00
Jun Pataleta
ed6b43b4f2 Merge branch 'MDL-77225_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-03-09 10:43:06 +08:00
Andrew Nicols
cd48ae56c7 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Jun Pataleta
d5cf25faf5 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:57:47 +08:00
Jun Pataleta
787278601c MDL-76849 qtype_shortanswer: Include question number in answer fields 2023-03-09 08:57:47 +08:00
Jun Pataleta
880532c71a 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:57:47 +08:00
Jun Pataleta
03b549f225 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:57:47 +08:00
Jun Pataleta
7b6ff446f4 MDL-76849 qtype_match: Include question number in answer fields 2023-03-09 08:57:47 +08:00
Jun Pataleta
9ddbc2d7f0 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:57:47 +08:00
Jun Pataleta
fbffd9b148 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:57:47 +08:00
Jun Pataleta
2ad0871a82 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:57:47 +08:00
Jun Pataleta
5847b0026e MDL-76849 qtype_gapselect: Include question number in answer fields 2023-03-09 08:57:47 +08:00
Jun Pataleta
6c3f1d55a8 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:57:47 +08:00
Tim Hunt
7db1da61ee 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:43 +00:00
Tim Hunt
bdcf29ab29 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:45:04 +00:00
Tim Hunt
795e8ac70a 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-07 13:44:59 +00:00
Jun Pataleta
a377bf30c4 Merge branch 'MDL-75012-401-5' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-03-02 12:31:09 +08:00
Andrew Nicols
288620b0b4 MDL-75012 js: Full build of all grunt things 2023-03-02 12:15:25 +08:00
Jake Dallimore
b4944cadca Merge branch 'MDL-76298_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-03-02 10:13:04 +08:00
hieuvu
d07d010288 MDL-77323 question: Prevent drag item sent into two drop zone 2023-03-01 14:47:41 +07:00
Andrew Nicols
576afc3ba6 Merge branch 'MDL-58945_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-03-01 10:55:38 +08:00
Tim Hunt
291d241981 MDL-76843 quiz: fix statistics questions for missing questions 2023-02-22 15:07:40 +00:00
Tim Hunt
d6f0ad4980 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 15:05:41 +00:00
Tim Hunt
40d6ba9505 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:06:34 +00:00
Tim Hunt
32bf205db3 MDL-58945 qbank: showing q text should give option of plain or full 2023-02-22 11:17:52 +00:00
Andrew Nicols
0dc15ee619 Merge branch 'MDL-76904-401' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_401_STABLE 2023-02-09 12:04:33 +08:00
Andrew Nicols
58814af9f1 Merge branch 'MDL-77018_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-02-09 10:51:48 +08:00
Tim Hunt
f93fa35ecf MDL-77090 questions: regrade of interactive attempts lose tries count
The behaviour-specific data was getting corrupted when the regrade
recreated the first step, because $oldstep->get_behaviour_data() was
stripping off the leading '-' characters from the names, and they were
not being added back.
2023-02-03 10:52:45 +00:00
hieuvu
06c3d068a6 MDL-76904 question: Keep question highlight in url 2023-01-31 16:32:36 +07:00
Tim Hunt
db861ee6d3 MDL-77018 qbank_statistics: only load stats for contexts that exist
Also, pre-load the contexts for efficiency.
2023-01-27 20:51:51 +00:00
Andrew Nicols
0a4f551fff Merge branch 'MDL-75978-401' of https://github.com/JBThong/moodle into MOODLE_401_STABLE 2023-01-27 12:34:04 +08:00
Andrew Nicols
2250ab07e6 MDL-76362 qtype_numerical: Fix bug in phpdoc 2023-01-23 09:16:07 +08:00