diff --git a/admin/roles/assign.php b/admin/roles/assign.php index 46de2d18629..19715aea5fa 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -114,7 +114,7 @@ } 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)); } diff --git a/course/lib.php b/course/lib.php index 4e4416cdf59..84dcf1adbff 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2153,7 +2153,7 @@ function get_course_section($section, $courseid) { $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.