From c4a333b328e334344ee8a408227abbb2f3e5f383 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 14 Aug 2006 08:59:38 +0000 Subject: [PATCH] Fixes from forum http://moodle.org/mod/forum/discuss.php?d=46048 --- mod/data/import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/data/import.php b/mod/data/import.php index a82ca3c356..d7cb6281b4 100755 --- a/mod/data/import.php +++ b/mod/data/import.php @@ -120,7 +120,7 @@ $fieldnames = array_shift($records); foreach ($records as $record) { - if ($recordid = data_add_record($data->id, 0)) { // add instance to data_record + if ($recordid = data_add_record($data, 0)) { // add instance to data_record $fields = get_records('data_fields', 'dataid', $data->id, '', 'name, id, type'); // do a manual round of inserting, to make sure even empty contents get stored @@ -137,7 +137,7 @@ $newfield = 'data_field_'.$field->type; $currentfield = new $newfield($field->id); - $currentfield->update_data_content($currentfield->id, $recordid, $value, $name); + $currentfield->update_content($recordid, $value, $name); } $recordsadded++; } -- 2.39.5