179 Commits

Author SHA1 Message Date
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
Petr Skoda
748e96512b MDL-32095 fix backup API to be E_STRICT compatible 2012-03-26 16:04:16 +02:00
Sam Hemelryk
8149d6240a MDL-19125 lib: Fixed up inline comments during integration 2012-03-19 10:08:47 +13:00
Tim Hunt
9665ecd275 MDL-19125 module restrictions: use a capability
1. This used to use a complex legacy system which was buggy.

2. It now relies on a new mod/...:addinstance capability for each module.

3. All the legacy code has been stripped out.

4. Old restriction data is upgraded by creating the necessary permission
overrides. Similarly, when old backups are restored, the old settings
are converted to be overrides.

5. The required addinstance capabilities will be added as a separate
commit.

6. There is a developer debug warning about modules that are missing the
addinstance capability, unless they are MOD_ARCHETYPE_SYSTEM mods.
2012-03-15 17:11:27 +00:00
Eloy Lafuente (stronk7)
ac6dc09c26 MDL-29248 backup: take rid of the setting and code handling the 'private' user filearea 2012-03-01 13:09:47 +01:00
David Mudrak
f9dab4bed2 MDL-30982 Restore moodle2 files - phpDocs categorization 2012-02-27 11:59:43 +01:00
Eloy Lafuente (stronk7)
ee1dc83574 MDL-31532 restore: avoid null course->hiddensections problems. Credit goes to Petri Asikainen. Thanks! 2012-02-20 01:34:25 +01:00
Tim Hunt
a60835c721 MDL-31314 gradebook restore: fix category.depth on restore.
Without this, restoring backups made with the OU's custom 'restore from
1.9' feature, and possibly other people's custom converstion code, does
not work properly.

Also, fix poor recordset code.
2012-01-30 12:31:43 +00:00
Eloy Lafuente (stronk7)
4d856332e4 MDL-28180 backup - on restore always prevent completion_aggr_methd dupes
This covers the last case where dupes could be happening in the
completion_aggr_methd table: Restoring one complete course into
an existing one, adding information. Now we always check if the
aggr_method exists before inserting it.
2011-12-12 00:31:44 +01:00
Eloy Lafuente (stronk7)
5b14551371 MDL-30466 Backup: delete empty method 2011-11-29 19:47:25 +01:00
Rajesh Taneja
3c33d77817 MDL-30466 Backup: Fixed duplicate completion record check error 2011-11-28 14:12:41 +08:00
Eloy Lafuente (stronk7)
0620787a17 Merge branch 'w47_MDL-27233_m22_restoreenrol' of git://github.com/skodak/moodle 2011-11-24 23:44:24 +01:00
Petr Skoda
73d000f389 MDL-27233 allow adding of default role to restorers 2011-11-23 18:38:27 +01:00
David Mudrak
086ed2a6c0 MDL-30390 Advanced grading - fixed the database table field name in the restore
This is a regression of the recent fields renaming.
2011-11-22 15:50:17 +01:00
Eloy Lafuente (stronk7)
f218cdab34 Merge branch 'MDL-29591-master-2' of git://git.luns.net.uk/moodle 2011-11-18 17:28:53 +01:00
Andrew Robert Nicols
7d7d82de03 MDL-29591 Check for permission before overwriting course idnumber when restoring 2011-11-18 14:54:00 +00:00
Henning Bostelmann
6336bd914a MDL-29350 Prevent duplication of groupings when copying activities
This patch also includes a database upgrade to correct data produced as a
result of this bug.
2011-11-15 11:12:40 +00:00
David Mudrak
3319af85a9 MDL-29793 Advanced grading - do not execute the restore step if the grading.xml is missing 2011-11-14 21:11:41 +01:00
Sam Hemelryk
1ae9aa2b8f Merged MDL-29108 Advanced grading 2011-11-14 22:01:05 +13:00
David Mudrak
37065c2e06 MDL-29793 Advanced grading forms attached to activity modules can be restored now 2011-11-08 23:33:40 +01:00
Petr Skoda
158e9e2af9 MDL-29030 add basic report backup/restore support for course level 2011-11-06 12:22:51 +01:00
Eloy Lafuente (stronk7)
9ab5df6b8b MDL-26841 backup - prevent any enrolments info to be handled in IMPORT/HUB operations 2011-09-19 11:21:43 +02:00
sam marshall
8c40662e22 MDL-27001 'Show description' feature part 1: infrastructure that allows modules to support feature
The 'Show description' feature is about optionally including module description on the course page. This change include the necessary infrastructure - new database field, new FEATURE constant, changes to forms to display it, new language strings for it, backup and restore, and old course conversion. (I found the places to change by searching for an existing field in course_modules).

