2687 Commits

Author SHA1 Message Date
David Monllao
a83b43a118 Merge branch 'MDL-62308_master' of git://github.com/markn86/moodle 2018-05-10 09:17:30 +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
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02: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
Eric Merrill
815c44ce07 MDL-61913 restore: Protect against blocks that aren't being created 2018-04-11 00:50:27 +02:00
Claude Vervoort
c02324d96a MDL-60416 mod_lti: Introduced LTI Advantage
A huge thanks goes to 'Diego del Blanco' and
'Chris Lawson' for contributing much of their
code and time to this project, and to Cengage
for sponsoring it.

Much appreciated!
2018-04-09 12:08:35 +08:00
Andrew Nicols
682282de55 Merge branch 'MDL-61464-master' of git://github.com/rezaies/moodle 2018-04-05 09:44:05 +08:00
Ngo Nghia
5a8d683fb2 MDL-25617 backup: backup/restore using extra_question_fields 2018-03-28 18:16:34 +02:00
Zig Tan
ff70e84941 MDL-39060 backup: fix typo backup destroy() function 2018-03-26 09:25:55 +08:00
Shamim Rezaie
70ec79f1ba MDL-61464 Backup: Restore question tags into the correct context 2018-03-23 14:19:19 +11:00
Shamim Rezaie
06d7352a0a MDL-61464 Backup: Include contextid for questuin tags 2018-03-23 14:19:19 +11:00
Shamim Rezaie
6bbb7ed570 MDL-61464 Questions: Improved top level category handling in restore
Use question_get_top_category() instead of directly inserting into DB when
parent category is 0. This is to make sure we are not ending up with having
multiple top level question categories for a single context.
2018-03-23 14:19:19 +11:00
Shamim Rezaie
c1d31e42ba MDL-61526 Questions: phpunit test to test restore from 3.4 and 3.5 2018-03-06 01:43:32 +11:00
Shamim Rezaie
e9897ee6ef MDL-61526 Questions: Add 2 backup fixtures from 3.4 and 3.5 2018-03-06 01:41:45 +11:00
Shamim Rezaie
0f80f793df MDL-61526 Questions: Fix creation of multiple TOP question categories
Backup files that are made from Moodle 3.5 already contain TOP categories.
There is no need to create an additional TOP category for them.
2018-03-05 15:44:29 +11:00
David Monllao
d3e54578ea Merge branch 'MDL-52811_prevent_forcelang' of git://github.com/davosmith/moodle 2018-02-06 08:00:11 +01:00
Davo Smith
4ee8ec310a MDL-52811 course: moodle/course:setforcedlanguage integration fixes 2018-02-05 13:20:42 +00: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
Davo Smith
4a9624af21 MDL-52811 course: fix unit tests broken by setforcedlanguage 2018-02-01 17:07:23 +00:00
Davo Smith
1433a07881 MDL-52811 course: prevent setting of 'lang' without permission 2018-02-01 17:07:12 +00:00
Andrew Nicols
61f56fd5f9 Merge branch 'MDL-43648_m35v2' of https://github.com/sbourget/moodle 2018-01-09 11:43:33 +08:00
Zig Tan
85ba9528c9 MDL-33886 backup: Add backup filename length < 255 char validation 2017-12-22 13:03:08 +08:00
Jun Pataleta
a8dffa2d03 Merge branch 'MDL-50666-master' of https://github.com/junpataleta/moodle 2017-12-20 12:49:28 +13:00
Andrew Hancox
64cd459648 MDL-50666 core: Rename allow_ACTION to core_role_set_ACTION_allowed 2017-12-19 13:53:23 +13:00
Zig Tan
e0d0f411cf MDL-54967 backup: Fix IMS CC import URL decoding for XML format
HTML encoding special characters to avoid XML compatibility issues during
Course backup restoration and avoid double encoding.
2017-12-15 09:19:31 +08:00
Stephen Bourget
57422d7158 MDL-43648 course: Allow start /end dates to have times 2017-12-14 19:48:31 -05:00
sam marshall
a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
Marina Glancy
dc9353a07b MDL-27886 backup: When setting is unlocked set it to original value 2017-11-23 12:21:03 +08:00
Damyon Wiese
18c02e9f28 Merge branch 'MDL-27886-master' of git://github.com/tobiasreischmann/moodle 2017-11-20 13:25:37 +08:00
Damyon Wiese
294f1dbaa3 Merge branch 'MDL-60693-backup-multilang-activities' of https://github.com/lucaboesch/moodle 2017-11-13 14:33:57 +08:00
Eloy Lafuente (stronk7)
bd8a809598 MDL-60783 backup: Bump release to 3.5 2017-11-12 17:56:17 +01:00
Luca Bösch
9ae6cd775a MDL-60693 backup: Use multilang with course activities
On backup and restore, activities are shown after passing format_string,
supporting multilang.
2017-11-12 14:58:18 +01:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
Damyon Wiese
246698e779 MDL-60615 imscc: string to array fix
Sloppy typing in the imscc converter is causing errors on php7.1

