]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes from forum http://moodle.org/mod/forum/discuss.php?d=46048
authormoodler <moodler>
Mon, 14 Aug 2006 08:59:38 +0000 (08:59 +0000)
committermoodler <moodler>
Mon, 14 Aug 2006 08:59:38 +0000 (08:59 +0000)
mod/data/import.php

index a82ca3c356ab34d8767cbb0460fcc42b66ec1a81..d7cb6281b41d03d192ec97aaeeb3358ec1bc0a9b 100755 (executable)
             $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
                         $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++;
                 }