Permalink
Browse files

MDL-26546 Workshop: fixed incorrect mapping name in the restore of as…

…sessment forms

There was a regression of 8fa86f and ac0f8f where I changed the mapping
names but did not use the new names in add_related_files() call.

All credit goes to Eloy Lafuente for spotting the problem and giving me
a hint on how to fix it.
  • Loading branch information...
1 parent eabbb12 commit 7c26c3f87564ab65a2135dff746eccd290bd4c87 @mudrd8mz mudrd8mz committed Feb 21, 2011
@@ -112,7 +112,7 @@ public function process_workshopform_accumulative_dimension($data) {
$this->set_mapping($this->get_namefor('dimension'), $oldid, $newitemid, true);
// Process files for this workshopform_accumulative->id only
- $this->add_related_files('workshopform_accumulative', 'description', 'workshopform_accumulative', null, $oldid);
+ $this->add_related_files('workshopform_accumulative', 'description', $this->get_namefor('dimension'), null, $oldid);
}
/**
@@ -109,7 +109,7 @@ public function process_workshopform_comments_dimension($data) {
$this->set_mapping($this->get_namefor('dimension'), $oldid, $newitemid, true);
// Process files for this workshopform_comments->id only
- $this->add_related_files('workshopform_comments', 'description', 'workshopform_comments', null, $oldid);
+ $this->add_related_files('workshopform_comments', 'description', $this->get_namefor('dimension'), null, $oldid);
}
/**
@@ -124,7 +124,7 @@ public function process_workshopform_numerrors_dimension($data) {
$this->set_mapping($this->get_namefor('dimension'), $oldid, $newitemid, true);
// Process files for this workshopform_numerrors->id only
- $this->add_related_files('workshopform_numerrors', 'description', 'workshopform_numerrors', null, $oldid);
+ $this->add_related_files('workshopform_numerrors', 'description', $this->get_namefor('dimension'), null, $oldid);
}
/**
@@ -128,7 +128,7 @@ public function process_workshopform_rubric_dimension($data) {
$this->set_mapping($this->get_namefor('dimension'), $oldid, $newitemid, true);
// Process files for this workshopform_rubric->id only
- $this->add_related_files('workshopform_rubric', 'description', 'workshopform_rubric', null, $oldid);
+ $this->add_related_files('workshopform_rubric', 'description', $this->get_namefor('dimension'), null, $oldid);
}
/**

0 comments on commit 7c26c3f

Please sign in to comment.