2947 Commits

Author SHA1 Message Date
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
Matt Porritt
698222f6cb MDL-66225 Backup: fix irrecoverable state
Fix condition where if an asynchronous backup
completes via the UI and the user refreshes the
page a new backup was created with a mismatched
backup id.
This caused a permanently failing ad-hoc task
and blocked further backups for that course.
2019-10-23 04:20:00 +00:00
Andrew Nicols
d31b5c431d Merge branch 'MDL-66753-master' of git://github.com/abias/moodle 2019-10-09 12:00:57 +08:00
Alexander Bias
1ce19cc3ed MDL-66753 blocks: Remove references in core to block_participants 2019-10-07 08:34:20 +02:00
Tim Hunt
c7a6488fad MDL-66743 backup: reports should be able to backup module-level data 2019-09-23 19:24:33 +01:00
Tim Hunt
e05d99b94f MDL-66709 backup: move question attempt data helpers to a trait
This lets plugins other than activity modules backup and restore
question attempt data.

The old backup_questions_activity_structure_step and
restore_questions_activity_structure_step base classes still exist
and work exactly the same way they did before (because they use the
trait) so this change is completely backwards compatible.

To make this work fully, a few other things in the code had to be tweaked:

* Adding restore path elements had to consider the possibility of grouped
  parents in more places.

* I needed to add protected get_task() to the restore_plugin class.
  I don't think that is a problem.

* In the restore trait, the process_question_... methods needed to be
  changed to public for some reasons to do with PHP traits that I don't
  fully understand. However, I don't think this change is a problem.

* The way question_usage restore got the new contextid had to be changed
  (or it did not work in activity contexts), but the new code looks like
  a better way to do it anyway so that is good.
2019-09-23 19:24:32 +01:00
Tim Hunt
a6a4034b38 MDL-66709 backup: improve some PHPdoc type hints
I hope these are right. They seem to be, and made the autocomplete
better in some backup/restore code I was writing.
2019-09-23 19:21:09 +01:00
Eloy Lafuente (stronk7)
9533156775 Merge branch 'MDL-66072-master-3' of git://github.com/peterRd/moodle 2019-09-05 02:48:00 +02:00
Eloy Lafuente (stronk7)
1e248a654e Merge branch 'MDL-66560-master' of https://github.com/lucaboesch/moodle 2019-09-05 02:15:15 +02:00
Peter
020bad738a MDL-66072 core: Remove course sharing and related capabilities 2019-09-04 07:09:05 +08:00
Peter
1d6f041a2e MDL-66120 block_community: Remove community block and related caps
With the sunsetting of moodle.net, the community block will no longer
be functional, so removing the block and related caps
2019-09-03 09:30:50 +08:00
Luca Bösch
5b48fefa56 MDL-66560 import: Format course search UI elements. 2019-08-30 11:25:17 +02:00
Mark Nelson
56e28c3bf1 MDL-35773 core_backup: controller has full responsibility for files 2019-07-26 17:00:40 +08:00
Mark Nelson
2124100194 MDL-35773 core_backup: ensure we restore with new itemid 2019-07-26 11:59:57 +08:00
Mark Nelson
7c1a42adb4 MDL-35773 core_backup: only include files when necessary 2019-07-26 11:59:56 +08:00
Mark Nelson
420384ae36 MDL-35773 core_backup: removed unnecessary set_samesite_notification() 2019-07-26 11:59:56 +08:00
Mark Nelson
8e83e54815 MDL-35773 core_backup: removed introduction of 'set_mode' 2019-07-26 11:59:56 +08:00
Mark Nelson
94c71056a3 MDL-35773 core_backup: use existing API to recover files 2019-07-26 11:59:56 +08:00
Matt Porritt
d7e4481e98 MDL-35773 Backup: API should have option to not backup files
Allow both UI and automated backups to be created without
including files.  Instead include only file references.
This is essentially implementing "SAMESITE" to backup files
instead of only for import and export functionality.
A new backup setting to include files (defaults to yes)
has been included.

The restore process will also look for and attempt to
restore files from the trashdir as part of restoring
backups.  Additionally to support this process the
ammount of time files are kept in trashdir before they
are cleaned up via cron is also adjustable via admin
setting.
2019-07-26 11:59:56 +08:00
Jake Dallimore
506fc5178b Merge branch 'MDL-65858_master' of git://github.com/markn86/moodle 2019-07-25 14:51:54 +08:00
Adrian Greeve
a35b6a775a Merge branch 'MDL-66021-master' of git://github.com/peterRd/moodle 2019-07-25 14:41:14 +08:00
Mark Nelson
e1c484c745 MDL-65858 core_backup: increase the delay with each fail 2019-07-22 13:20:49 +08:00
Matt Porritt
133c131fc0 MDL-65858 core_backup: added timeout to ajax calls 2019-07-22 13:20:06 +08:00
Matt Porritt
00d214bca2 MDL-65858 backup: Improve behaviour of ajax calls
When a backup (or restore) is in progress and the user
has another tab open that is taking time to generate and
holding the session lock, a condition arises where
multiple ajax calls are "queued" because the long page
is holding the session lock. When this lock is released,
the queued ajax requests complete.  However, as the ajax
requests also lock this can block other requests until they
complete. This patch decreases the frequency of ajax calls
and stops them from holding the session lock.
2019-07-22 12:54:10 +08:00
Ryan Wyllie
195ea4480b MDL-62497 javascript: build AMD modules with new transpiler 2019-07-19 14:12:49 +08:00
Peter
ee1062686c MDL-66021 backup: Clear course if required before restore 2019-07-15 13:16:50 +08:00
Eloy Lafuente (stronk7)
21406f66e0 Merge branch 'MDL-65646-master' of git://github.com/andrewnicols/moodle 2019-06-20 00:29:56 +02:00
Andrew Nicols
29c442c558 MDL-65646 core: Move component storage to json 2019-06-13 12:26:00 +08:00
Dmitrii Metelkin
657cc33be9 MDL-65622 core: add grade_item_created event 2019-06-07 07:38:41 +10:00
Eloy Lafuente (stronk7)
11cdea3fad MDL-65201 backup: amend tests to apply for the final agreed criteria
backup nextstarttime ASC
course timemodified DESC
2019-06-06 11:16:01 +02:00
Eloy Lafuente (stronk7)
bcd4862e84 MDL-65201 backup: fix wrong sorting that was missed on integration 2019-06-06 10:08:02 +02:00
Matt Porritt
c2716719a6 MDL-65201 Backup: Automated backup course ordering
This patch adds sort ordering to the way courses are
automatically backed up. It sets the following preference:

Backup courses that do not have an entry in backup_courses first,
as they are likely new and never been backed up.
Backup courses that have the oldest next start time in backup_courses.
Give preference to most recently modified courses over other courses.
2019-06-04 23:09:57 +00:00
Dmitrii Metelkin
2c7636490a MDL-65326 backup: check caps exist before assigning 2019-05-28 11:09:51 +10:00
Eloy Lafuente (stronk7)
795304597f MDL-65643 backup: Bump release to 3.8 2019-05-19 21:11: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
Eloy Lafuente (stronk7)
3c62200fa0 MDL-65498 backup: Add a couple of missing destroy() calls
Specially noticeable under Windows, where some resources/files
are kept open/busy/locked, causing all sort of problems, easily
detectable in phpunit resets.
2019-05-06 00:01:55 +02:00
Damyon Wiese
172117618b MDL-60851 backup: coding style fixes 2019-05-01 08:49:35 +08:00