3053 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
c25fe3a183 Merge branch 'MDL-71055-master' of git://github.com/andrewnicols/moodle 2021-08-23 23:22:15 +02:00
Andrew Nicols
891d1bfad3 MDL-71055 behat: Update core settings to use generator
These changes have only been applied to settings which were already
using settings names and values, but which were still using the UI.
2021-08-23 12:23:03 +08:00
Andrew Nicols
c79d58a50b MDL-71209 behat: Fix behat for new changes
Co-authored-by: Ilya Tregubov <ilya@moodle.com>
2021-08-20 16:49:06 +02:00
Julien Boulen
196cb4e1f0 MDL-71093 backup: fix backup when activity names use HTML tags 2021-08-19 11:09:27 +02:00
Tim Hunt
e7880337ad MDL-72265 backup: fix checking of override capabilites on restore
Thanks to Peter Dias <peter@moodle.com> for his help with the unit test.
2021-08-05 13:54:59 +01:00
Paul Holden
4e29417b7a MDL-71121 backup: apply config defaults for async backups. 2021-08-02 23:27:18 +01:00
Ferran Recio
21d93554d4 MDL-71863 courseformat: create courseformat subsystem 2021-06-28 13:50:18 +02:00
Eloy Lafuente (stronk7)
b09942824b Merge branch 'MDL-71113-master' of git://github.com/andrewnicols/moodle 2021-06-19 17:57:13 +02:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Neill Magill
3a8db568e1 MDL-69524 backup: Code style fixes for the file 2021-06-17 09:31:17 +01:00
Neill Magill
0f073a4b10 MDL-69524 backup: Add PHPdocs to backup_controller class 2021-06-17 09:31:15 +01:00
Mikhail Golenkov
ed5e808052 MDL-70337 backup: Enhance automated backup logs readability 2021-05-24 10:29:02 +10:00
David Mudrák
03402e3c5d MDL-71580 lang: Fix reworded strings in tests 2021-05-12 17:10:16 +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
Jun Pataleta
e61f3796dd Merge branch 'MDL-71455-master' of https://github.com/dcai/moodle 2021-04-29 18:05:09 +08:00
Dongsheng Cai
2935cb508d MDL-71455 core_backup: fix course completion options when backup/restore 2021-04-29 11:38:31 +10:00
Adrian Greeve
d4673e3047 Merge branch 'MDL-71051-master-2' of git://github.com/marinaglancy/moodle 2021-04-29 09:27:07 +08:00
Marina Glancy
5682b9a585 MDL-71051 core_user: always use API when working with profile fields 2021-04-28 11:39:04 +02:00
Andrew Nicols
aa6c02a74c Merge branch 'MDL-71389-master' of git://github.com/marinaglancy/moodle 2021-04-28 09:14:48 +08:00
Sara Arjona
841df2a216 Merge branch 'MDL-71136_master' of https://github.com/TomoTsuyuki/moodle 2021-04-22 13:56:37 +02:00
abgreeve
8a53fe7f6b Merge branch 'MDL-28452-master' of git://github.com/bmbrands/moodle 2021-04-22 09:38:50 +08:00
Marina Glancy
263c39ba21 MDL-71389 various: changes to unittests due to php8 changes:
- some engine error messages changed
- some warning levels changed
- the carriage return symbol randomly appears
- one phpunit assertion fails and not really representative of anything
2021-04-21 12:38:46 +02:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Eloy Lafuente (stronk7)
7c75781518 Merge branch 'MDL-63381_master_v3' of https://github.com/TomoTsuyuki/moodle 2021-04-20 23:56:56 +02:00
Eloy Lafuente (stronk7)
ce06891713 Merge branch 'master-MDL-71190-backup-lastaccess' of https://github.com/ScottVerbeek/moodle 2021-04-19 18:52:18 +02:00
ScottVerbeek
dc1048c301 MDL-71190 backup: Include users last access to course
Backup the table user_lastaccess which holds data for when a user last accessed a course.
And also restore to the table user_lastaccess from the .xml file created in the backup.
2021-04-19 12:03:50 +10:00
Eloy Lafuente (stronk7)
fc530b1837 MDL-71367 unit tests: Add missing ->destroy() call to test backups
As part of the tests preparations, some backups are created, but
the tests aren't calling to their ->destroy() method at the end.

The destroy() method is needed to go cleaning and unsetting various
objects that, only then, will free resources, like memory, open files...

