I am trying to write an enrol plugin for moodle and therefor I need the functions of the /moodle/enrol/cohort/lib.php file.
But when I try..
global $CFG
require_once($CFG->dirroot . '../lib.php');
..then i get the following:
Notice: Trying to get property of non-object in /var/www/html/ moodle/.... on line 20
line 20 is..
require_once($CFG->dirroot . '../lib.php');
Don't really know what to do. I think the solution has to do with "dirroot".
Can someone help me?