Commit graph

2842 commits

Author SHA1 Message Date
Paul Holden
e5e287396d MDL-70422 restore: fix for undefined question answer ordering in test. 2020-12-07 10:15:48 +00:00
Eloy Lafuente (stronk7)
adb8fe4c42 MDL-70229 install: Changes to continue working with parallel branches
- Main version (version, release, branch and maturity), guaranteeing
  we are diverging from previous stable branch and won't overlap any more.
- Backup release, to match new branch.
- CI configuration files (.travis.yml in this case), to match new branch.

For changes needed to START working with parallel branches, see MDL-69475
2020-11-14 17:10:41 +01:00
Jun Pataleta
940ed72017 Merge branch 'MDL-70089_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-04 13:05:47 +08:00
Eloy Lafuente (stronk7)
b0a1b4ce8b MDL-70089 versions: bump all versions and requires near release
version = 2020110900 release version
requires= 2020110300 current beta+ (week6roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_310_STABLE already existing) for Moodle 3.10.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2020-11-03 19:34:52 +01:00
Mihail Geshoski
fd2427746f MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:34:28 +01:00
Peter Dias
1d1b148ca9 MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:34:28 +01:00
Paul Holden
a850fa5de8 MDL-69156 backup: correct behaviour of course copy idnumber field.
When a given user doesn't have the capability to change the idnumber
field during course copy, freeze the field value.
2020-10-29 14:15:04 +01:00
Adrian Perez
8d0d0b1f59 MDL-69156 course_copy: set defaults for idnumber when not permitted 2020-10-29 14:15:00 +01:00
Luca Bösch
a9f5f8094c MDL-69995 backup: padding before activity icons. 2020-10-25 02:07:26 +02:00
Eloy Lafuente (stronk7)
46606b3ddd 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:05 +02:00
Eloy Lafuente (stronk7)
ddf72dd60d 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:05 +02:00
Eloy Lafuente (stronk7)
d81a94807b 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:46:04 +02:00
Sara Arjona
b7146b655a Merge branch 'MDL-69900-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-10-19 13:41:59 +02:00
Jake Dallimore
04a02b5bd9 Merge branch 'MOODLE_310_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-16 11:52:29 +08:00
Stephen Bourget
a2b727d7bc MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:06:26 +08:00
Mikhail Golenkov
1f3aacf8fc MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:33:56 +11:00
Shamim Rezaie
2fca843e49 MDL-69649 backup: Fix missing labels
- The backup details page uses a table to show a sumary of the backup
  content. Used role attribute to denote the tabular format of the
  summary.
- The backup details page displays activity name next to each activity
  icon. Therefore the icons are only decorative and do not need to have
  any title or even alt text.
- Form labels should be associated with form controls.  A div element is
  not a form control.
- The from attribute of the form labels should be equal to the id
  attribute of an element. Therefore, we first create a label and an
  input elements and associate them to each other, and then pass them to
  backup_detail_pair() when a label is needed.
2020-09-28 23:43:01 +10:00
Bas Brands
486aa319c2 MDL-69454 core_search: consistent backup search 2020-09-23 17:36:15 +02:00
Claude Vervoort
fae57261e7 MDL-66934 mod_lti: support context history param 2020-09-18 14:06:58 -04:00
Nathan Nguyen
cf4b6c8c94 MDL-68702 core_backup: exclude legacy course files 2020-09-11 10:59:28 +10:00
Paul Holden
f2b1242364 MDL-69448 backup: fix capability checks when unable to copy user data.
When a given user doesn't have the capability to "Include user data"
during course copying, freeze the form element rather than not adding
it at all.

This caused problems as the element was required before preceding with
the course copy.
2020-09-04 08:20:04 +01:00
Dmitrii Metelkin
558ef4f778 MDL-69418 backup: attach data to grade items 2020-09-03 11:08:00 +08:00
Sara Arjona
893cf77d33 Merge branch '67278-moodle-310-categories-selector' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_310_STABLE 2020-09-02 17:37:24 +02:00
Julien Boulen
f9f41f5061 MDL-67278 course: Use autocomplete widget for course category selector 2020-09-02 16:00:20 +02:00
Farhan Karmali
d179137f1b MDL-67419 admin: New admin setting for lang during user creation 2020-09-02 08:54:47 +08:00
Eloy Lafuente (stronk7)
12ffcc5097 MDL-69475 backup: Proper handling of backup::RELEASE versions
1) Remove any floatval() casting. They are breaking / killing
   .10 versions (converting them to .1). Since Moodle 2.0 all the
   backup::RELEASE have been 100% numerical values.
2) Use version_compare() always to compare backup::RELEASE values.
   They are always versions and the function is aware of versions
   > .9, able to clean/ignore alpha chars... and everything else.

