3120 Commits

Author SHA1 Message Date
Víctor Déniz
c209719811 Merge branch 'MDL-67020_master' of https://github.com/marxjohnson/moodle 2022-10-21 09:07:58 +03:00
Mark Johnson
ea01fb2427 MDL-67020 Cache: Make local caching work for coursemodinfo 2022-10-20 11:31:33 +01:00
Jun Pataleta
3a5205dd0a Merge branch 'MDL-75985-master' of https://github.com/andrewnicols/moodle 2022-10-19 21:27:29 +08:00
Andrew Nicols
0ba4fa53c1 MDL-75985 behat: Return newline character for \n
Somehow part of this commit was lost during the push and/or squash.
2022-10-19 20:26:14 +08:00
Jun Pataleta
e591f9da66 Merge branch 'MDL-75985-master' of https://github.com/andrewnicols/moodle 2022-10-19 10:56:14 +08:00
Sara Arjona
3c49d97f1c Merge branch 'MDL-75077' of https://github.com/paulholden/moodle 2022-10-17 16:32:29 +02:00
Ilya Tregubov
057f732bf1 Merge branch 'MDL-58266-master' of https://github.com/JBThong/moodle 2022-10-17 12:51:59 +03:00
Shamim Rezaie
9708ad500b Merge branch 'MDL-55580_master' of https://github.com/marxjohnson/moodle 2022-10-17 19:19:36 +11:00
Andrew Nicols
febd5d944c MDL-75985 behat: Standardise HTML output when comparing editor content
This commit adds a standardise_html function and updates the matches
function to compare normalised content.

This allows for a wider variety of valid editor output to be handled
using the standard value matching steps in Behat, thus supporting
editors other than Atto better.
2022-10-14 23:44:56 +08:00
Víctor Déniz
ab764c0062 Merge branch 'MDL-75736-master' of https://github.com/sammarshallou/moodle 2022-10-14 16:09:01 +01:00
hieuvu
c6e018e04e MDL-58266 core_completion: Add new view table. 2022-10-14 00:30:28 +07:00
sam marshall
18dc2a50ab MDL-75736 lib: Course cache can be rebuilt unnecessarily
This change puts back the behaviour that get_fast_modinfo will accept
a cached version of modinfo that is newer than expected (according to
the course cacherev).

Not accepting newer versions can lead to poor performance in cases
where multiple requests take place at once, or using a clustered
database.
2022-10-11 16:56:21 +01:00
Laurent David
bcc18e2439 MDL-55580 core: Process for deprecating a capability
* Add a $deprecatedcapabilities variable to deal with deprecated
capabilities

Change-Id: I14f44d331e8a1c4bd9abe9566c78d911c0205583
Co-authored-by: Mark Johnson <mark.johnson@catalyst-eu.net>
2022-10-11 08:48:17 +01:00
Marina Glancy
41b93bd7e5 MDL-73424 general: Internal methods must have same type as parent
Otherwise the error is thrown in PHP8.1
2022-10-10 16:46:13 +02:00
Shamim Rezaie
d01c1a4a07 Merge branch 'MDL-75886-master' of https://github.com/andrewnicols/moodle 2022-10-06 12:24:07 +11:00
Paul Holden
dd0c545ec6 MDL-75077 output: prevent duplicate ID errors in custom menus.
Following on from 8e4a7c6b, we should apply a similar change to
custom menus to account for being collapsed into the "More" menu.
2022-10-05 18:29:17 +01:00
Andrew Nicols
13cc3607de MDL-75886 atto: Always use Atto for @atto tests
This change, which should be easy to mimic for other editors.

This will ensure that the correct editor is used for tests relating to
that editor, or its subplugins.
2022-10-05 09:54:21 +08:00
Jun Pataleta
28a4c55aea Merge branch 'MDL-73433-master' of https://github.com/marinaglancy/moodle 2022-10-04 17:53:27 +08:00
Marina Glancy
8ba4e5a3d2 MDL-73433 core: all methods in core_text can accept null argument 2022-09-29 21:06:22 +02:00
Jun Pataleta
f680348048 Merge branch 'MDL-66902' of https://github.com/stronk7/moodle 2022-09-28 23:15:52 +08:00
Andrew Nicols
346db7e294 MDL-75200 core: Whitespace fix 2022-09-28 12:44:57 +08:00
Andrew Nicols
461fb1b6f6 Merge branch 'MDL-75200-master' of https://github.com/marinaglancy/moodle 2022-09-28 12:35:42 +08:00
Eloy Lafuente (stronk7)
0ed53be9b2 MDL-66902 tests: Fix all incorrect namespaces
This issue just goes over all the currently incorrect
namespaces in test cases and:

1. Change the namespace to the correct one.
2. Move/rename it to correct location if needed (level 2 and down).
3. Remove not needed MOODLE_INTERNAL check when possible.
4. Remove file phpdoc when the file only has one class.
5. Make small adjustments in case the change of namespace requires it.
2022-09-26 14:12:16 +02:00
sam marshall
81b4f04fb3 MDL-74960 core\lock: Performance info - display lock performance
Show performance information about locks (time taken to acquire lock,
time lock is held for) in the 'perfinfo' display.

