Commit Graph

192 Commits

Author SHA1 Message Date
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
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
David Castro
cc179d9641 MDL-65008 question: Query enhancement.
Adding core_question as an additional filter to the tag backup.
2019-03-08 16:35:41 -05:00
Daniel Neis Araujo
5af9aa6341 MDL-57898 core_course: backup/restore support for course custom fields
This commit is part of work on Custom fields API,
to minimize commit history in moodle core the work of a team of developers was split
into several commits with different authors but the authorship of individual
lines of code may be different from the commit author.
2019-01-18 14:28:24 +01:00
Mark Nelson
80b6fb7a79 MDL-27520 core_grades: make constant names clearer
Also using them in more locations.
2018-10-17 15:57:27 +08:00
Damyon Wiese
dd882ba035 MDL-27520 backup: Backup for feedback files 2018-10-17 13:15:49 +08:00
John Beedell
6189fda47f MDL-62708 question: Add idnumbers to question and question category 2018-09-21 12:26:24 +01:00
Michael Hawkins
ef4e04ee26 MDL-37624 calendar: Added location support 2018-06-29 10:46:54 +08:00
Shamim Rezaie
06d7352a0a MDL-61464 Backup: Include contextid for questuin tags 2018-03-23 14:19:19 +11: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
Ankit Agarwal
abca33beb0 MDL-58906 restore: Do not backup/restore action events 2017-07-24 11:17:54 +05:30
sam marshall
557554f99f MDL-58957 Global search: Add time fields to block_instances 2017-06-29 15:14:47 +01:00
Mark Nelson
b75ff47441 MDL-55548 backup: changes after review
1) There is no need to store the 'timemodified' value of
the section when backing up a course module, they do
not refer to the same time.
2) When creating a new course section during restore use
the current time.
3) Added timemodified value to more places when updating
the 'course_sections' table.
2017-06-12 15:52:54 +08:00
Devang Gaur
4ddf7c6025 MDL-55548 course: added timemodified field to course_sections table 2017-06-12 15:52:53 +08:00
Ryan Wyllie
a1ded17074 MDL-58822 backup: backup and restore new event columns 2017-05-09 05:48:40 +00:00
Ryan Wyllie
9e452e35d0 MDL-58822 backup: backup and restore user override events 2017-05-09 05:48:40 +00:00
Marina Glancy
7f53e8aa22 MDL-58267 completion: allow to set default activity completion
Part of MDL-58138 epic
2017-04-19 08:54:35 +08:00
Marina Glancy
1091687ac2 MDL-57769 backup: support removed 'numsections' in backup/restore 2017-03-30 08:26:17 +08:00
Marina Glancy
8341055eb4 MDL-4782 course: Allow activities in the "stealth" mode
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
2017-02-14 16:38:05 +08:00
Daniel Neis Araujo
fbcdb0d710 MDL-22078 course: add end date 2016-10-03 09:51:36 +08:00
Frederic Massart
2a64b641e6 MDL-54567 backup: Process the calculations_freeze item upon restore 2016-05-30 13:22:03 +08:00
Jun Pataleta
45b9207d7e MDL-53974 backup: Add option to backup course competencies 2016-05-06 09:27:31 +08:00
Frederic Massart
e9114a9ed4 MDL-53716 competency: Backup and restore course competency user data 2016-04-28 18:41:30 +08:00
Frederic Massart
8417c3a620 MDL-53700 competency: Migrating backup logic to core 2016-04-18 11:05:59 +08:00
Frederic Massart
a495d1a18b MDL-51858 backup: Support admin tools in course and module backups 2016-04-18 10:58:44 +08:00
Nadav Kavalerchik
dffcf46f43 MDL-52252 Tags: Add tags to modules (Resources and Activities) 2016-03-09 14:19:47 +08:00
Eloy Lafuente (stronk7)
73c2a35420 MDL-46455 backup: Implement backup of standard logstore
Using standard subplugin support, this commit implements
the backup of logstore subplugins in general and the
standard logstore in particular. Notes:

- Uses a custom final element (base64_encode_final_element) to
  support the storage of serialized 'other' information in logs.
- Organization: Instead of directly extending backup_subplugin,
  every logstore extends backup_tool_log_logstore_subplugin just
  in case any shared code is needed in the future.
- Implements both course and activity logs, sharing the structure
  completely (both are based in contextid to pick the target
  information, from database or whatever other logstores use).