Note that I've also changed a couple of cases in formats (topics and
weeks) that were correct, but just added the same comment and used
the same version_compare() comparison parameters style, so all uses
in core are consistent (and safe to be copied out there).
2020-08-18 12:49:20 +02:00
Eloy Lafuente (stronk7)
ae3af1d860 MDL-69475 install: Version, env. and minimal changes before branching
- Also bump travis to get builds against 310_STABLE.
- And backup release to match 3.10

Note this doesn't aim to be a complete change-set, but just the
minimum to switch to 3-digit $branches and keep installation, checks
and tests running and passing.
2020-08-17 00:12:30 +02:00
Marina Glancy
6bc7645868 MDL-69381 core_backup: make progressbar selector more specific 2020-07-31 13:28:24 +02:00
Andrew Nicols
b284293402 MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 16:43:08 +08:00
Mark Johnson
e37cdf881e MDL-67671 backup: Fix modname display on backup form 2020-07-09 10:11:17 +01:00
Eloy Lafuente (stronk7)
dbe3e2dd13 MDL-69043 backup: Bump release to 4.0 2020-06-14 12:53:38 +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
Ilya Tregubov
d83bf6e0ff MDL-68203 restore: Decode quiz links when restore into existing course
or duplicating.
2020-05-27 10:38:40 +10:00
Eloy Lafuente (stronk7)
5b188629c7 MDL-68780 unit tests: Add missing ->destroy() calls to controllers
Every backup and restore controller always need to call
to their ->destroy() method in charge of finalizing loggers,
closing file handlers and destroy some circular references.

This is specially important within unit tests, because
open resources cannot be reset between tests, causing problems,
specially within Windows that locks all those files.
2020-05-20 11:02:00 +02:00
Víctor Déniz Falcón
8060ed34db Merge branch 'MDL-67812-master-latest-3' of git://github.com/mihailges/moodle 2020-05-18 16:04:58 +01:00
Mihail Geshoski
4f2a5f2074 MDL-67812 core_contentbank: Modify behat tests
Modify all behat tests that use the behat contentbank content generator
in order to use the updated generator structure
2020-05-18 11:10:07 +08:00
Adrian Greeve
5ec37d28a6 Merge branch 'master_MDL-64843_course_copy_ui' of https://github.com/catalyst/moodle 2020-05-18 10:35:44 +08:00
Matt Porritt
01436f7539 MDL-64843 Backup: Course copy user interface
This patch adds better core support for copying courses.
There is now a simplified and dedicated UI for copying
courses. This can be accessed from the course context
menu or course management screens.

All backups are done asynchronously and there can be multiple
copies of a course in flight at once.
2020-05-15 06:02:02 +00:00
Amaia Anabitarte
66489aea0f MDL-68314 core_contentbank: Backup and restore tests 2020-05-13 09:35:58 +02:00
Amaia Anabitarte
3449e22683 MDL-68314 core_contentbank: Course content bank backup and restore 2020-05-13 09:35:58 +02:00
Andrew Nicols
29c5fafff5 MDL-66109 js: Fix Shifter linting issues 2020-05-11 11:07:49 +08:00
Andrew Nicols
7afd16ad84 MDL-66109 behat: Require newline at EOF
This change enables the gherkinlint rule to require a new line at the
end of the file. This change is in keeping with existing Moodle coding
style guidelines.
2020-05-11 11:07:49 +08:00
Eloy Lafuente (stronk7)
d9776bc02a Merge branch 'MDL-67499' of git://github.com/paulholden/moodle 2020-04-15 12:49:14 +02:00
Paul Holden
0c68ae88eb MDL-67499 restore: account for deleted user truncated email/username. 2020-04-06 12:09:48 +01:00
Eloy Lafuente (stronk7)
68ba708334 MDL-67499 restore: add 100% cov. to restore_dbops::precheck_user()
Supports multiple mails to be tested.

So we can perform changes to it and also some related stuff,
like delete_user() with confidence.
2020-04-06 11:48:27 +01:00
Tim Hunt
1dcd0d3499 MDL-68233 renderers/block: remove illegal uses of $PAGE and $OUTPUT 2020-03-29 15:34:26 +01:00
Paul Holden
5526870052 MDL-67731 backup: fix async restores in progress table listing. 2020-03-22 19:57:34 +00:00
Peter
74d95c7bf9 MDL-65724 core: Force restore to use the settings from the plan
When importing use the import settings.
2020-03-06 13:43:39 +08:00
Rossco Hellmans
383b0f95ab MDL-64310 backup: allow session to be released during backup/restore
Amended to fix a wrong call to backup_controller() constructor,
originally not passing USER->id
2020-01-14 23:54:42 +01:00
Eloy Lafuente (stronk7)
f2e7a54f2a Merge branch 'MDL-65649' of https://github.com/paulholden/moodle 2020-01-13 18:56:38 +01:00