Commit graph

639 commits

Author SHA1 Message Date
Tim Hunt
ba145a9e4e MDL-47590 question backup: include response file only with userdata 2014-11-14 16:21:18 +00:00
Marina Glancy
c3b545a92a Merge branch 'wip-MDL-47675-master' of git://github.com/abgreeve/moodle 2014-10-24 11:48:09 +02:00
Adrian Greeve
c42d18183a MDL-47675 phpunit: Update unit tests to pass on MSSQL
Unit tests were failing on MSSQL. gc_collect_cycles() was
removed from the phpunit utils.php file to save time in running
the tests, but MSSQL doesn't clean up open files as well as
other databases.

This patch includes the garbage collection for the unit tests
that require it.
2014-10-20 14:26:11 +08: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
sam marshall
5176504d3f MDL-46991 Availability: Conditional dates not updated on restore 2014-09-18 16:37:53 +01:00
Marina Glancy
de62e57a9b Merge branch 'master_MDL-47076' of git://github.com/totara/moodle 2014-09-09 17:12:28 +08:00
David Curry
927ea484ec MDL-47076 badges: Add checks to user fields during badges restoration
Change-Id: Iff6402d1da835ed57dc17d079adf1bbd2e76dd6c
2014-09-09 16:22:52 +12:00
Frederic Massart
f1272bbecd MDL-46696 backup: Handle older backups not containing grade history 2014-09-09 10:23:11 +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
zbdd
7d908d3365 MDL-37312 backup: Keep course idnumber on same site course restore
When the course idnumber is set during a same site course restore,
retain the course idnumber if there are no duplicates.
2014-08-29 07:15:03 +00:00
Tony Butler
206541a12c MDL-46281 core_backup: Add class_exists check for backup_<mod>_activity_task
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-08-14 12:56:36 +01:00
Mark Nelson
115e8964db MDL-34248 core_backup: used API instead of inserting into the log table directly 2014-07-17 18:11:26 -07:00
Marina Glancy
84dc90034a MDL-39726 backup: fix SQL syntax for Oracle 2014-06-11 17:16:45 +08:00
Marina Glancy
b9329e0cfe MDL-39726 backup: fix SQL syntax for Oracle 2014-06-11 12:14:16 +08:00
Damyon Wiese
d78fa6c10a Merge branch 'MDL-39726-master' of https://github.com/merrill-oakland/moodle 2014-06-09 09:51:58 +08:00
Eric Merrill
d6441d1e5e MDL-39726 backup: Move question files by context, not one at a time
Use question category contexts to send file to the file pool in bulk.
Questions are only restored in whole category chunks, so this is safe
to do.
2014-06-04 09:14:49 -04: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
Frederic Massart
98fed696dc MDL-45283 restore: Prevent failure when user course grade exists
When we restore a course, the grade that a user has for the
grade item of the course cannot be created twice. If we try
to create it when it already exists, a database exception is
raised because of index duplication.

The safest way to proceed is certainly to ignore the grade
information from the backup, otherwise we could potentially
overwrite existing information. Though, this only applies
to restore as merge, and it does not affect the update of
the course grade.
2014-04-30 12:09:13 +08: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
Damyon Wiese
392cb4577a MDL-44070 Conditional availability - white space fix 2014-04-08 13:49:15 +08:00
sam marshall
38674ef91a MDL-44070 Conditional availability enhancements (4): backup
Implements backup and restore for the new conditional availability
data. This includes:

* Backup and restore of new field.
* Restore updates IDs in conditions, as required.
* Restore converts availability data from legacy (Moodle 2.6) backups.
* Unit tests for all this.
2014-04-07 20:11:41 +01:00
Marina Glancy
f316de8a7f MDL-44316 core_tag: correction to the default value 2014-03-25 14:05:06 +08:00
Mark Nelson
cc033d48b5 MDL-44316 core_tag: changed the API to accept a contextid and component 2014-03-22 13:50:08 -07:00
Damyon Wiese
0cc30f6fcf Merge branch 'MDL-44370-master' of git://github.com/ankitagarwal/moodle 2014-03-05 13:44:56 +08:00
Ankit Agarwal
cebfb9ec9f MDL-44370 calendar: Add support for restoring calendar log rules 2014-03-04 16:13:25 +08:00
Tim Hunt
ccba5b8805 MDL-43749 normalise quiz database structure.
The sequence of questions that made up a quiz used to be stored as a
comma-separated list in quiz.questions. Now the same information is
stored in the rows in the quiz_slots table. This is not just 'better' in
a database design sense, but it allows for the future changes we will
need as we enhance the quiz in the MDL-40987 epic.

Having changed the database structure, all the rest of the code needs to
be changed to account for it, and that is done here.

