Permalink
Browse files

MDL-26221 add missing course/lib.php include when using make_categori…

…es_list()
  • Loading branch information...
1 parent 54b7b59 commit 8f0eb9fd7adec946acdf598606b8f65bf046b42e @skodak skodak committed Feb 6, 2011
Showing with 4 additions and 0 deletions.
  1. +1 −0 enrol/database/settings.php
  2. +1 −0 enrol/ldap/settings.php
  3. +2 −0 user/filters/courserole.php
@@ -108,6 +108,7 @@
$settings->add(new admin_setting_configtext('enrol_database/newcoursecategory', get_string('newcoursecategory', 'enrol_database'), '', ''));
if (!during_initial_install()) {
+ require_once($CFG->dirroot.'/course/lib.php');
$options = array();
$parentlist = array();
make_categories_list($options, $parentlist);
View
@@ -92,6 +92,7 @@
$options = $yesno;
$settings->add(new admin_setting_configselect('enrol_ldap/autocreate', get_string('autocreate_key', 'enrol_ldap'), get_string('autocreate', 'enrol_ldap'), 0, $options));
if (!during_initial_install()) {
+ require_once($CFG->dirroot.'/course/lib.php');
$parentlist = array();
$options = array();
make_categories_list($options, $parentlist);
@@ -31,6 +31,8 @@ function get_roles() {
* @return array of course categories
*/
function get_course_categories() {
+ global $CFG;
+ require_once($CFG->dirroot.'/course/lib.php');
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist);

0 comments on commit 8f0eb9f

Please sign in to comment.