MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment

This commit is contained in:
Petr Skoda
2010-07-03 13:37:13 +00:00
parent ffc3f866d5
commit 64f93798d4
220 changed files with 4713 additions and 4375 deletions
@@ -67,13 +67,15 @@ class backup_structure_processor extends base_processor {
public function process_nested_element(base_nested_element $nested) {
// Proceed with all the file annotations for this element
list($fileareas, $element) = $nested->get_file_annotations();
if ($fileareas) { // If there are areas to search
$backupid = $this->get_var(backup::VAR_BACKUPID);
$contextid= $this->get_var(backup::VAR_CONTEXTID);
$itemid = !is_null($element) ? $element->get_value() : null;
foreach ($fileareas as $filearea) {
backup_structure_dbops::annotate_files($backupid, $contextid, $filearea, $itemid);
$fileannotations = $nested->get_file_annotations();
if ($fileannotations) { // If there are areas to search
$backupid = $this->get_var(backup::VAR_BACKUPID);
$contextid = $this->get_var(backup::VAR_CONTEXTID);
foreach ($fileannotations as $component=>$area) {
foreach ($area as $filearea=>$element) {
$itemid = !is_null($element) ? $element->get_value() : null;
backup_structure_dbops::annotate_files($backupid, $contextid, $component, $filearea, $itemid);
}
}
}
}