1584 Commits

Author SHA1 Message Date
Luca Bösch
f37dbcc15b MDL-70621 mod_glossary: use glossary rsstype string. 2021-02-03 08:33:54 +01:00
Sujith Haridasan
7b3f43db95 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:07:53 +05:30
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)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
40de097e65 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
d95c378771 MDL-67673 phpunit: Remove expectedException annotations
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

The annotations `@expectedException`, `@expectedExceptionCode`,
`@expectedExceptionMessage`, and `@expectedExceptionMessageRegExp`
are now deprecated.
Using these annotations will trigger a deprecation warning
in PHPUnit 8 and in PHPUnit 9 these annotations will be removed.

Also, all uses of expectExceptionMessageRegExp() has been moved
to expectExceptionMessageMatches(). See https://github.com/sebastianbergmann/phpunit/issues/3957

TODO: Various weirdness found while doing the changes with these tests:
- vendor/bin/phpunit lib/tests/exporter_test.php (created MDL-69700)
- vendor/bin/phpunit competency/tests/external_test.php (same issue than prev one)
- vendor/bin/phpunit question/engine/tests/questionengine_test.php (created MDL-69624)
- vendor/bin/phpunit lib/tests/event_test.php (created MDL-69688)
2020-10-21 12:46:00 +02: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
Juan Leyva
1a09fc8d34 MDL-63805 glossary: New WS mod_glossary_prepare_entry_for_edition 2020-10-14 12:46:41 +02:00
Juan Leyva
b4a30d7acc MDL-63805 glossary: New WS mod_glossary_update_entry 2020-10-14 12:46:41 +02:00
Juan Leyva
3f5d99063b MDL-63805 glossary: Glossary API refactor 2020-10-14 12:46:41 +02:00
Juan Leyva
8441d551ea MDL-63806 glossary: New WS mod_glossary_delete_entry 2020-10-09 09:42:56 +02:00
Juan Leyva
f9b56649e7 MDL-63806 glossary: Return user permissions for entries in WS 2020-10-09 09:42:56 +02:00
Juan Leyva
a7a1f0d48c MDL-63806 glossary: Move delete code to API function 2020-10-09 09:42:56 +02:00
Bas Brands
4c71e1d0d0 MDL-69454 core_search: consistent mod searches 2020-09-21 11:54:51 +02:00
Andrew Nicols
f24aae4cad Merge branch 'MDL-67735-master' of git://github.com/bmbrands/moodle 2020-08-19 08:28:49 +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
Bas Brands
4394f9e358 MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00: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
Luca Bösch
439c8c5933 MDL-68216 block_recent_activity: Format elements more nicely. 2020-05-05 22:09:19 +02:00
Jun Pataleta
21b0f581e1 Merge branch 'MDL-67115' of https://github.com/stronk7/moodle 2020-01-23 15:12:56 +08:00
Eloy Lafuente (stronk7)
ee439d017e MDL-67115 core: php74 params order for implode()/join()
Passing parameters to implode() in reverse order is deprecated, use
implode($glue, $parts) instead of implode($parts, $glue).

This commit corresponds to phpunit and manual detections, core files.
2020-01-19 18:47:07 +01:00
Jun Pataleta
1ed7527b4c MDL-67724 mod_glossary: Improve Behat test
Improve the "Glossary entries are not always editable" scenario by:
* No need to use the @javascript tag
* The maxediting time can be set to a lower value to
reduce the overall wait time.
2020-01-17 17:49:58 +08:00
Eloy Lafuente (stronk7)
4621917c62 MDL-67114 core: php74 fix. Fix use of scalar as array in core
There are various places where it's not guaranteed that the
variable being used is array, and instead, can be null, bool, int...

We need to check that because php74 warns about it.

Where possible we have used the coalesce operator as
replacement for isset() ternary operations.
2020-01-03 11:33:15 +01: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
Eloy Lafuente (stronk7)
ef6a958dfb Merge branch 'MDL-66733-master' of git://github.com/andrewnicols/moodle 2019-09-23 23:35:42 +02:00
Andrew Nicols
4bb39eabc7 MDL-66733 grade: Add helper to get correct user date for grade 2019-09-20 09:50:17 +08:00
Juan Leyva
dfd4881589 MDL-65026 course: Fix modules intro formatting in WS
The Web Service seems to be doing excessive text cleaning.
2019-09-16 13:04:26 +02:00
Luca Bösch
fd5903ef8d MDL-66436 glossary: Edit and delete categories form styles. 2019-09-05 18:03:52 +02:00
Eloy Lafuente (stronk7)
9900a6dd47 MDL-66483 lib: remove recent xmlize dep on setuplib/CFG
This removes the dependency added by MDL-66110 (aiming to fix
a CI job). So we keep things as they were and will fix the
CI job separately.
2019-08-23 11:21:28 +02:00
Adrian Greeve
6f35cc69a0 Merge branch 'MDL-66369-master' of git://github.com/aanabit/moodle 2019-08-21 13:53:15 +08:00
Andrew Nicols
221bfed37b MDL-66378 behat: Fix use of before/after selectors 2019-08-19 08:16:40 +08:00
Andrew Nicols
44de5278a5 MDL-66378 behat: Correct invalid uses of selection from dropdown 2019-08-17 11:44:48 +08:00
Amaia Anabitarte
c0375ba73f MDL-66369 libraries: Remove [modname]_scale_used functions
These functions were only used by the deprecated function
which was deprecated in 3.1, and removed in 3.6.
2019-08-16 11:56:17 +08:00
Damyon Wiese
043b38d580 MDL-64623 glossary: Check the entry id
The entry must match the glossary before you can do any action on it.
2019-07-02 08:54:36 +02:00
Eloy Lafuente (stronk7)
3572a25cc3 MDL-65644 upgrade: add 3.7.0 separation line to all upgrade scripts 2019-05-20 19:35:05 +02:00
Eloy Lafuente (stronk7)
c9a1a6341c MDL-65571 versions: bump all versions and requires near release
version = 2019052000 release version
requires= 2019051100 current beta (week6roll2) version
2019-05-12 23:46:34 +02:00
Adrian Greeve
f50b98dbe4 Merge branch 'MDL-64906_hideif_mod' of git://github.com/davosmith/moodle 2019-04-30 20:47:22 +02:00
Davo Smith
385247d94e MDL-64906 mod: add support for hideif to activity modules 2019-04-02 09:13:09 +01:00
Eloy Lafuente (stronk7)
66b4982135 MDL-64656 phpunit: Compare returned tags without any expected order 2019-04-12 17:28:21 +02:00
Juan Leyva
6c344ff282 MDL-64656 core_tag: Return tags in modules and blog 2019-04-11 10:20:44 +02:00
Mathew May
5cac5fa428 MDL-64506 templates: BS2 m-x-x to BS4 mx-x 2019-04-03 19:47:11 +08:00
David Castro
2afee18b34 MDL-65089 glossary: Enforcing case comparison in SQL. 2019-03-28 18:34:54 -05:00
Andrew Nicols
ab20d2606d MDL-64652 glossary: Break LEFT JOINs to multiple INNER 2019-03-05 10:12:22 +08:00
Adrian Greeve
de1f00fdbe Merge branch 'wip-MDL-64729-master' of https://github.com/Beedell/moodle 2019-02-21 12:20:48 +01:00
John Beedell
af00998f74 MDL-64729 mod_glossary: glossary_get_entries_search case sensitivity 2019-02-15 16:53:20 +00:00