2787 Commits

Author SHA1 Message Date
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
Damyon Wiese
a1bda6b152 MDL-60851 backup: Sanitise setting dependencies
The only different between each setting dependency type is the evaluation of the condition,
and the mform js validation arguments - so that should be the only thing that is extended
by each subclass.
2019-05-01 08:49:35 +08:00
Damyon Wiese
81cbb5b4ef MDL-60851 backup: Fix undefined $value 2019-05-01 08:49:35 +08:00
Damyon Wiese
a383911cfa MDL-60851 backup: More unit tests for dependencies 2019-05-01 08:49:35 +08:00
Sara Arjona
bef6805656 Merge branch 'MDL-64702-master' of git://github.com/damyon/moodle 2019-04-29 08:34:21 +02:00
David Monllaó
03876f0b89 Merge branch 'MDL-65207-master' of git://github.com/lameze/moodle 2019-04-24 17:52:10 +02:00
David Monllaó
45c8b226be Merge branch 'MDL-64782-master' of git://github.com/rezaies/moodle 2019-04-24 17:37:45 +02:00
Adrian Greeve
4962446a44 Merge branch 'MDL-65308' of git://github.com/stronk7/moodle 2019-04-24 09:27:07 +08:00
Shamim Rezaie
7a2e7b29a0 MDL-64782 core_backup: Performance improvement 2019-04-23 17:01:48 +10:00
Damyon Wiese
b3337bd5a4 MDL-64702 badges: Add missing data to backup
Backup and restore of badges is missing data:
* alignments
* endorsement

Also added to "clone" (duplicate a badge).
2019-04-23 11:14:00 +08:00
Eloy Lafuente (stronk7)
0b9d7d93f8 MDL-65308 core: change a couple of unsafe preg_quote() cases
With PHP 7.3, the hash (#) is being escaped by preg_quote().

While normally that doesnt have much impact and normal operations
continue working perfectly... when the results of the function are
used to match against the same string... they don't match anymore.

Have found a couple of there double-uses in core and this
commit fixes them. Covered with tests.
2019-04-16 01:40:47 +02:00