In 2.0 we had reduced the types of restore operations where we allow
to load the section names and section descriptions, only proceeding
when restoring to new course or to existing course, deleting.
With this patch, we change to the old 1.9 way, that was to restore
the section information always, no matter of the type of restore
operation (course restore, import, to new or to existing course,
deleting or adding). The only exception is that it's always checked that
the target section names and descriptions are empty.
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.
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.
Some early steps in restore are using capability checks to decide how to
restore some information. But at that stage, if the course contents have
been removed and the user had perms at course level only (usually teacher)
the process can fail because some content is not restoreable due to the
lack of permissions.
Moving the restorer step to the beginning really helps is those situations
and it does not hurt at all.
Also, fixed one notice detected when testing this.
This commits cleans some code (settings and dependencies)
and one file included previous by error.
Also it disables all the IMS-CC export feature by default, being
possible to enable it under demand by setting (@ config.php):
$CFG->enablebackupconverters = true;
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.
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.