Commit graph

2833 commits

Author SHA1 Message Date
Sara Arjona
3f5477f8a0 Merge branch 'MDL-71136_39' of https://github.com/TomoTsuyuki/moodle into MOODLE_39_STABLE 2021-04-22 13:56:55 +02:00
Amaia Anabitarte
57d5be04f8 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:37 +02:00
Tomo Tsuyuki
c34c6a75df MDL-71136 backup: Fix moodle_exception path. 2021-03-30 10:55:38 +11:00
Mihail Geshoski
47d87f7243 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:33:57 +08:00
Daniel Kristian Steffensen
8b16724fef MDL-43697 backup: Archived badges are restored during course restore 2021-02-19 15:49:33 +01:00
Mikhail Golenkov
f4024153e1 MDL-70752 restore: Fix remote file recovery 2021-02-04 19:23:23 +11:00
Paul Holden
ede7d22dc7 MDL-70422 restore: fix for undefined question answer ordering in test. 2020-12-07 10:15:55 +00:00
Mihail Geshoski
5d0b569ba1 MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:27:34 +01:00
Peter Dias
498c54d1de MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:27:34 +01:00
Paul Holden
d16aa74359 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:10:09 +01:00
Adrian Perez
7e52e95d8d MDL-69156 course_copy: set defaults for idnumber when not permitted 2020-10-29 13:52:48 +01:00
Luca Bösch
a22b74872c MDL-69995 backup: padding before activity icons. 2020-10-25 02:04:52 +02:00
Sara Arjona
856c31cc32 Merge branch 'MDL-69900-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-10-19 13:42:13 +02:00
Jake Dallimore
6589c3cdd6 Merge branch 'MOODLE_39_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-10-16 11:52:58 +08:00
Stephen Bourget
5cb1cf7695 MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:06:37 +08:00
Mikhail Golenkov
f3db3d30e0 MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:36:42 +11:00
Shamim Rezaie
d54b3447e6 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:21:50 +10:00
Paul Holden
4ff5d5ef17 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:13 +01:00
Eloy Lafuente (stronk7)
3523edfd90 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 16:24:57 +02:00
Marina Glancy
2d7f517b5b MDL-69381 core_backup: make progressbar selector more specific 2020-07-31 13:30:07 +02:00
Andrew Nicols
bf9c4ab68a MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 16:46:51 +08:00
Mark Johnson
762e8afa6f MDL-67671 backup: Fix modname display on backup form 2020-07-09 10:11:52 +01: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
Bas Brands
40ea67534c MDL-66999 theme_boost: @extend remove extends for tables 2019-12-12 11:27:56 +01:00
Paul Holden
a679ae31a5 MDL-65649 backup: ensure valid course URL for async mode. 2019-12-09 23:34:18 +00:00
Eloy Lafuente (stronk7)
97d5eeda32 Merge branch 'MDL-41958-master' of git://github.com/lucaboesch/moodle 2019-12-04 23:24:46 +01:00
John Yao
d0734df404 MDL-65729 Backup: Split individual backups into ad-hoc tasks
* refactor run automated backup
* new backup status of Queued
* adhoc task for backing up a course
* course locking for course backup adhoc task
* use Moodle locking instead of custom locking for run automated backup task
* add unit tests to extracted methods
2019-12-04 15:10:23 +11:00
Luca Bösch
292b987c5c MDL-41958 import: Constistently showing progress steps. 2019-11-30 10:07:56 +01:00
Eloy Lafuente (stronk7)
953a5844ef MDL-67283 backup: Bump release to 3.9 2019-11-17 11:41:30 +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
cescobedo
e24f4a2ecd MDL-66593 core_backup: Replace h5p/embed.php url for H5PEMBED@$ 2019-10-30 06:46:35 +01:00
Eloy Lafuente (stronk7)
88d29a1bb8 MDL-66965 core: php74 curly 2 square braces changes
Note this only modified core files, still there are a lot
of curly brace uses but all them are within 3rd part
libraries and will be handled apart.
2019-10-25 17:41:10 +02:00