Also show existing information (that was already calculated but not
shown before) about the session lock, which is not a 'core\lock' type
lock, but the information is similarly useful.
2022-09-26 11:24:10 +01:00
Ilya Tregubov
e08cc53b37 Merge branch 'master-MDL-74993' of https://github.com/golenkovm/moodle 2022-09-20 09:06:05 +04:00
Mihail Geshoski
460744a6a6 MDL-75153 form: Behat support for group structures in select menu field
Adds behat support for group structures in the select menu field. When
looking for a particular option you can further specify the group under
which this option should be located by using the '>' delimiter
(e.g. "Group name > Option name"). In addition to that, this commit
intorduces new step definition which can be used to check whether the
select menu field contains a particular option.
2022-09-20 00:17:55 +08:00
Marina Glancy
c2e18d7912 MDL-75200 core: function clean_param should work with null - php 8.1 2022-09-16 13:30:21 +02:00
Eloy Lafuente (stronk7)
81f05b3239 MDL-75716 phpunit: Move tests to use correct names and ns (take#5)
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:

- In lib/tests/blocklib_test.php 2 helper classes have been
  moved to tests/fixtures, because they needed to be namespace-free.
2022-09-12 19:29:34 +02:00
Mikhail Golenkov
db04ed91ae MDL-74993 course: Output cm id when throwing Invalid course module id 2022-09-12 14:17:25 +10:00
Michael Hawkins
c43123adde MDL-68066 output: Apply disable lambda rendering to Mustache renderer 2022-09-07 23:54:24 +08:00
stevando
3f81b85e7d MDL-75283 admin: Update admin user fetching to use sort helper 2022-09-07 13:16:17 +08:00
Jun Pataleta
7b410fbe2b Merge branch 'MDL-75231-master' of https://github.com/lameze/moodle 2022-09-06 23:49:34 +08:00
Sara Arjona
8349ce5811 Merge branch 'MDL-75608-master' of https://github.com/sammarshallou/moodle 2022-09-05 12:24:58 +02:00
sam marshall
49b4ff0f3e MDL-75608 Behat: Expand all fieldsets step fails with single fieldset 2022-08-30 11:16:55 +01: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
Simey Lameze
8f078a2911 MDL-75231 files: make bucket calculations more precise
This commit changes changes the unit test calculations to
keep track of the time the bucket starts/finishes bursting
and use milliseconds instead of seconds to have a precise
time to sleep.
2022-08-22 13:51:07 +08:00
Andrew Nicols
903f04a320 Merge branch 'MDL-74608' of https://github.com/timhunt/moodle 2022-08-18 10:52:02 +08:00
Tim Hunt
8babdbd396 MDL-74608 activities: a new option to force the activity language
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
2022-08-15 22:15:52 +01:00
Petr Skoda
5ed64ce150 MDL-75237 core: Revert MDL-72029
This reverts commit d585f902fc2bc4f04ac2b097aa9bfde8a71f8fba.
2022-08-12 04:14:18 +02:00
Jun Pataleta
a8575c24bd Merge branch 'MDL-74636' of https://github.com/timhunt/moodle 2022-08-09 11:11:19 +08:00
Jun Pataleta
5d90181c6e Merge branch 'MDL-74800-master' of https://github.com/ferranrecio/moodle 2022-08-08 22:30:01 +08:00
Jun Pataleta
950d617aec MDL-74800 core: action menu role fix
The action menu could have a role button or menubar depending on the
number of options available.
2022-08-08 14:46:42 +02:00
Ilya Tregubov
a6e24e30ff Merge branch 'MDL-74475-master' of https://github.com/aanabit/moodle 2022-08-05 12:25:48 +04:00
Andrew Nicols
73eb4edbdf Merge branch 'MDL-74502-master' of https://github.com/marinaglancy/moodle 2022-08-04 11:08:44 +08:00
Amaia Anabitarte
f039c865f7 MDL-74475 behat: Option to jump to course edit page 2022-08-03 10:34:36 +02:00
Andrew Nicols
babfdf8af2 Merge branch 'MDL-74592-master' of https://github.com/cameron1729/moodle 2022-08-03 11:11:25 +08:00
Cameron Ball
2e44102904 MDL-74592 tool_uploaduser: Add option to match on email 2022-08-01 13:45:27 +08:00
Tim Hunt
9468fe3c8c MDL-74636 behat: step to skip this scenario if a plugin isn't installed 2022-07-29 09:45:09 +01:00
Andrew Nicols
b47fcbb204 Merge branch 'MDL-72349_update_strip_double_headers_function' of https://github.com/christina-roperto/moodle 2022-07-29 12:11:22 +08:00
Paul Holden
d0b5241786 MDL-75256 task: move abstract get_name method to base class.
Allow adhoc tasks to implement this method, so they too can have
descriptive names for themselves. Default implementation added to
return the class name itself.
2022-07-22 09:13:53 +01:00