Permalink
Browse files

Merge branch 'w06_MDL-26221_20_courserole' of git://github.com/skodak…

…/moodle
  • Loading branch information...
2 parents dedda4a + 8f0eb9f commit 9377348eb0624f4719b672eec6cc7fa86764ae57 Sam Hemelryk committed Feb 7, 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 9377348

Please sign in to comment.