286 Commits

Author SHA1 Message Date
Andrew Nicols
fcdfc74abd MDL-75913 behat: Add support for file uploads in page generators 2023-06-19 16:35:46 +10:00
Sara Arjona
d3f363541b MDL-73052 page: Fix page description when it has only an image
This is as regression of MDL-72413, when description was moved to a
standard module API.
In some cases, when description has only images, it's was not
displayed.
2023-06-02 08:20:17 +02:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Jun Pataleta
2147bd6951 MDL-75085 webservice: Fix parameter passed to external_format_value 2023-02-01 11:12:02 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Jun Pataleta
c6ab792ddf MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-11-28 14:43:04 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +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
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Eloy Lafuente (stronk7)
58b56e2395 MDL-71747 upgrade: remove all the < 3.9.0 upgrade steps
This just deletes all the upgrade steps previous to 3.9.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2020061500 (v3.9.0) as anti-cheating measure.

The next commits will proceed to deprecate / remove functions
that were exclusively (usually belonging to upgradelib) being
used by those, now removed, upgrade steps. This is the list
of code to remove and document in upgrade.txt files:

  - upgrade_analytics_fix_contextids_defaults()
  - upgrade_convert_hub_config_site_param_names()
  - upgrade_rename_prediction_actions_useful_incorrectly_flagged()
  - \mod_forum\task\refresh_forum_post_counts adhoc task.

And these is the code that has NOT been removed
because it may be needed later (no matter there aren't uses now):

  - \core_search\manager::clean_up_non_existing_area(), used by
  - \core\task\clean_up_deleted_search_area_task adhoc task
2022-07-07 19:16:37 +02:00
Tim Hunt
6c161f3b99 MDL-74760 activity web services: refactor duplicate code 2022-06-07 12:53:34 +01:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Ilya Tregubov
29da0c7f2a Merge branch 'MDL-74235-master-2' of https://github.com/andrewnicols/moodle 2022-04-07 12:06:38 +06:00
Andrew Nicols
eb0a95956f MDL-74235 mod: Rename activity icons to new monologo naming 2022-04-07 12:56:14 +08:00
Amaia Anabitarte
8d8b8d9066 MDL-74381 core_themes: Resizing svg mod icons to 24px 2022-04-06 11:19:10 +02:00
Huong Nguyen
bfe14e2312 MDL-72991 Course: Partial course cache rebuild with cache versioning 2022-03-17 15:34:26 +07:00
Eloy Lafuente (stronk7)
3bb4a4009c MDL-73764 tool_xmldb: Regenerate all the files detected by the report
Note that, instead of going one by one to them from the XMLDB Editor
(load, makes some tiny change, save, revert the change, save), the
report includes a commented line that, once uncommented, does regenerate
the file while reporting.

I've left it there as a commodity for the developer.
2022-02-08 19:25:03 +01:00
Jun Pataleta
ee7b119943 Merge branch 'MDL-73363-master' of https://github.com/peterRd/moodle 2022-02-02 19:14:39 +08:00
Peter Dias
95b674062f MDL-73363 page: Remove printheading settings from page. 2022-01-24 08:52:15 +08:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- 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 tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Sara Arjona
09d3e88c48 NOBUG: Fixed SVG browser compatibility 2021-12-23 16:29:57 +01:00
Bas Brands
f2ddd23ec1 MDL-71457 theme_boost: activity icon styling 2021-12-20 15:02:24 +01:00
Bas Brands
5958c0df0c MDL-71457 theme_boost: replace all activity icons 2021-12-20 09:24:19 +01:00
Ilya Tregubov
9e5ffa2229 Merge branch 'MDL-72095-master-3' of https://github.com/bmbrands/moodle 2021-12-13 18:46:16 +02:00
Peter Dias
468204450c MDL-72413 page: Use the common module for setting the header 2021-12-13 09:49:35 +08:00
Bas Brands
946fd915e2 MDL-72095 theme_boost: max width for activity pages 2021-12-08 17:29:49 +01:00
Paul Holden
b0cb1b8cea MDL-70823 mod: safely parse module display options array. 2021-11-03 16:57:06 +01:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
David Mudrák
ad30fde448 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:45:18 +02:00
Ilya Tregubov
cf1cf222e7 MDL-66431 core: Fix behat tests.
Move activity creation to data generators. Only fixing those
tests failing due to removing usemodchooser preference.
2021-05-01 16:22:03 +02:00
Huong Nguyen
3f9035b989 MDL-71252 completion: Avoid showing the 'Mark as done' button
The following activites will be applied:
 - Label
 - File (Force download/Open/In pop-up)
 - URL (Open/In pop-up)
2021-04-26 14:24:41 +07:00
Michael Hawkins
c8a6d12608 MDL-71161 mod_page: Display activity completion information 2021-04-13 01:21:12 +08:00
Eloy Lafuente (stronk7)
77342b96fc MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018120300 (v3.6.0) as anti-cheating measure.

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:11:19 +01:00
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Andrew Nicols
bf535c522d MDL-69549 mod_page: Content export implementation 2020-10-15 13:45:59 +08:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
Eloy Lafuente (stronk7)
b764343e5a MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:08:09 +02:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Sara Arjona
a26cfe71d3 MDL-65809 upgrade: clean < 3.5.0 upgrade steps
This just deletes all the upgrade steps previous to 3.5.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018051700 (v3.5.0) as anti-cheating measure.

Previous commits have removed/deprecated all the upgradelib functions
not used anymore in codebase. Deletion has been documented in corresponding
upgrade.txt files:

- upgrade_fix_block_instance_configuration()
- upgrade_theme_is_from_family(), upgrade_find_theme_location()
and linkcoursesectionsupgradescriptwasrun setting
- upgrade_block_positions
- upgrade_fix_config_auth_plugin_names()
 and upgrade_fix_config_auth_plugin_defaults()
- format_xxx_upgrade_remove_numsections(), format_xxx_upgrade_hide_extra_sections()
and format_xxx_upgrade_add_empty_sections()
- filter_mathjaxloader_upgrade_cdn_cloudflare()
and filter_mathjaxloader_upgrade_mathjaxconfig_equal()
- get_assignments_with_rescaled_null_grades()

These have been kept because continue being used by restore:

- \core\task\refresh_mod_calendar_events_task
2019-12-20 12:20:43 +01:00
Eloy Lafuente (stronk7)
492d047d11 MDL-67284 upgrade: add 3.8.0 separation line to all upgrade scripts 2019-11-17 11:40:19 +01:00
Eloy Lafuente (stronk7)
d5be859063 MDL-67199 versions: bump all versions and requires near release
version = 2019111800 release version
requires= 2019111200 current beta (week7roll1) version
2019-11-12 17:57:08 +01:00
David Monllaó
9846b5f8c5 MDL-66592 analytics: Split text and link 2019-11-07 08:25:35 +08:00
Elizabeth Dalton
7229c5e6b5 MDL-66592 analytics: Descriptions for indicator calculations 2019-11-04 09:49:59 +08:00
Sara Arjona
810d7a3d2e MDL-66609: core_h5p: Add <component>_get_path_from_pluginfile method
This method has been added to all the components having some exceptions
with the way they treat the itemid in the pluginfile paths.
2019-10-29 10:22:43 +08:00