168 Commits

Author SHA1 Message Date
Sam Chaffee
a66e8bb3aa MDL-17444: Backup hooks for local plugin 2012-11-06 10:49:41 -08:00
Petr Škoda
7881024ec4 MDL-31437 add group sync option to enrol_cohort
This patch includes following changes and new features:
* Group sync in enrol_cohort plugin.
* Option for editing of role in existing cohort sync instance.
* Group memberships are now restored after enrolments.
* New enrol method for restore of protected group membership.
* New component callback 'restore_group_member' for restore of general plugin group membership.
* New component callback 'restore_role_assignment' for restore of general plugin role assignments.
* Implemented group membership protection in enrolment UI.
* Other minor fixes and cleanup.

Notes:
* The YUI base enrolment page is not reimplemented yet - see MDL-35618.
2012-09-28 21:00:00 +02:00
Petr Škoda
2fbfdfd005 MDL-35071 fix plugins typo which was breaking roles restore for some plugins
Thanks Eloy for spotting this!
2012-09-12 08:56:44 +02:00
Petr Škoda
7a7b8a1f19 MDL-35071 redesign enrol restore
Includes option to convert all enrolments to enrol_manual instances, support for mapping of custom fields and fixes for several other problems. This does not include support for custom enrol tables, it will be addressed in another issue.
2012-09-07 11:11:28 +02:00
Eloy Lafuente (stronk7)
238f7761af Merge branch 'MDL-31973-master-6' of git://git.luns.net.uk/moodle
Conflicts:
	lib/db/upgrade.php
2012-08-29 00:42:43 +02:00
sam marshall
1d1917aeaa MDL-31973 Groups: groups_members table should have 'component', 'itemid' fields 2012-08-24 15:30:13 +01:00
David Monllao
67d4424a6b MDL-29598 backup Avoid possible future duplicate grade letters
More info in restore_activity_grades_structure_step->process_grade_letter() comments
2012-08-24 08:54:49 +08:00
Justin Filip
5bc8335c6f MDL-29598 backup Check whether a grade_letters record exists before trying to insert a new record 2012-08-24 08:54:49 +08:00
Tim Hunt
607b0a705f MDL-34118 question backup: API improvement following Eloy's review. 2012-08-17 13:15:41 +01:00
Juergen Zimmer
895d364bcf MDL-34118 question backup: fixes for usage prefixes in backups. 2012-08-17 11:15:11 +01:00
Tim Hunt
3e3ae0ee11 MDL-34118 question backup: a mod can use usages in different ways.
An activity module might want to use question_usages in different ways.
We should suppport this, because it lets people make interesting
activities.

At the moment, the backup and restore code does not support this,
because it uses fixed element names for the question_usage element and
its children. This fix changes things so that a prefix can be appended
to all the element names.
2012-08-17 11:13:10 +01:00
Sam Hemelryk
ac88177985 Merge branch 'MDL-32827-master' of git://github.com/ankitagarwal/moodle 2012-07-31 16:16:14 +12:00
Adrian Greeve
a689cd1def MDL-34469 - lib - replacement of the deprecated get_context_instance and get_context_by_id functions (group 15) 2012-07-30 14:59:57 +08:00
Ankit Agarwal
686ca2f5d1 MDL-32827 calendar: Added logic to handle calendar events with empty eventtypes during restore 2012-07-27 10:08:16 +08:00
Sam Hemelryk
8ab1529d8a MDL-34220 condition: Fixed up backup and restore of custom profile field conditions 2012-07-13 15:19:32 +12:00
Sam Hemelryk
a2a2e7fb4a Merge branch 'MDL-32119' of git://github.com/srynot4sale/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2012-07-09 16:02:49 +12:00
Sam Hemelryk
141d3c86d3 MDL-29538 condition: Tidied up user field condition code post merge 2012-07-09 11:45:44 +12:00
Mark Nelson
e01fbcf765 MDL-29538 core_condition: Integrated with the latest code, can now place user field conditions on sections as well 2012-06-26 15:18:53 +08:00
Sam Hemelryk
33e657c7e7 MDL-29538 core_condition: Pre-integration merge cleanup
* Fixed up database installation and upgrade code
* Reverted some whitespace optimisations to minimise conflicts
* Optimised commits made by Mark to reduce complexity and add tracker issue numbers
2012-06-26 15:18:53 +08:00
Mark Nelson
5fa220fbf3 MDL-29538 core_condition: backup and restore now works with the new DB structure and removed unneeded restore process 2012-06-26 15:18:52 +08:00
Mark Nelson
cb4492c200 MDL-29538 core_condition: changed the logic in the code so that it works with the new database structure as well as tidying up parts of the code 2012-06-26 15:18:52 +08:00
Mark Nelson
92fb7dd3a5 MDL-29538 core_condition: made changes to the DB structure - nb. had to rename the table due to length limit 2012-06-26 15:18:51 +08:00
Mark Nelson
76af15bb4c MDL-29538 core_condition: initial commit to add support for making things conditional on user profile fields 2012-06-26 15:18:51 +08:00
David Mudrák
7b5f67f77f MDL-33430 Notify user about file aliases failures at the final stage of the restore 2012-06-21 15:22:38 +02:00
David Mudrák
fb3a57e2d4 MDL-33430 Fix strict standards warning
Only variables should be passed by reference.
2012-06-21 12:28:09 +02:00
David Mudrák
d129c3608f MDL-33430 Add caching into choose_repository() method
Simply do not repeat expensive search once the restore process decides how
to deal with the given repositoryid or repositorytype.
2012-06-21 12:17:54 +02:00
David Mudrák
2c1426743a MDL-33430 Add process_file_aliases_queue restore step to the final task
This execution step tries to actually restore all aliases that were
stashed in the file aliases queue.
2012-06-21 02:31:26 +02:00
David Mudrák
4b6b087faf MDL-33430 Do not restore aliases yet, stash them for later processing 2012-06-21 02:29:34 +02:00
Tim Hunt
ff5d6f8872 MDL-33682 backup: cope with sections called '0'
It was not previously possible to have a section called 0 because of
bugs in the standard course formats, but we hit this with the OU course
format. You got an exception because backup settings tested to see if
their lable was empty, which means a section name of '0' was fatal.
Should work now.
2012-06-12 17:46:47 +01:00
Eloy Lafuente (stronk7)
3ea1330949 MDL-33455 restore: process grade_grades only if user matches.
Note this has been applied both to individual activities grade_grades
and to general ones.
2012-06-11 11:30:20 +08:00
Eloy Lafuente (stronk7)
78117cb1a4 MDL-33465 fix incorrect merge conflict resolution 2012-06-08 10:55:39 +02:00
Aparup Banerjee
ac16f14512 Merge branch 'MDL-33465-master' of git://github.com/ankitagarwal/moodle
Conflicts:
	backup/moodle2/restore_stepslib.php
