Permalink
Browse files

MDL-23532 fix missing include

  • Loading branch information...
skodak committed Apr 27, 2011
1 parent b90b28e commit e0dd7cb005d86eb42b1139b0acba9f3975a84f24
Showing with 8 additions and 3 deletions.
  1. +5 −2 enrol/cohort/locallib.php
  2. +3 −1 enrol/manual/locallib.php
@@ -26,6 +26,9 @@
defined('MOODLE_INTERNAL') || die();
+require_once($CFG->dirroot . '/enrol/locallib.php');
+
+
/**
* Event handler for cohort enrolment plugin.
*
@@ -191,15 +194,15 @@ function enrol_cohort_sync($courseid = NULL) {
/**
* Enrols all of the users in a cohort through a manual plugin instance.
- *
+ *
* In order for this to succeed the course must contain a valid manual
* enrolment plugin instance that the user has permission to enrol users through.
*
* @global moodle_database $DB
* @param course_enrolment_manager $manager
* @param int $cohortid
* @param int $roleid
- * @return int
+ * @return int
*/
function enrol_cohort_enrol_all_users(course_enrolment_manager $manager, $cohortid, $roleid) {
global $DB;
@@ -26,6 +26,8 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/user/selector/lib.php');
+require_once($CFG->dirroot . '/enrol/locallib.php');
+
/**
* Enrol candidates
@@ -53,7 +55,7 @@ public function find_users($search) {
$countfields = 'SELECT COUNT(1)';
$sql = " FROM {user} u
- WHERE $wherecondition AND
+ WHERE $wherecondition AND
u.id NOT IN (
SELECT ue.userid
FROM {user_enrolments} ue

0 comments on commit e0dd7cb

Please sign in to comment.