Variable is initialised as a string and then used as an array.
2017-11-09 15:05:36 +08:00
Tobias Reischmann
34eb2faa0d MDL-27886 backup: Decision if a setting is fixed based on level
Previously, when a during backup/restore the "Schema"-stage is loaded,
some settings are fixed if they are LOCKED_BY_HIERARCHY. However, user
data fields of activities can be locked, when the section they are
contained in has user data set to false. When this setting is changed on
the same screen, the fixed setting of the activity can not be "unfixed"
by javascript.

This patch adds a settings-level to the call of is_changeable. With this
only those dependency_settings are considered, which belong to parent
settings, which are not changeable on the current stage.
2017-11-06 12:07:20 +01:00
Tobias Reischmann
8c067bb86d MDL-27886 backup: Enabled unlocking of backup settings
The function is_locked was changed to determine only, if the
dependency_setting want's the dependent setting to be locked.
In the previous version, is_locked did not only check, if the
dependency_setting want's the setting to be locked, but also if the
setting was already locked. A recursive call to the status of the
dependent setting leaded to problems, when unlocking locked settings.

Also the PHPDOC of the is_locked was adjusted to coincide with the current
usage in backup_ui_settings->is_changeable() and
base_setting->set_status(). In both functions all dependency_settings of
a setting are iterated to check if this setting should be or is LOCKED_BY_HIERARCHY.
The actual state of the setting was therefore either checked beforehand
or is not interesting, since the question is, if it shall be changed.
2017-11-06 12:07:20 +01:00
Tobias Reischmann
77a4d33755 MDL-27886 backup: Added behat tests for user data settings
This new test defines different combinations of global and local user
data settings during the restore process and tests that global defaults
can be overriden.
2017-11-06 12:07:20 +01:00
Eloy Lafuente (stronk7)
00e557a15d MDL-36580 backup: General support for decrypted contents in restore
- Uses site generated (on backup) key.
- Can be applied potentially everywhere in the restore process.
- Covered with unit tests.
- Authentication / integrity aware so can be used between any 2 servers
  (just requires matching key).
2017-10-19 10:11:47 +02:00
Eloy Lafuente (stronk7)
872e957415 MDL-36580 backup: General support for encrypted contents in backups
- Built using standard backup custom fields.
- Can be applied potentially everywhere.
- Automatically addded 'encrypted' attribute.
- Defaults to site generated key.
- Enforces key robutness / provides authentication (hmac integrity)
- Covered with unit tests.
2017-10-19 10:11:39 +02:00
Marina Glancy
78da366b56 MDL-60281 general: various strict corrections for PHP7.2
- count() can only be called on arrays or Countable, it can not be called on null
- recordset is neither so iterator_count() should be used
- instanceof or get_class() can not be applied to non-objects
- class methods must have the same arguments as methods in parent class
2017-10-16 09:37:20 +08:00
Andrew Nicols
77b2662ffb MDL-55356 backup: Correct variable name 2017-10-12 14:53:16 +08:00
Andrew Nicols
afc8d59c35 MDL-55356 backup: Check setting exists before checking value 2017-10-12 11:37:05 +08:00
Andrew Nicols
e61ad18e70 Merge branch 'MDL-55356-master' of https://github.com/sammarshallou/moodle 2017-10-12 11:28:04 +08:00
sam marshall
6893ee4a49 MDL-55356 core_search: Restore now requests search indexing
When restoring into a new course, it will queue a request to index
the whole course; when adding to existing, it will queue a request
to index the specific (a) activities and (b) blocks that were
restored.
2017-10-11 17:17:07 +01:00
Jake Dallimore
5bbea7338d MDL-35429 backup: Only show relevant actions for automated backups
- Users without permission to download or restore won't see the
respective links.
- The 'Manage backup files' button for the 'automated' backup filearea
now requires the same permissions as downloading does for this filearea,
those being 'restore:userinfo' and 'backup:downloadfile'.
2017-10-10 12:30:57 +08:00
Jake Dallimore
f2faf9fae6 MDL-35429 restore: capability clarification for automated backups
- added relevant cap check on restorefile.php to improve the error
message when attempting to restore automated backups. This cap is
already responsible for controlling restores from automated areas.
- Restored the 'viewautomatedfilearea' capabilities original lang
string.
2017-10-09 10:29:07 +08:00
Matt Petro
f5ea99bf6e MDL-60121 enrol: Fix enrol plugin backup
Allow more than one enrol plugin to add backup structure.
2017-09-14 10:39:09 -04:00
David Monllao
44e1928532 Merge branch 'wip-MDL-59768-master' of git://github.com/marinaglancy/moodle 2017-09-07 10:50:16 +02:00