1159 Commits

Author SHA1 Message Date
Angelia Dela Cruz
73a08e3ccd MDL-78498 Behat: Use data generators for forum posts and replies
This commit does few things:
* Replace manual forum posts and replies to use data generator.
* It also changes the code to handle social forums.
* Other behat clean-ups and optimization.

Co-authored-by: Simey Lameze <simey@moodle.com>
2023-08-01 16:08:10 +08:00
Ilya Tregubov
8cf9b77cdb
Merge branch 'MDL-73213_401' of https://github.com/pedrojordao/moodle into MOODLE_401_STABLE 2023-07-13 09:18:31 +08:00
Pedro Jordao
2ace3d54dc MDL-73213 autocomplete: keep selected value when the state changes.
The selected value of the dropdown was being cleared when the dropdown
was opened, this was causing an error when submitting the form if the
field was required. The main cause was that we were emptying the
select before loading new values, this solution was created because
of an issue where we could not deselect values if the list was
reloaded. To fix this problem, I added an empty option as the first
element of the select only when deselecting a certain item.
2023-07-06 15:33:47 -03:00
Jun Pataleta
461c0bd947
Merge branch 'MDL-78484-401' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_401_STABLE 2023-07-06 09:41:24 +08:00
hieuvu
14079fa738 MDL-78484 formslib: Move enable checkbox display before the date picker 2023-06-22 11:08:47 +07:00
Jake Dallimore
331f47a4f3
MDL-78544 forms: fix string to number comparison bug in duration element
Prior to PHP 8, 0 == "", but now no more. We should use empty instead.
See: https://www.php.net/manual/en/migration80.incompatible.php
2023-06-22 11:01:17 +08:00
Andrew Nicols
46f3dc6538
Merge branch 'MDL-78478-401' of https://github.com/dasistwas/moodle into MOODLE_401_STABLE 2023-06-15 09:56:18 +08:00
David Bogner
c461b4d8fc MDL-78478 forms: Fix repeated elements in dynamic forms 2023-06-14 15:30:32 +02:00
Angelia Dela Cruz
948ac8f62b MDL-70152 behat: Forum behat generators use UI
Behat cleanup and optimisation
2023-05-29 10:28:04 +08:00
Angelia Dela Cruz
d7752f9576 MDL-70152 behat: Forum behat generators use UI
Replace steps that manually add forum and forum post instances
via the UI and use Behat generators. This improves the speed of
Behat test runs.
2023-05-29 10:27:33 +08:00
Jun Pataleta
436ed2c4cb MDL-77761 core_form: Add label for editor format selector 2023-03-29 08:09:54 +08:00
Andrew Nicols
cd48ae56c7 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08: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
Paul Holden
1eed4bca84 MDL-77368 forms: remove console logging of upload DOM element. 2023-03-02 11:19:48 +08:00
Andrew Nicols
8c16eb18f6 Merge branch 'MDL-76478-password-unmask-MOODLE_401_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_401_STABLE 2023-02-15 23:25:35 +08:00
Ilya Tregubov
946504b58d Merge branch 'MDL-75230-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-02-15 16:12:50 +08:00
Angelia Dela Cruz
3b4246cd89 MDL-75230 behat: Lesson Behat tests optimised
Replace steps that manually add Lesson instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-02-08 15:49:42 +08:00
Andrew Nicols
61f1700fbf Merge branch 'mdl-76729_401' of https://github.com/james-cnz/moodle into MOODLE_401_STABLE 2023-02-07 12:37:16 +08:00
Marina Glancy
2dd7290ccb MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:16:06 +08:00
Jun Pataleta
8280476728 MDL-76803 lang: Update usages of reworded email display options 2023-01-10 16:01:44 +08:00
james-cnz
bc574f252d MDL-76729 filepicker: Restore file picker thumbnails in tree view 2023-01-10 12:01:27 +13:00
Paul Holden
0d20d1e8aa MDL-76667 forms: mark modal form as submitted upon success.
Ensure the form change checker module doesn't warn user about it.
2022-12-13 14:48:10 +00:00
Brendan Heywood
11721f7ff5 MDL-76478 formslib: Fix autocomplete bug of existing passwords 2022-12-06 12:34:25 +11:00
Marina Glancy
a5f92c041e MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:32 +01:00
Andrew Nicols
7e6d32d7c2 Merge branch 'MDL-76112-master' of https://github.com/marinaglancy/moodle 2022-11-16 10:07:49 +08:00
Sara Arjona
91e66dbaed Merge branch 'MDL-76039' of https://github.com/paulholden/moodle 2022-11-15 17:57:07 +01:00
Víctor Déniz
32fd6e60a4 Merge branch 'MDL-76229-master' of https://github.com/meirzamoodle/moodle 2022-11-14 22:56:13 +00:00
Paul Holden
7012900d08 MDL-76039 forms: account for null values in serialize util method.
Co-authored-by: Marina Glancy <marina@moodle.com>
2022-11-14 14:20:52 +00:00
Meirza
82d491cafa MDL-76229 core_form: Show frozen text editor in a more accessible way. 2022-11-12 18:27:09 +07:00
Sara Arjona
d1a0ee011f Merge branch 'MDL-76059' of https://github.com/paulholden/moodle 2022-11-09 12:31:31 +01:00
Marina Glancy
a34b4ebdc3 MDL-76112 various: can not pss null as 3rd param to preg_split
This produces notices in PHP 8.1
2022-10-28 10:51:20 +02:00
Thong Bui
5151cd6bd0 MDL-75784 Forms: Fix issues multi expand all/collapse buttons on a page 2022-10-26 14:06:54 +07:00
Paul Holden
3be5954500 MDL-76059 forms: graceful early exit for invalid button elements.
Ensure login form tries to capture guest button only if it exists.
2022-10-21 19:36:24 +01:00
Huong Nguyen
0795b579fa MDL-74814 forms: Fix accessibility issue in edit profile page
- Fixed legend tag issue
 - Modified the passwordunmask Javascript hide/unhide the password field by CSS class
