Skip to content

Commit

Permalink
MDL-23532 fix missing include
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Apr 27, 2011
1 parent b90b28e commit e0dd7cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions enrol/cohort/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot . '/enrol/locallib.php');


/**
* Event handler for cohort enrolment plugin.
*
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion enrol/manual/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e0dd7cb

Please sign in to comment.