Glossary MDL-23063 fixed bug with the way get_record was being called.. kudos to Stephen
This commit is contained in:
+1
-1
@@ -634,7 +634,7 @@ class moodle_page {
|
||||
if ($this->_legacypageobject) {
|
||||
return $this->_legacypageobject->user_allowed_editing();
|
||||
}
|
||||
return has_any_capability($this->all_editing_caps(), $this->context, null, false );
|
||||
return has_any_capability($this->all_editing_caps(), $this->context, null, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,10 +11,10 @@ $hook = optional_param('hook', 'ALL', PARAM_CLEAN);
|
||||
$url = new moodle_url('/mod/glossary/approve.php', array('eid'=>$eid,'mode'=>$mode, 'hook'=>$hook));
|
||||
$PAGE->set_url($url);
|
||||
|
||||
$entry = $DB->get_record('glossary_entries', 'id', $eid, '*', MUST_EXIST);
|
||||
$glossary = $DB->get_record('glossary', 'id', $entry->glossaryid, '*', MUST_EXIST);
|
||||
$entry = $DB->get_record('glossary_entries', array('id'=> $eid), '*', MUST_EXIST);
|
||||
$glossary = $DB->get_record('glossary', array('id'=> $entry->glossaryid), '*', MUST_EXIST);
|
||||
$cm = get_coursemodule_from_instance('glossary', $glossary->id, 0, false, MUST_EXIST);
|
||||
$course = $DB->get_record('course', 'id', $cm->course, '*', MUST_EXIST);
|
||||
$course = $DB->get_record('course', array('id'=> $cm->course), '*', MUST_EXIST);
|
||||
|
||||
require_login($course, false, $cm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user