490 Commits

Author SHA1 Message Date
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
Marina Glancy
b355a1c97c MDL-50851 core_question: use new tag API 2016-01-10 15:25:47 +08:00
Marina Glancy
74fa9f76dc MDL-50851 course: use new tag API 2016-01-10 15:25:47 +08:00
Damyon Wiese
3d0fff3a83 MDL-46455 restore: Add debug messages when log records cannot be mapped 2015-10-11 18:14:59 -07:00
Eloy Lafuente (stronk7)
ea6c56437a MDL-46455 restore: Implement restore of standard logstore
Using standard subplugin support, this commits implements
the restore of logstore subplugins in general and the
standard logstore is particular. Notes:

- TODO: Decide about these 2 pending issues:

1) Some logs are already created (events fired) by the restore process itself. Every time
   an API is used and it fires events... corresponding (and actual!)
   logs are created. We need to prevent restore to duplicate them (or,
   alternatively, stop firing events when restore is happening).

2) There are 2 pieces of information in the logs that, right now, can
   not be restored, because the process does not know enough to be able
   to remap that information to its new counterparts. We are talking
   about objectid and other columns. So we need to specify, in some way
   understandable by restore, to which existing mappings they correspond
   to.
2015-10-09 16:23:09 -07: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)
6a45e6b169 MDL-46455 restore: 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 restore_structure_step.

This commit implements the change in restore, covered with tests verifying
old, bc behavior and also new, general one.
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
Jun Pataleta
f1bfc8971f MDL-51250 course: Display the default section name
This patch makes the default section name appear in brackets
beside the 'Use default section name' checkbox.
2015-10-05 14:03:07 -05:00
sam marshall
27479b5cc9 MDL-51053 Restore: Static cache breaks unit tests 2015-08-11 14:07:38 +01:00
Eloy Lafuente (stronk7)
3950aa134f Merge branch 'wip-MDL-48239-master' of git://github.com/abgreeve/moodle 2015-07-02 05:42:08 +02:00
Adrian Greeve
4d4dcc2718 MDL-48239 gradebook: Calculated grades maxgrade now able to be set. 2015-07-02 11:13:25 +08:00
David Monllao
35af60da7e MDL-50569 backup: Missing get_target call 2015-06-30 10:26:18 +08:00
Frederic Massart
eff864e7eb MDL-50569 grades: Restore as merge always ignores minmaxtouse 2015-06-29 14:24:13 +08:00
Frederic Massart
cd4061ecd4 MDL-50569 grades: Handle minmaxtouse in backup/restore 2015-06-29 14:24:12 +08:00
Marina Glancy
fd36588fb6 MDL-49257 grades: apply freeze when restoring with contents deleting 2015-06-25 14:39:15 +08:00
Marina Glancy
156d048659 MDL-49257 grades: fix bugs with extra credit weights
When we adjust the weights in natural grading (setup screen), the extra credit items
should not depend on other overrides. If extra credit item's weight was overriden, it stays as it is.
Otherwise it is calculated as itemgrademax / totalgrademax (total excludes extra credit items)
2015-06-23 14:25:50 +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
David Monllao
1f619e8d60 Merge branch 'MDL-42449' of git://github.com/andrewhancox/moodle 2015-04-28 10:11:17 +01:00
Andrew Hancox
baba473b24 MDL-42449 backup: Fix for activity grade category
Retain grade category when restoring an activity into the course that
it came from
2015-04-24 13:59:18 +01:00
Russell Smith
f08d1044b4 MDL-49756 course: Add unit tests for section_options. 2015-04-11 07:40:47 +10:00
Dan Poltawski
c157a42a7b Merge branch 'MDL-49547' of git://github.com/timhunt/moodle 2015-03-31 14:43:48 +01:00
Dan Poltawski
0ec875745a Merge branch 'MDL-49645_master' of git://github.com/markn86/moodle 2015-03-31 13:28:19 +01:00
Marina Glancy
4012617fb9 MDL-47337 course: merge section options during restore 2015-03-27 08:50:49 +08:00
Mark Nelson
16dfc32633 MDL-49645 core_backup: fixed 'expirythreshold' setting not being saved 2015-03-26 16:37:58 -07:00
Tim Hunt
95ef9d8095 MDL-49547 question restore: avoid tag-related notices. 2015-03-26 15:31:36 +00:00
Eloy Lafuente (stronk7)
7962f73e51 MDL-49543 badges: minor tweaks
Fix restore to support old criteria not having descriptions.
Plus delete not-needed cast (now $params is always already array).
2015-03-25 01:37:33 +01: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
Eugene Venter
96e339cc58 MDL-49356 restore: handle course completion if still not defined
Before this patch course completion only was restored if, appart from
other conditions... we were restoring to new course, never to existing
one.

