mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
enrol_imsenterprise: MDL-46363 including course lib when create_course is
used
This commit is contained in:
parent
8b3d19c2f5
commit
c62f8bc71f
1 changed files with 4 additions and 1 deletions
|
@ -270,13 +270,16 @@ class enrol_imsenterprise_plugin extends enrol_plugin {
|
|||
* @param string $tagcontents The raw contents of the XML element
|
||||
*/
|
||||
protected function process_group_tag($tagcontents) {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
|
||||
// Get configs.
|
||||
$truncatecoursecodes = $this->get_config('truncatecoursecodes');
|
||||
$createnewcourses = $this->get_config('createnewcourses');
|
||||
$createnewcategories = $this->get_config('createnewcategories');
|
||||
|
||||
if ($createnewcourses) {
|
||||
require_once("$CFG->dirroot/course/lib.php");
|
||||
}
|
||||
// Process tag contents.
|
||||
$group = new stdClass();
|
||||
if (preg_match('{<sourcedid>.*?<id>(.+?)</id>.*?</sourcedid>}is', $tagcontents, $matches)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue