diff --git a/src/main/java/at/ac/uibk/course/CreateCourseRepositoryEntryController.java b/src/main/java/at/ac/uibk/course/CreateCourseRepositoryEntryController.java index dbc663dfab6e7e51663d6158c9db3295bcea4383..ab170c7a1b147ee1ab5455f730814fca8d8f33e7 100644 --- a/src/main/java/at/ac/uibk/course/CreateCourseRepositoryEntryController.java +++ b/src/main/java/at/ac/uibk/course/CreateCourseRepositoryEntryController.java @@ -425,10 +425,13 @@ public class CreateCourseRepositoryEntryController extends FormBasicController i NewValueChosenEvent nvce = (NewValueChosenEvent) event; createCourseModel.setCourseTitle(nvce.getEntries().get(0)); // reset the sisCourse - createCourseModel.setSelectedSisCourse(null); - createCourseModel.clearAdditionalOwners(); + if (createCourseModel.getSelectedSisCourse() != null) { + createCourseModel.clearAdditionalOwners(); + } createCourseModel.addAdditionalOwner(userIdentity); + createCourseModel.setSelectedSisCourse(null); + updateOwnerCheckBoxesFromModel(); ownerCheckBoxes.setVisible(true); ownerCheckBoxButtonContainer.setVisible(true); @@ -545,7 +548,7 @@ public class CreateCourseRepositoryEntryController extends FormBasicController i managedFlags = createCourseConfig.getManagedFlagsSyncedNoRegistration(); } } else { - externalCourseId = ""; + externalCourseId = null; managedFlags = createCourseConfig.getManagedFlagsAutonom(); } @@ -674,7 +677,7 @@ public class CreateCourseRepositoryEntryController extends FormBasicController i * /** send invalidation event to the ESB when the course got an * external id */ - if (externalCourseId != null) { + if (isCreatedFromSisCourse) { SisManager.getInstance().sendInvalidateCourseEvent(externalCourseId); }