Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
543009c
)
MDL-29695 enrol-cohort: Minor code improvement
author
Sam Hemelryk
<sam@moodle.com>
Mon, 17 Oct 2011 22:02:00 +0000
(11:02 +1300)
committer
Sam Hemelryk
<sam@moodle.com>
Mon, 17 Oct 2011 22:02:00 +0000
(11:02 +1300)
enrol/cohort/locallib.php
patch
|
blob
|
blame
|
history
diff --git
a/enrol/cohort/locallib.php
b/enrol/cohort/locallib.php
index
c19b52a
..
3462638
100644
(file)
--- a/
enrol/cohort/locallib.php
+++ b/
enrol/cohort/locallib.php
@@
-289,8
+289,7
@@
function enrol_cohort_get_cohorts(course_enrolment_manager $manager) {
*/
function enrol_cohort_can_view_cohort($cohortid) {
global $DB;
- $cohort = $DB->get_record_select('cohort', 'id = ?', array($cohortid));
-
+ $cohort = $DB->get_record('cohort', array('id' => $cohortid), 'id, contextid');
if ($cohort) {
$context = get_context_instance_by_id($cohort->contextid);
if (has_capability('moodle/cohort:view', $context)) {