This relaxes a bit that condition in order to be able to restore to an
existing course not having any course completion setting defined, so no
conflict will happen ever.
2015-03-17 00:34:09 +01:00
Tim Price
91d10e7686 MDL-18177 backup: fixing PHPdocs errors 2015-02-20 11:45:23 +11:00
Tim Price
e1de40f7f7 MDL-18177 backup: adding PHPdocs blocks 2015-02-20 11:45:23 +11:00
Tim Price
d7891c83dd MDL-18177 backup: addressing coding standards 2015-02-20 11:45:23 +11:00
Matt Sammarco
5ef6f97f47 MDL-18177 availability: Excluding group members availability info
If setting was not enabled when backing up, exclude the availability
information of group members.
2015-02-20 11:45:22 +11:00
Matt Sammarco
868b086c4a MDL-18177 backup: Add backup option to include groups and groupings 2015-02-20 11:45:22 +11:00
Andrew Nicols
dd1adc419f Merge branch 'MDL-48644_restoreLegacyLogs' of https://github.com/moodlerooms/moodle 2015-01-05 14:30:56 +08:00
Aaron Barnes
1151210154 MDL-40097 completion: Apply robust role detection to samesite restores. 2015-01-05 10:30:01 +08: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
Mark Nielsen
362bc07063 MDL-48644 backup: Preserve log IP and time during restore 2014-12-18 11:30:28 -08:00
Joshua Johnston
7a6ca49af5 MDL-46651 Backup: Handle duplicate course completions during restore
Cron can cause duplicate completion records if triggered during a long
running restore process. If this is the case, replace the new record
with the record from the backup file
2014-12-11 16:00:18 -05:00
Dan Poltawski
e600e6ae50 Merge branch 'MDL-47323-enrol-plugin-backup' of https://github.com/mpetrowi/moodle 2014-12-09 22:29:37 +00:00
Sam Hemelryk
7594ed1e2a Merge branch 'MDL-40419-master-2nd' of git://github.com/FMCorz/moodle 2014-12-04 12:03:18 +00:00
Matt Petro
f61992951d MDL-47323 backup: added enrol plugin backup structure and annotation 2014-12-02 21:46:33 -05:00
Frederic Massart
dc8ee30eda MDL-40419 backup: Advanced comparison when restoring blocks in course 2014-11-27 15:28:51 +08: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
David Monllao
818262afa5 MDL-31500 backup: New unit test for front page backup/restore 2014-11-21 12:37:27 +08:00
Dan Poltawski
604090397a Merge branch 'wip-MDL-36240-master' of git://github.com/abgreeve/moodle 2014-11-17 13:30:57 +00:00
Adrian Greeve
d983ac6394 MDL-36240 backup: Activity calendar events backed up.
Activity calendar events can now be backed up and restored
when no user data is selected.
2014-11-17 09:18:00 +08:00
Sam Hemelryk
0d23255b89 Merge branch 'MDL-48179-master' of https://github.com/sammarshallou/moodle 2014-11-17 12:48:04 +13:00