nodeListPos = 0;
boolean finished = processNodeList(ureq);
if (finished) {
// no node wanted to provide a controller to import its stuff. We're finished processing the nodes.
// now process any shared folder reference...
CourseConfig courseConfig = course.getCourseEnvironment().getCourseConfig();
if (courseConfig.hasCustomSharedFolder()) {
processSharedFolder(ureq);
}
else if (courseConfig.hasGlossary()) {
processGlossary(ureq);
}
else {
// only when no sharedFolder and no glossary
//getWindowControl().pushAsModalDialog(translator.translate("import.suc.title"), finishedMessage);
// save the editor tree model, to persist any changes made during import.
CourseFactory.saveCourseEditorTreeModel(course.getResourceableId());
callback.finished(ureq);
}
}
} else if (source == activeImportController) {
if (event == Event.DONE_EVENT) {
// continues to search through the list of nodes
boolean finished = processNodeList(ureq);
if (finished) {
CourseConfig courseConfig = CourseConfigManagerImpl.getInstance().loadConfigFor(course);
if (courseConfig.hasCustomSharedFolder()) {
processSharedFolder(ureq);
} else if (courseConfig.hasGlossary()) {
processGlossary(ureq);
} else {
//getWindowControl().pushAsModalDialog(translator.translate("import.suc.title"), finishedMessage);
// save the editor tree model, to persist any changes made during import.
CourseFactory.saveCourseEditorTreeModel(course.getResourceableId());
callback.finished(ureq);
}
}
} else if (event == Event.CANCELLED_EVENT) {
callback.canceled(ureq);
return;
} else if (event == Event.FAILED_EVENT) {
callback.canceled(ureq);
getWindowControl().setError(getTranslator().translate("add.failed"));
return;
}
} else if (source == sharedFolderImportController) {
if (event == Event.DONE_EVENT) {
CourseConfig courseConfig = CourseConfigManagerImpl.getInstance().loadConfigFor(course);
if (courseConfig.hasGlossary()) {
processGlossary(ureq);
} else {
//getWindowControl().pushAsModalDialog(translator.translate("import.suc.title"), finishedMessage);
// save the editor tree model, to persist any changes made during import.
CourseFactory.saveCourseEditorTreeModel(course.getResourceableId());