}
} else if (!empty($courseid)){ // we need this for user tabs in user context
- if (!$course = $DB->get_record('course', array('id', $courseid))) {
+ if (!$course = $DB->get_record('course', array('id'=>$courseid))) {
print_error('invalidcourse', 'error');
}
// this hack is needed for different settings of each subtype
if (!empty($this->_instance)) {
- if($ass = $DB->get_record('assignment', array('id', $this->_instance))) {
+ if($ass = $DB->get_record('assignment', array('id'=>$this->_instance))) {
$type = $ass->assignmenttype;
} else {
print_error('invalidassignment', 'assignment');