39 $DIC->language()->loadLanguageModule(
'orgu');
43 $xml = simplexml_load_string($params[
'OrgUnitTree']);
46 foreach (
$xml->children() as $ou_id => $node) {
47 $importer->simpleImportElement(simplexml_load_string($node->asXML()));
50 throw new \ilSoapPluginException(
"Could not Read the XML File");
53 if (count($importer->getErrors()) || count($importer->getWarnings())) {
55 if ($importer->hasWarnings()) {
56 $arr_msg[] = $DIC->language()->txt(
"import_terminated_with_warnings");
57 foreach ($importer->getWarnings() as $warning) {
58 $arr_msg[$warning[
"import_id"]] = $DIC->language()->txt($warning[
"lang_var"]) .
" (Import ID: " . $warning[
"import_id"] .
")";
61 if ($importer->hasErrors()) {
62 $arr_msg[] = $DIC->language()->txt(
"import_terminated_with_errors");
63 foreach ($importer->getErrors() as
$error) {
64 $arr_msg[
$error[
"import_id"]] = $DIC->language()->txt($error[
"lang_var"]) .
" (Import ID: " . $error[
"import_id"] .
")";
68 throw new \ilSoapPluginException(implode(
" / ", $arr_msg));
76 return "importOrgUnitsSimpleXML";
91 return "Imports ILIAS Organisational Units (SimpleXML)";
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAdditionalInputParams()
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
getName()
Get the name of the method.
getOutputParams()
Get the output parameters in the same format as the input parameters.
getDocumentation()
Get the documentation of this method.