}
if ($userid) {
- $user = $DB->get_record('user', array('id', $userid));
+ $user = $DB->get_record('user', array('id'=>$userid));
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
}
$cw->summary = "";
$cw->sequence = "";
$id = $DB->insert_record("course_sections", $cw);
- return $DB->get_record("course_sections", "id", $id);
+ return $DB->get_record("course_sections", array("id"=>$id));
}
/**
* Given a full mod object with section and course already defined, adds this module to that section.