This isn't critical under Unix OSs... but Windows is really sensible
and keeps all open files locked, so any write operation on them fails.
2021-04-19 00:04:10 +02:00
Sara Arjona
ef557b970f MDL-69331 core_h5p: fix behat errors 2021-04-16 11:09:02 +02:00
Andrew Nicols
e37158ba6c Merge branch 'master_MDL-71233' of https://github.com/golenkovm/moodle 2021-04-16 07:57:02 +01:00
Sara Arjona
39263ddb62 MDL-69331 core_h5p: Add missing @core_h5p tag 2021-04-15 09:16:36 +02:00
Sara Arjona
f3d43c76bc MDL-69331 core_h5p: Add missing library files to behat tests
Some of the pre-existing behat tests were creating content into the
content bank using the generator but the H5P content-type libraries
weren't uploaded.
Since MDL-69331, libraries need to be deployed previously (so fake
H5P content-type won't be displayed if these libraries don't exist).
2021-04-15 09:16:36 +02:00
Tomo Tsuyuki
108da43e9f MDL-63381 backup: Have an option to import permissions
Add options to use permission settings for import / restore
2021-04-13 13:24:15 +10:00
Amaia Anabitarte
9b7b70ca9b MDL-71107 core_contentbank: Fill content author when copying a course
'usercreated' and 'usermodified' fields can not be always mapped.
We are filling those fields with 'old' users when working on the same
site, or with current user when working on a different instance.
2021-04-07 10:03:38 +02:00
Tomo Tsuyuki
b6f6203e65 MDL-71136 backup: Fix moodle_exception path. 2021-03-30 10:54:08 +11:00
Mikhail Golenkov
0d2f65ffc9 MDL-71233 backup: Fix Moodle version for MDL-69418 2021-03-30 10:41:59 +11:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Mihail Geshoski
5cc31c3691 MDL-67870 backup: Skip value change if setting is locked by hierarchy
The given condition in the if statement did not take into account cases
when the setting is locked by hierarchy. Settings which are locked by
hierarchy should should keep their current values which were inherited
from the parent.
2021-03-22 15:32:49 +08:00
Eloy Lafuente (stronk7)
e3a46964dc Merge branch 'MDL-70901-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:40:46 +01:00
Jun Pataleta
ebf078458d Merge branch 'MDL-71036' of https://github.com/stronk7/moodle 2021-03-17 20:05:25 +08:00
Eloy Lafuente (stronk7)
44c302a607 Merge branch 'master-MDL-71044_v3' of https://github.com/golenkovm/moodle 2021-03-16 22:38:48 +01:00
Adrian Greeve
00cb88c352 Merge branch 'MDL-65974-master-iteration03' of git://github.com/ferranrecio/moodle 2021-03-15 15:16:44 +08:00
Eloy Lafuente (stronk7)
81407f18ec MDL-71036 phpunit: Mock->setMethods() silently deprecated
The current ->setMethods() has been silently (won't emit any
warning) in PHPUnit 9. And will stop working (current plans)
in PHPUnit 10.

Basically the now deprecated method has been split into:

- onlyMethods(): To point to existing methods in the mocked artifact.
- addMethods(): To point to non existing (yet) methods in the mocked
  artifact.

In practice that means that all our current setMethods() calls can be
converted to onlyMethods() (existing) and done. The addMethods() is
mostly useful on development phases, not final testing.

Finally note that <null> isn't accepted anymore as parameter to
double all the methods. Instead empty array [] must be used.

Link: https://github.com/sebastianbergmann/phpunit/issues/3770
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7)
ba5b6089d5 MDL-71036 phpunit: Renamed various regexp-related assertions
In PHPUnit 9.1, the following regexp-related assertions
have been deprecated and there are new alternatives for
all them:
    - assertRegExp()     -> assertMatchesRegularExpression()
    - assertNotRegExp()  -> assertDoesNotMatchRegularExpression()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

    ag 'assertRegExp|assertNotRegExp' -li
2021-03-11 19:22:24 +01:00
Ferran Recio
1c839f9072 MDL-65974 course: move format_base to core_course\course_format 2021-03-11 17:36:34 +01:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Mikhail Golenkov
e9eb3ad6c5 MDL-71044 backup: backup_cleanup_task task to remove old files 2021-03-07 21:46:47 +11:00
Jun Pataleta
2b113fd93c Merge branch 'MDL-70876' of https://github.com/stronk7/moodle 2021-03-02 16:02:52 +08:00
Eloy Lafuente (stronk7)
bf2b1b18b5 Merge branch 'MDL-70898-master' of git://github.com/marinaglancy/moodle 2021-03-01 22:50:33 +01:00
Eloy Lafuente (stronk7)
08ae245926 MDL-70876 php80: 5th param removed from custom error handlers
It was deprecated in php72 and now it's gone.

Have used this regexp to find all the uses in core:

ag set_error_handler | uniq

And then checked all them manually, that parameter was not
being used in the 3 methods where we are removing it.
2021-02-26 13:08:27 +01:00