Skip to content

Commit

Permalink
enrol_imsenterprise: MDL-46363 including course lib when create_cours…
Browse files Browse the repository at this point in the history
…e is

used
  • Loading branch information
JimThorpeNZ authored and danmarsden committed Jul 17, 2014
1 parent 8b3d19c commit c62f8bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion enrol/imsenterprise/lib.php
Expand Up @@ -270,13 +270,16 @@ protected static function get_recstatus($tagdata, $tagname) {
* @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)) {
Expand Down

0 comments on commit c62f8bc

Please sign in to comment.