courseid = 0; $defaultscale->userid = 0; $defaultscale->timemodified = time(); $defaultscale->name = get_string("journalrating2", "journal"); $defaultscale->scale = get_string("journalrating1", "journal").",". get_string("journalrating2", "journal").",". get_string("journalrating3", "journal"); if ($defaultscale->id = insert_record("scale", $defaultscale)) { execute_sql("UPDATE {$CFG->prefix}journal SET assessed = '-$defaultscale->id'", false); } else { notify("An error occurred while inserting the default journal scale"); $result = false; } } return $result; }