2015-10-09 16:23:09 -07:00
Eloy Lafuente (stronk7)
ba66edd074 MDL-46455 backup: Extend support for subplugins to any plugin.
In order to implement the backup and restore of log stores, that
are created as subplugins of the tool_log plugin , we need to
extend subplugins support from activities to virtually any plugin.

Basically that implies moving the add_subplugin_structure() method from
its current, restricted, activity level to general backup_structure_step.

This commit implements the change in backup, covered with tests verifying
old, bc behavior and also new, general one.
2015-10-09 16:23:09 -07:00
Frederic Massart
cd4061ecd4 MDL-50569 grades: Handle minmaxtouse in backup/restore 2015-06-29 14:24:12 +08:00
Marina Glancy
deb3d5ed00 MDL-49257 grades: introduce calculation freeze
In order to prevent changes in the existing grades when we fix bugs
we are introducing the gradebook code versioning. Each course may
"freeze" the code version to the older date. Freezing is usually done
during upgrade or restore and can be removed by the teacher by pressing
the button and accepting potential grade changes. There is no visible
setting and not possible to change the version back manually.

See MDL-50432 and MDL-50522
2015-06-23 14:25:47 +08:00
Mark Nelson
16dfc32633 MDL-49645 core_backup: fixed 'expirythreshold' setting not being saved 2015-03-26 16:37:58 -07:00
Yuliya Bozhko
fffeb03fe7 MDL-49543 badges: Add decription format and backup/restore
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-24 09:22:47 +13:00
Tim Price
d7891c83dd MDL-18177 backup: addressing coding standards 2015-02-20 11:45:23 +11:00
Matt Sammarco
868b086c4a MDL-18177 backup: Add backup option to include groups and groupings 2015-02-20 11:45:22 +11:00
Adrian Greeve
a43f43e2fa MDL-40097 completion: Update of code to meet guidlines. 2015-01-05 10:14:03 +08:00
Aaron Barnes
129e786cf4 MDL-40097 completion: Make restoring grade criteria more robust 2015-01-05 10:14:03 +08:00
Matt Petro
f61992951d MDL-47323 backup: added enrol plugin backup structure and annotation 2014-12-02 21:46:33 -05:00
David Monllao
03c39daad8 MDL-31500 backup: Allow front page backup/restore
Removes restore on front page restrictions and allows
front page modules duplication.
2014-11-21 14:55:09 +08:00
Sam Hemelryk
0d23255b89 Merge branch 'MDL-48179-master' of https://github.com/sammarshallou/moodle 2014-11-17 12:48:04 +13:00
sam marshall
94b084fb02 MDL-48179 Backup progress: Can time out when compressing large backup 2014-11-14 18:29:30 +00:00
Tim Hunt
ba145a9e4e MDL-47590 question backup: include response file only with userdata 2014-11-14 16:21:18 +00:00
Damyon Wiese
47d6e6a7d3 MDL-47503 Grades: Completely remove aggregationsubcats
This setting is not compatible with combinations of aggregation methods
and the ways in which it does and does not work are not documented. It
was voted to remove it completely by the gradebook workshop, so I have
completely removed it and added a warning for all affected courses + restored
backups.
2014-10-20 12:03:18 +08:00
Frederic Massart
b4087c31bc MDL-47254 core_grades: Backup aggregationcoef2 and weightoverride
Part of: MDL-46576
2014-10-03 13:54:38 +08:00
Damyon Wiese
8836ef8aa2 MDL-46139 Grades: Add new grade_grades aggregation columns to backup/restore. 2014-10-03 13:48:55 +08:00
Dan Poltawski
a3b93be8f8 Merge branch 'MDL-46696-master' of git://github.com/FMCorz/moodle 2014-09-08 16:23:59 +01:00
sam marshall
dea081af23 MDL-44725 Availability: Replace groupmembersonly - backup (3)
Change backup and restore to not include the field, and to cope
correctly with 2.6 (and before) and 2.7 backups.
2014-09-02 13:03:11 +01:00
Frederic Massart
167eb0335b MDL-46696 backup: Include grade history in backups 2014-09-01 17:29:24 +08:00
Eric Merrill
1f3b23569e MDL-45714 backup: Less aggressive removal of old backup dirs
The old 4 hour standard was too aggressive and can cause backup files
to be removed while they were still in use. Now the same as cron,
1 week.
2014-06-02 21:47:04 -04:00
Dan Poltawski
452ef53428 MDL-45205 backup: avoid oracle incompatible query
Instead of aliasing column name with sql, use the backup API.
2014-04-21 20:36:52 +08:00