799 Commits

Author SHA1 Message Date
Andrew Nicols
29c442c558 MDL-65646 core: Move component storage to json 2019-06-13 12:26:00 +08: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
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
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
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
Matt Porritt
2cd901a4e7 MDL-28505 Backup: Asynchronous backup and restore
This patch adds asynchronous backup and restore functionality
to Moodle. This is an optional feature and is not enabled by
default. It can be enabled by site administrators.
Asynchronous backup and restores are actioned by the Moodle
adhoc task API. The progress of backup and restores is
displayedin the Moodle UI.  Users can also be sent a message
when a backup or restore operation completes via the
Moodle messaging API.
2019-04-09 00:15:42 +00:00
Mathew May
5cac5fa428 MDL-64506 templates: BS2 m-x-x to BS4 mx-x 2019-04-03 19:47:11 +08:00
Simey Lameze
9bec0e7e74 MDL-65207 core: replace typos by actually 2019-04-01 08:49:18 +08:00
David Monllaó
e034670fac Merge branch 'MDL-62572-master' of git://github.com/damyon/moodle 2019-04-15 11:04:54 +02:00
Brendan Heywood
af368c1076 MDL-65321 backups: Only require minimal async backup libs if needed 2019-04-13 23:43:01 +10:00
Damyon Wiese
f10c22b691 MDL-62572 backup: Duplicating an activity
Don't apply admin defaults for import when using the duplicate function.
2019-04-12 14:04:40 +08:00
Sara Arjona
32c863f276 Merge branch 'MDL-63916-master' of git://github.com/damyon/moodle 2019-01-16 15:33:08 +01:00
Damyon Wiese
c85be29355 MDL-63916 backup: Do not display timestamp
Convert the date+time field to a userdate for display.
2018-12-12 12:18:32 +08:00
Damyon Wiese
dcb35b721c MDL-63920 backup: Email string improvement
Change from semicolon to colon in email.
2018-11-20 16:14:35 +08:00
Andrew Nicols
2986a99153 MDL-63596 backup: Add missing include 2018-11-10 10:46:38 +08:00
Damyon Wiese
f1f7d45bc7 MDL-63596 backup: Deal with controller types
For privacy requests, deal with all 3 controller types.
2018-11-09 17:55:23 +08:00
Mihail Geshoski
fc9bde4bc3 MDL-63596 core_backup: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-11-09 16:09:22 +08:00
Rohan Khajuria
e372389251 MDL-59227 course: add (copy) to duplicated modules 2018-09-17 15:14:12 -07:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
Eloy Lafuente (stronk7)
b76d8da4a6 Merge branch 'MDL-62581-master' of git://github.com/damyon/moodle 2018-08-09 00:09:12 +02:00
Eloy Lafuente (stronk7)
6760a7e3e9 Merge branch 'MDL-43334-master' of git://github.com/damyon/moodle 2018-08-08 00:11:16 +02:00
Damyon Wiese
2660e38faf MDL-62581 backup: CSS fixes
Sanitise the CSS for backup and restore. Main fixes are to sanitise the form-inline styles and set a fixed
width for the search forms within the restore form.
2018-07-23 16:19:30 +08:00
Shamim Rezaie
30dd3c5d0f MDL-62897 restore: Fix component name in get_string() 2018-07-23 14:37:40 +10:00
Andrew Nicols
bfeef10af0 Merge branch 'MDL-45851' of git://github.com/timhunt/moodle 2018-07-16 13:10:24 +08:00
Andrew Hancox
820f28c61b MDL-61578 backup: Added unit test for is_course_modified check. 2018-07-10 10:50:30 +08:00
Michael Hawkins
4b9c2928d4 MDL-61578 backup: Prevent backup logging triggering fresh backups.
Thanks to Renaat Debleu for their contribution to this solution.
2018-07-10 10:50:30 +08:00
Damyon Wiese
6fea9dc4b3 MDL-43334 backup: Fix cancel JS
The cancel button is a form element within a div that has the confirmcancel class. When we
accept a cancel modal, we should attempt to click the most specific form element of the
div, not the entire div.
2018-07-09 12:17:23 +08:00
Damyon Wiese
ddd7ff1827 MDL-43334 backup: Lanuage for cancel
Cancel backup buttons need clear lang strings.
2018-07-09 12:17:18 +08:00
Tim Hunt
3511063252 MDL-45851 restore: random questions must always be created
They are really a pointer from a particular quiz to a question category.
They should never be shared, because if they are, unexpected things
happend when they are edited.
2018-07-04 16:33:30 +01:00
Zig Tan
e689e4d446 MDL-58702 backup: Fix restoration of role mappings labels
Changes:
- Add logic to retrieve all the existing current roles.
- Apply the backup's role shortname by matching on the archetype.
- Added backup lang string 'undefinedrolemapping'.
2018-06-15 09:55:53 +08:00
Mark Nelson
0c34cc5a93 MDL-31443 core_backup: change review heading to 'Restore settings' 2018-06-13 17:49:38 +02:00
Luca Bösch
2e8491a5be MDL-31443 core_backup: revert changes to util/ui/renderer.php 2018-06-13 17:49:38 +02:00
Luca Bösch
f55b45e473 MDL-31443 backup: Title and cancel messages stating import and restore 2018-06-08 11:35:02 +02:00
Mark Nelson
8e24041287 MDL-62428 core: fix incorrect early return in privacy providers 2018-05-14 13:06:29 +08:00
Mark Nelson
0f41e8a2a1 MDL-62308 core_backup: implement privacy provider
The provider was added to 'backup/util/ui/' due to
Moodle's implementation of autoclass loading. See
fetch_subsystems() in lib/classes/component.php.
2018-05-09 22:48:07 +08:00
Andrew Nicols
6979cf56e2 Merge branch 'MDL-56511-master' of git://github.com/andrewnicols/moodle 2018-04-18 09:35:29 +08:00
Bas Brands
3ec69c2ece MDL-56511 theme_boost: Update to Bootstrap 4 stable
Behat fixes by David Monllao <davidm@moodle.com>
    - Blocks
    - Modals
    - Messaging styling
    - Breadcrumb
    - Pagination
    - Course & categories management
2018-04-18 09:31:53 +08:00
Matteo Scaramuccia
ef844148a9 MDL-60923 backup: Added $CFG->backuptempdir
The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.

Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
2018-04-16 23:50:28 +02:00
Zig Tan
ff70e84941 MDL-39060 backup: fix typo backup destroy() function 2018-03-26 09:25:55 +08:00
Shamim Rezaie
8df402e401 MDL-61132 Questions: Adapt logic on backup/restore
Modifying backup/restore to adapt with "Top" categories.
2018-02-05 11:58:57 +11:00
Andrew Nicols
61f56fd5f9 Merge branch 'MDL-43648_m35v2' of https://github.com/sbourget/moodle 2018-01-09 11:43:33 +08:00