Note that there are not many unit tests for the changed bit. That is
because as part of MDL-40987 we will be changing the code further, and
we will add unit tests then.
2014-03-02 10:00:40 +01:00
Tim Hunt
3f87a74b60 MDL-44018 quesiton variant was not backed up or restored. 2014-02-07 21:55:10 +00:00
James Pratt
809fdb83b1 MDL-41754 (1) Progress tracking : moved from backup and restore to core 2014-01-27 17:45:50 +07:00
Dan Poltawski
e6fbca9f65 Merge branch 'wip-mdl-43306-m' of git://github.com/rajeshtaneja/moodle 2014-01-20 09:45:43 +08:00
Rajesh Taneja
8acec2a693 MDL-43306 restore: Fix grade_item sortorder after restoring course
While restoring course/activity, restore will blindly insert grade_item
sortorder. Which cause dulicate sortorder and lead to unpredicatble sorting
results.

Now we will call grade_item::fix_duplicate_sortorder() after restore is finished
to fix duplicate sortorder and order grade items to the closest order possible
2014-01-15 10:28:00 +08:00
Damyon Wiese
b6dc2b72b2 Merge branch 'MDL-43460-master' of git://github.com/FMCorz/moodle 2014-01-14 13:25:44 +08:00
Frederic Massart
bc213518dc MDL-43460 calendar: Decode event description links on restore 2014-01-06 11:26:48 +01:00
Tim Hunt
3d1c4e189e MDL-43448 Links to the gradebook not fixed on restore.
Note we can only fix certain generic links, we can't handle ones like
/grade/report/{reportname}/index.php, but fortunately, we were only
using the generic ones.

I added a couple of other likely things too (badges and participants
list).
2013-12-20 11:55:01 +00:00
Eloy Lafuente (stronk7)
f03671d87e Revert "MDL-43306 restore: fix grade item sortorder restoration"
This reverts commit e238b2cb92.
2013-12-19 02:13:05 +01:00
Eloy Lafuente (stronk7)
0fb4218dad Merge branch 'MDL-43306-master' of git://github.com/danpoltawski/moodle 2013-12-17 10:29:25 +01:00
Eloy Lafuente (stronk7)
438ee6ebdc Merge branch 'MDL-42815-master' of git://github.com/sammarshallou/moodle 2013-12-10 23:24:56 +01:00
Dan Poltawski
e238b2cb92 MDL-43306 restore: fix grade item sortorder restoration
Previously, restore was blindly inserting the old sort order into the
database, causing duplicate sortorders which lead to unpredicatble
sorting results.

Now we will use the api function to add it after the original sortorder,
this means if a duplicate exists in the original location, this item
will appear after it.
2013-12-10 12:32:36 +08:00
Frederic Massart
c7b3c10e3b MDL-42768 restore: Use sql_compare_text instead for text comparison 2013-11-13 14:46:30 +08:00
sam marshall
40e8f0260c MDL-42815 Backup/restore: Error saving files - log messages unhelpful
This commit contains three changes in the three files:
1. A bug in the backup process meant that anything logged after a
   certain point did not appear in the on-screen display of the
   backup log, because the logger was serialised and deserialised
   but display code referred to the old version. Changed so that
   code retrieves new object.
2. Add more information to backup log when there is a missing file.
3. Add more information to restore log when there is a missing file
   (and remove existing code duplication of the current message).

The 'missing file' situation is one that generally shouldn't occur in
normal usage, but when it does happen, it is useful to have full
information about the file.
2013-11-11 17:15:32 +00:00
Damyon Wiese
3b4e5a83f4 Merge branch 'MDL-38734-master' of git://github.com/danpoltawski/moodle 2013-11-01 08:55:29 +08:00
Damyon Wiese
3a33578926 Merge branch 'wip-mdl-30812' of git://github.com/rajeshtaneja/moodle 2013-10-28 12:11:34 +08:00
Eloy Lafuente (stronk7)
27ee4c13a5 Merge branch 'MDL-42377_master' of https://github.com/markn86/moodle 2013-10-25 01:14:04 +02:00
Rajesh Taneja
62b6135c38 MDL-34612 Restore: Gracefully handle empty section title while restoring 2013-10-22 09:47:42 +08:00
Mark Nelson
4543bf2423 MDL-42377 backup: fixed incorrect debugging message 2013-10-21 11:54:39 +08:00
sam marshall
62182e89cf MDL-42388 Restore: Some warnings displayed with debugging() 2013-10-18 11:59:45 +01:00
Tony Levi
1b55bdb644 MDL-38734: Automated backup failure causing all course to fail
Conflicts:
	backup/moodle2/backup_stepslib.php
2013-10-18 15:07:35 +08:00