1414 Commits

Author SHA1 Message Date
Juan Leyva
795a8ac8a0 MDL-70340 mod_workshop: Do not apply format to peer comments
This text is not directly output to final users, it is used just in the textarea in both the site and the app.
Applying format, case issues like adding glossary links etc...
2020-11-27 18:10:04 +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
David Mudrák
6bfc46802e MDL-69050 lang: Rename the whitelist variable in the Workshop locallib 2020-09-24 19:41:58 +02:00
Eloy Lafuente (stronk7)
44c8fe38c7 Merge branch 'MDL-63375-master' of https://github.com/syxton/moodle into master 2020-08-19 00:13:02 +02: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
Matt Davidson
66570e4c27 MDL-63375 workshop: fix rubric grid view 2020-08-07 08:47:27 -04:00
Andrew Nicols
b0627a1a11 MDL-69160 workshop: Ensure steps are chained 2020-07-13 14:22:32 +08: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
Jake Dallimore
3f99406350 Merge branch 'MDL-68143-master' of https://github.com/HuongNV13/moodle 2020-05-22 11:52:31 +08:00
David Mudrák
005b00dd9b MDL-68645 output: Do not apply filters when creating calendar events
Applying filters on an activity module description when using it as a
new calendar event's description is bad m'kay? We need to store the raw
text and apply the filters only when we actually display the text. That
way, filters (such as multi-language content) may actually fully work
and we do not initialise the theme and output machinery.

Additionally, we need to explicitly set the format of the description
text to HTML (because we have converted it to it already). Otherwise it
defaults to the current user's preferred editor format.

This is still a pragmatic hot-fix solution. The proper solution would be
to pass the raw text, format and embedded files.
2020-05-13 10:03:01 +02:00
Luca Bösch
439c8c5933 MDL-68216 block_recent_activity: Format elements more nicely. 2020-05-05 22:09:19 +02:00
David Mudrák
8599eb5ebb MDL-68434 lang: Use the updated terminology in the tests 2020-04-29 17:40:58 +02:00
Huong Nguyen
8b52ca84ab MDL-68143 Workshop: should remember collapsed/expanded sections 2020-04-28 13:53:26 +07:00
Tim Hunt
1dcd0d3499 MDL-68233 renderers/block: remove illegal uses of $PAGE and $OUTPUT 2020-03-29 15:34:26 +01:00
Mihail Geshoski
0525ee5825 MDL-60817 mod_workshop: Fix behat tests 2020-03-13 13:17:44 +08:00
Jun Pataleta
88fbee25d9 Merge branch 'MDL-65835-master' of git://github.com/abgreeve/moodle 2020-01-02 11:52:10 +08:00
Adrian Greeve
d0d65b498c MDL-65835 plagiarism: Initial deprecation of old functions.
This is the initial deprecation of:
* plagiarism_save_form_elements
* plagiarism_get_form_elements_module
* plagiarism_plugin::get_form_elements_module
* plagiarism_plugin::save_form_elements
2020-01-02 11:38:49 +08:00
Eloy Lafuente (stronk7)
a0ba8feef6 Merge branch 'MDL-67527-master-enfix' of git://github.com/mudrd8mz/moodle 2019-12-29 23:26:52 +01:00
Adrian Greeve
42d7f7f9e4 Merge branch 'MDL-65809-master' of git://github.com/sarjona/moodle 2019-12-24 14:53:03 +08: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
David Mudrák
6aff025cad MDL-67527 lang: Propagate the string fixes to Behat and other places 2019-12-18 21:23:46 +01:00
Helen Foster
824c87f370 MDL-67527 lang: Import fixed English strings (en_fix) 2019-12-18 21:23:46 +01:00
Bas Brands
40ea67534c MDL-66999 theme_boost: @extend remove extends for tables 2019-12-12 11:27:56 +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
Jun Pataleta
289c9e14c4 Merge branch 'MDL-67116-master' of git://github.com/andrewnicols/moodle 2019-11-13 15:31:03 +08:00
Andrew Nicols
c035141971 MDL-67116 course: Fix completion disabled for gradable items
The default value is an empty string (""), which in PHP evaluates to 0 when
cast to a string in our DML layer.

The fix is to forcibly make it null which is not cast to string in DML
for optional strings.
2019-11-13 12:49:59 +08: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
Adrian Greeve
51cc5e1789 Merge branch 'MDL-66074-OCT28' of git://github.com/Chocolate-lightning/moodle_forum-project 2019-10-30 13:44:59 +08:00
Andrew Nicols
1adda7ada6 MDL-66079 workshop: Switch to new gradeitem API
Part of MDL-66074
2019-10-30 10:23:40 +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
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
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
cescobedo
0504254f1d MDL-59524 general: Remove strings deprecated in 3.4 2019-08-12 00:13:08 +02:00
Ryan Wyllie
195ea4480b MDL-62497 javascript: build AMD modules with new transpiler 2019-07-19 14:12:49 +08:00
John Yao
96e444665e MDL-65517 block_timeline: Hide completed course modules in Timeline
When some activities are manually completed by students, some are still showing in students' timeline.
This commit fix that for module assign,chat,choice,feedback,lesson,quiz,scorm and workshop.
2019-07-12 09:16:40 +10:00
Sara Arjona
7576bcbe9a Merge branch 'MDL-66049-master-workshopnamespace' of git://github.com/mudrd8mz/moodle 2019-07-02 08:28:53 +02:00
David Mudrák
2bb03c59e8 MDL-66049 workshop: Fix the fully qualified class name
Because of the missing slash, the class 'workshop' was not found in the
current namespace and the cron failed to work.
2019-07-01 14:48:45 +02:00
Mathew May
e63a35dcff MDL-66022 core: Remove unused subplugin files 2019-06-27 08:18:24 +08:00
Andrew Nicols
29c442c558 MDL-65646 core: Move component storage to json 2019-06-13 12:26:00 +08: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)
67481bef21 Merge branch 'MDL-63152-master' of git://github.com/rezaies/moodle 2019-03-26 13:28:07 +01:00