Documentation for the field is included in install.xml and in modinfolib.
2011-09-06 11:03:00 +01:00
Tim Hunt
a23bda41e4 MDL-28618 question combined feedback: inconsistency in file areas.
The (partially|in)?correct feedback fields acutally store their files in a file area with component 'question'. Some code, however, was written as if they were stored in the qtype_whatever area.
2011-08-05 16:45:17 +01:00
Tim Hunt
ad858cd428 MDL-28369 Question hints not being restored. 2011-07-25 10:05:13 +01:00
Eloy Lafuente (stronk7)
c8fbcaab1d MDL-28156 restore - support restoring files without grade items 2011-07-10 00:52:45 +02:00
Eloy Lafuente (stronk7)
c5b0344b62 Merge branch 'MDL-28152-course-grade-category' of git://github.com/mudrd8mz/moodle 2011-07-01 22:33:04 +02:00
David Mudrak
41f21f92cf MDL-28152 Improved detection of the course grade_category on course restore 2011-07-01 22:12:30 +02:00
Eloy Lafuente (stronk7)
7ace3a2199 Merge branch 'MDL-28006-convert-gradebook' of git://github.com/mudrd8mz/moodle 2011-07-01 00:09:50 +02:00
Eloy Lafuente (stronk7)
b1273d09dd Merge branch 'MDL-28116-master' of git://github.com/sammarshallou/moodle 2011-06-30 23:56:53 +02:00
David Mudrak
d46badb176 MDL-28006 restore - improved handling of gradebook 1.9 backups
On contrary from a backup created in 2.0, the file gradebook.xml in the
converted MBZ can contain the course grade_item without the
corresponding grade_category record which is something restore_stepslib
did not expect. This patch fixes two places:

1) the gradebook restore does not use mapped itemid but calls
grade_category::fetch_course_category() to get the actual category to
link the course_item with

2) after_execute makes sure that the mapping actually exists before
trying to move the activities from the default root category
2011-06-30 22:40:54 +02:00
sam marshall
c02b60bccc MDL-28116 Fix issue restoring old backups with duplicate completion rows 2011-06-30 17:33:12 +01:00
Eloy Lafuente (stronk7)
f0548d18bf Merge branch 'MDL-28035' of git://github.com/timhunt/moodle 2011-06-29 20:47:16 +02:00
Eloy Lafuente (stronk7)
fae9cd077c Merge branch 'MDL-28037' of git://github.com/timhunt/moodle 2011-06-29 20:44:49 +02:00
Sam Hemelryk
7bbf41661b MDL-27988 backup grade: Calculated grade items calculation references now corrected and idnumber restore improved 2011-06-29 15:26:48 +08:00
Tim Hunt
50de6ad083 MDL-28037 Make restoring quiz_attempts more robust.
Don't assume that 0 is unique (even temporarily).
2011-06-27 18:27:12 +01:00
Tim Hunt
0366ef262a MDL-28035 problems with upgrade/restore of ataptive quizzes from 2.0
There were two main problems:

1. The unit tests for upgrading adaptive quiz attempts had slighly the
wrong $expectedqa, and so matching that the upgrade was doing the wrong
thing in certain situations. The main issue was that it was setting
-_try = 1 on the first step, which broke the penalty calculation when
the quiz was regraded. There were also some other subtleties with
incrementing -_try that were not right before.

2. It was possible in 2.0 and earlier for two question_states to get the
same seq_number, and restoring 2.0 backups was rashly assuming that that
was unique.
2011-06-27 17:10:02 +01:00
Eloy Lafuente (stronk7)
8edbfba909 Merge branch 'MDL-24594_wip' of git://github.com/timhunt/moodle 2011-06-20 12:48:55 +02:00
Tim Hunt
f263d4935f MDL-27913 Stray whitespace in backup. 2011-06-17 19:37:20 +01:00
ppichet
2a6c5c52ee MDL-24594 qtype_multichoice should allow images in the choices.
This change was massively re-worked by Tim Hunt to update Pierre Pichet's original patch for Moodle 2.0 to work in Moodle 2.1.
2011-06-17 18:41:13 +01:00