Skip to content

Commit

Permalink
MDL-25104 correcting import_or_save_files() function
Browse files Browse the repository at this point in the history
  • Loading branch information
ppichet committed Nov 12, 2010
1 parent 6d746b9 commit 710903a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions question/type/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -1665,8 +1665,8 @@ function get_context_by_category_id($category) {
* array with keys 'text', 'format' and 'itemid'. However, when we are
* importing, it will be an array with keys 'text', 'format' and 'files'
* @param object $context the context the question is in.
* @param string $component indentifies the file area.
* @param string $filearea indentifies the file area.
* @param string $component indentifies the file area question.
* @param string $filearea indentifies the file area questiontext, generalfeedback,answerfeedback.
* @param integer $itemid identifies the file area.
*
* @return string the text for this field, after files have been processed.
Expand All @@ -1679,8 +1679,8 @@ protected function import_or_save_files($field, $context, $component, $filearea,

} else if (!empty($field['files'])) {
// This is the case when we are doing an import.
foreach ($question->feedback['files'] as $file) {
$this->import_file($context, 'question', 'answerfeedback', $itemid, $file);
foreach ($field['files'] as $file) {
$this->import_file($context, $component, $filearea, $itemid, $file);
}
}
return trim($field['text']);
Expand Down

0 comments on commit 710903a

Please sign in to comment.