2012-06-07 14:04:08 +08:00
Aparup Banerjee
2330cf7af1 Merge branch 'wip-mdl-33455' of git://github.com/rajeshtaneja/moodle 2012-06-05 15:15:26 +08:00
Dan Poltawski
66726f61d0 Merge branch 'MDL-33502' of git://github.com/stronk7/moodle 2012-06-05 13:10:28 +08:00
Rajesh Taneja
a1a2cc5994 MDL-33455 gradebook: Grade will not be inserted for unknown user 2012-06-05 09:46:40 +08:00
Ankit Agarwal
336d8c49f4 MDL-33465 course: 'Course view section' logs should use sectionid instead of section number to generate action urls' 2012-06-05 09:33:45 +08:00
Eloy Lafuente (stronk7)
c76bd30885 Merge branch 'MDL-33133-master' of git://github.com/sammarshallou/moodle 2012-06-05 00:38:04 +02:00
Eloy Lafuente (stronk7)
f4624b6b0b MDL-33502 restore: there are no files with itemid based on section numbers. 2012-06-04 02:15:57 +02:00
Aaron Barnes
46eca1f77e MDL-32119 course completion: Removed unused database structure 2012-05-29 14:17:22 +12:00
Sam Hemelryk
c31081d0a4 Merge branch 'MDL-32766' of git://github.com/rwijaya/moodle
Conflicts:
	version.php
2012-05-28 11:19:06 +12:00
Rossiani Wijaya
15a848ba90 MDL-32766 course log: specify log for viewing course section 2012-05-22 13:50:40 +08:00
sam marshall
52e9dfc58f MDL-33133 Conditional section: restore to existing course fix 2012-05-21 13:59:00 +01:00
Dongsheng Cai
6723372514 MDL-28666 Extends repository to support references
1. Allow repository to create references to external contents
2. Extends files API to handle file references
3. Generic file caching
4. Backup/restore file references
5. Download external contents if repository uninstalled
6. Allow filepicker to display iframe
7. PHPUnit test suits
2012-05-21 11:57:51 +08:00
Eloy Lafuente (stronk7)
128af10645 MDL-32005 Avoid some notices restoring old backup files without idnumber 2012-05-18 13:36:03 +02:00
Eloy Lafuente (stronk7)
71cbb2516b MDL-24419 (6): Backup and restore fixes and improvements
- annotate used grouping
- reorganize restore methods
- roll availability dates
- observe $CFG->enableavailability
- observe $CFG->enablegroupmembersonly
- TODO: 2 TODOs
2012-05-17 03:58:51 +02:00
Eloy Lafuente (stronk7)
dd420abadf Merge branch 'MDL-24419-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/db/upgrade.php
	lib/phpunit/lib.php
	version.php

Fixed:
    lib/db/upgrade.php - duplicate course->sectioncache add code
    lib/db/install.xml - cleanup needed because xmldb editor was not used
    lib/phpunit/classes/util.php - cleanup $GROUPLIB_CACHE on test reset
2012-05-16 23:53:47 +02:00
Andrew Robert Nicols
74b714df7e MDL-32005 Add idnumber field to groups and groupings 2012-05-15 09:38:51 +01:00
sam marshall
ce4dfd2703 MDL-24419 (4): Add conditional availability support to sections; section cache
Credit: original version done by Kirill Astashov of NetSpot (netspot.com.au),
finished and tweaked by sam.

This change adds conditional availability support for sections analagous to
that already available for activities. (Backend, UI, backup/restore.)

In order that this feature does not reduce performance, section cacheing has
also been added using a new course 'sectioncache' field analagous to modinfo.

The new feature integrates with activity availability so that activities
inside sections which are not available are automatically not available
themselves (meaning it works to restrict access).
2012-05-14 11:19:25 +01:00
Eloy Lafuente (stronk7)
6565d55a34 MDL-22895 backup: minor fixes 2012-04-11 01:47:53 +02:00
Ankit Agarwal
8331a159c5 MDL-22895 backup: Adding the feature to support backing up and restoring calendar events 2012-04-02 13:58:33 +08:00