Skip to content

Commit

Permalink
MDL-26221 add missing course/lib.php include when using make_categori…
Browse files Browse the repository at this point in the history
…es_list()
  • Loading branch information
skodak committed Feb 6, 2011
1 parent 54b7b59 commit 8f0eb9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions enrol/database/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions enrol/ldap/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions user/filters/courserole.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f0eb9f

Please sign in to comment.