2022-10-17 09:31:53 +07:00
Sara Arjona
fd14173a88 Merge branch 'MDL-75656' of https://github.com/paulholden/moodle 2022-10-10 16:16:20 +02:00
Jun Pataleta
6efeecd126 Merge branch 'MDL-75910-master' of https://github.com/andrewnicols/moodle 2022-10-10 11:07:27 +08:00
Andrew Nicols
1e71671205 Merge branch 'MDL-61395' of https://github.com/paulholden/moodle 2022-10-09 13:13:03 +08:00
Simey Lameze
f1be9b6544 MDL-75910 core_form: Allow editor field to set a hidden label
When an editor is used in a form as part of a group, it is missing its
label element.

This happens because there is no inline template for the editor, and
therefore it reverts to using the old `toHtml` function. The legacy
function does not cater to the editor being in a group, and therefore
does not add the hidden label.

In addition, the hiddenLabel attribute was missing from the editor
element. This is a semi-standard element but must be added to each
supporting element.

Both the missing inline template for the editor, and the hidden label
attribute must be present:
- If the hidden label attribute is not present, then the standard inline
  template will add a visible label within the group.
- If the inline editor template is missing, then the label is not shown
  at all.
2022-10-06 22:53:47 +08:00
Andrew Nicols
39241f20e0 MDL-71686 core_form: Include missing build 2022-10-06 14:43:55 +08:00
Andrew Nicols
f075272e69 MDL-71686 core_form: Move form serializer to shared function 2022-10-06 10:21:01 +08:00
Andrew Nicols
2423c26749 Merge branch 'MDL-71686-master' of https://github.com/marinaglancy/moodle 2022-10-06 10:20:56 +08:00
Paul Holden
a366cb4d5c MDL-61395 forms: style frozen tag element values. 2022-09-26 11:15:20 +01:00
Paul Holden
d2924e641b MDL-75656 tag: decode entities in tags element values. 2022-09-26 10:56:28 +01:00
David Woloszyn
2efc12e104 MDL-75459 Collapsable Form Sections: Default state bug fix
In circumstances where all collapsible form sections were expanded on
page load, a check is now made to ensure the expand all/collapse all
button behaves as intended.
2022-09-20 14:44:53 +10:00
Marina Glancy
653433a289 MDL-71686 forms: allow arrays in dynamic forms args 2022-09-14 17:58:02 +02:00
David Mudrák
aa49eb24fb MDL-75553 lang: Fix Behat regressions in scenario files 2022-09-06 21:47:18 +02:00
Jun Pataleta
ba5550ac3b Merge branch 'MDL-75111' of https://github.com/stronk7/moodle 2022-08-31 23:06:05 +08:00
Sara Arjona
471d4a10a8 Merge branch 'MDL-74969-master' of https://github.com/marinaglancy/moodle 2022-08-31 12:29:11 +02:00
Eloy Lafuente (stronk7)
83b490a594 MDL-75111 phpunit: Move tests to use correct names and ns (take#4)
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- The following task tests have been moved within the level2 directory:
  - \core\adhoc_task_test => \core\task\adhoc_task_test
  - \core\scheduled_task_test => \core\task\scheduled_task_test
  - \core\calendar_cron_task_test => \core\task\calendar_cron_task_test
  - \core\h5p_get_content_types_task_test => \core\task\h5p_get_content_types_task_test
  - \core\task_database_logger_test => \core\task\database_logger_test
  - \core\task_logging_test => \core\task\logging_test

- The following event tests have been moved within level2 directory:
  - \core\event_context_locked_test => \core\event\context_locked_test
  - \core\event_deprecated_test => \core\event\deprecated_test
  - \core\event_grade_deleted_test => \core\event\grade_deleted_test
  - \core\event_profile_field_test => \core\event\profile_field_test
  - \core\event_unknown_logged_test => \core\event\unknown_logged_test
  - \core\event_user_graded_test => \core\event\user_graded_test
  - \core\event_user_password_updated_test => \core\event\user_password_updated_test

- The following output tests have been moved within level2 directory:
  - \core\mustache_template_finder_test => \core\output\mustache_template_finder_test
  - \core\mustache_template_source_loader_test => \core\output\mustache_template_source_loader_test
  - \core\output_mustache_helper_collection_test => \core\output\mustache_helper_collection_test

- The following tests have been moved to their correct tests directories:
  - lib/tests/time_splittings_test.php => analytics/tests/time_splittings_test.php

- All the classes and tests under lib/filebrowser and lib/filestorage
  belong to core, not to core_files. Some day we should move
  them to their correct subsystem.
- All the classes and tests under lib/grade belong to core, not
  to core_grades. Some day we should move them to their correct
  subsystem.
- The core_grades_external class and its \core\grades_external_test
  unit test should belong to the grades subsystem or, alternatively,
  to \core\external, they both should be moved together.
- The core_grading_external class and its \core\grading_external_test
  unit test should belong to the grading subsystem or, alternatively,
  to \core\external, they both should be moved together.
- The \core\message\message and \core\message\inbound (may be others)
  classes, and their associated tests should go to the core_message
  subsystem.
- The core_user class, and its associated tests should go to the
  core_user subsystem.
- The \core\update namespace is plain wrong (update is not valid API)
  and needs action 1) create it or 2) move elsewhere.
2022-08-26 16:34:20 +02:00