531 Commits

Author SHA1 Message Date
Jun Pataleta
8cc4e1c0cd Merge branch 'MDL-44961-master' of git://github.com/ankitagarwal/moodle 2017-06-19 16:24:51 +08:00
Ankit Agarwal
a4beef4e31 MDL-44961 logs: Keep log dates constant during restore 2017-06-14 15:20:58 +05:30
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
Andrew Nicols
44dd6d95e2 Merge branch 'MDL-59011-master' of git://github.com/ankitagarwal/moodle 2017-05-24 14:18:34 +08:00
Ankit Agarwal
23cef8753b MDL-59011 restore: Check for userride only for activity events 2017-05-24 09:58:46 +05:30
Dmitrii Metelkin
597c6f2a09 MDL-58811 backup: fix an extra slash on restore for the legacy files 2017-05-16 14:35:16 +10:00
Jake Dallimore
c0af95d789 MDL-58904 restore: temp fix for event priority notices 2017-05-12 15:10:23 +08:00
Eloy Lafuente (stronk7)
f86e8699b9 MDL-58904 backup: old backups do not contain new fields
Hence we need to apply DB defaults for them when missing:

  - type = 0
  - timesort = null
2017-05-11 19:55:21 +02: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
Mark Nelson
b0f0200e4f MDL-56251 backup: trigger course_section_created/updated events 2017-05-05 12:14:55 +08:00
Andrew Nicols
442908a100 Merge branch 'MDL-58138-master-v2' of git://github.com/snake/moodle 2017-04-19 11:53:40 +08:00
Jake Dallimore
273d310601 MDL-58138 completion: Fixes for a number of small issues. 2017-04-19 11:41:57 +08: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
Dan Poltawski
bdc70bbffd MDL-58625 competency restore: avoid use of magic gettter
These were deprecated when persistents moved to core.
2017-04-18 10:43:05 +01:00
Marina Glancy
1091687ac2 MDL-57769 backup: support removed 'numsections' in backup/restore 2017-03-30 08:26:17 +08:00
Dan Poltawski
48f5c05019 Merge branch 'wip-MDL-34859-master' of git://github.com/marinaglancy/moodle 2017-03-20 07:54:22 +00:00
Marina Glancy
44e86fb3d5 MDL-34859 backup: add restore defaults 2017-03-20 14:59:45 +08:00
Damyon Wiese
3e6adcd69c MDL-40759 icons: Rename activity_icon
image_icon is a better name because there are some valid uses for these other than for activity icons.

E.g. Old JS code that is not worth re-writing.
2017-03-17 15:52:18 +08:00
Damyon Wiese
c2dde7eebc MDL-40759 icons: Split pix_icon from activity_icon
Activity icons always use the standard icon renderer.
2017-03-17 15:51:29 +08:00
Marina Glancy
92253b15b7 MDL-40838 backup: restore enrolment methods without users 2017-02-20 12:08:35 +08:00
Eloy Lafuente (stronk7)
bad6e880b2 Merge branch 'MDL-53991_m33v4' of https://github.com/sbourget/moodle 2017-02-14 18:12:39 +01: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
Stephen Bourget
f8dad7374c MDL-53991 calendar: fix repeating events on course import 2017-01-12 09:06:47 -05:00
Jake Dallimore
fe9864f488 MDL-56972 backup: fix question category stamp duplicates during restore
To kerb future stamp duplication, MDL-54864 added a unique index to the
question_categories table (stamp, contextid) and added an upgrade step
to fix existing duplicate stamps. It missed the case where a course with
duplicate stamps in the same context is directly restored into moodle
3.1, causing index clashes. This issue provides a fix for that.
2016-11-18 11:15:02 +08:00
David Monllao
8643c576c7 MDL-22078 course: Complete proposed patch
- New site setting to define the default course duration (used to set
  the default end date for some course formats)
- End date setting out of restore
- Fix tool_uploadcourse
- Other fixes here and there
2016-10-05 12:31:05 +08:00
David Monllao
9b7f058cee MDL-22078 course: End date tests 2016-10-03 09:51:36 +08:00
Daniel Neis Araujo
fbcdb0d710 MDL-22078 course: add end date 2016-10-03 09:51:36 +08:00
Eloy Lafuente (stronk7)
512f9def5c Merge branch 'MDL-54769-master' of git://github.com/marinaglancy/moodle 2016-06-06 23:56:25 +02:00
Marina Glancy
88038050b1 MDL-54769 backup: add missing error language string 2016-06-01 09:44:42 +08:00
Andrew Nicols
e67da0d792 MDL-54567 backup: Fixtures for legacy grade value rewrite 2016-05-30 13:22:04 +08:00
Frederic Massart
2a64b641e6 MDL-54567 backup: Process the calculations_freeze item upon restore 2016-05-30 13:22:03 +08:00
Adrian Greeve
41abbbbde5 MDL-45390 gradebook: sql tidy up and version alignment. 2016-05-18 10:41:30 +08:00
Adrian Greeve
405b90bcd2 MDL-45390 gradebook: Grade boundary fix.
Code to upgrade, fix, and freeze the gradebook for
courses with letter boundary problems.
2016-05-18 09:56:00 +08:00
Eloy Lafuente (stronk7)
07a069f1c0 MDL-50063 unittests: Remove some unnecesary gc_collect_cycles()
Now backup and restore operations free logger resources calling
to the destroy() method. This commit ensures:

1) That gc_collect_cycles() is not used anymore in backup-related tests.
2) That all backup and restore controllers in test do always call
   to the detroy() method.
3) Some unset() calls, needed to make gc_collect_cycles() are not used
   anymore.
2016-05-13 02:50:45 +02:00
Jun Pataleta
45b9207d7e MDL-53974 backup: Add option to backup course competencies 2016-05-06 09:27:31 +08:00
Frederic Massart
68bf1ff4b3 MDL-51369 backup: Respect capabilities when restoring course info
In short, when a user is creating a new course they can set
the ID number, shortname, fullname and summary. However, when
they merge a backup into a course they need the permissions to do so.
2016-05-06 09:27:26 +08:00
Frederic Massart
56e1d9bada MDL-53716 competency: Do not restore competencies when disabled 2016-04-28 18:41:30 +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
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