|
|
|
|
@ -15,6 +15,10 @@ class CourseCategoriesLoader implements LoaderInterface |
|
|
|
|
/** |
|
|
|
|
* Load the data and return the ID inserted. |
|
|
|
|
* |
|
|
|
|
* @param array $incomingData |
|
|
|
|
* |
|
|
|
|
* @throws \Exception |
|
|
|
|
* |
|
|
|
|
* @return int |
|
|
|
|
*/ |
|
|
|
|
public function load(array $incomingData) |
|
|
|
|
@ -26,6 +30,10 @@ class CourseCategoriesLoader implements LoaderInterface |
|
|
|
|
$incomingData['parent_id'] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (empty($id)) { |
|
|
|
|
throw new \Exception("Course category ({$incomingData['code']}) not migrated. Maybe it already exists."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$tblUrlCategory = \Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE_CATEGORY); |
|
|
|
|
$accessUrlId = \MigrationMoodlePlugin::create()->getAccessUrlId(); |
|
|
|
|
|
|
|
|
|
|