use of org.olat.repository.LeavingStatusList in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doLeave.
private void doLeave(UserRequest ureq) {
if (roles.isGuestOnly())
return;
MailerResult result = new MailerResult();
MailPackage reMailing = new MailPackage(result, getWindowControl().getBusinessControl().getAsString(), true);
// leave course
LeavingStatusList status = new LeavingStatusList();
repositoryManager.leave(getIdentity(), getRepositoryEntry(), status, reMailing);
// leave groups
businessGroupService.leave(getIdentity(), getRepositoryEntry(), status, reMailing);
if (status.isWarningManagedGroup() || status.isWarningManagedCourse()) {
showWarning("sign.out.warning.managed");
} else if (status.isWarningGroupWithMultipleResources()) {
showWarning("sign.out.warning.mutiple.resources");
} else {
showInfo("sign.out.success", new String[] { getRepositoryEntry().getDisplayname() });
}
doClose(ureq);
}
use of org.olat.repository.LeavingStatusList in project openolat by klemens.
the class RepositoryEntryDetailsController method doLeave.
protected void doLeave() {
if (guestOnly)
return;
MailerResult result = new MailerResult();
MailPackage reMailing = new MailPackage(result, getWindowControl().getBusinessControl().getAsString(), true);
LeavingStatusList status = new LeavingStatusList();
// leave course
repositoryManager.leave(getIdentity(), entry, status, reMailing);
// leave groups
businessGroupService.leave(getIdentity(), entry, status, reMailing);
// make sur all changes are committed
DBFactory.getInstance().commit();
if (status.isWarningManagedGroup() || status.isWarningManagedCourse()) {
showWarning("sign.out.warning.managed");
} else if (status.isWarningGroupWithMultipleResources()) {
showWarning("sign.out.warning.mutiple.resources");
} else {
showInfo("sign.out.success", new String[] { entry.getDisplayname() });
}
}
use of org.olat.repository.LeavingStatusList in project openolat by klemens.
the class CourseRuntimeController method doLeave.
private void doLeave(UserRequest ureq) {
if (roles.isGuestOnly())
return;
MailerResult result = new MailerResult();
MailPackage reMailing = new MailPackage(result, getWindowControl().getBusinessControl().getAsString(), true);
// leave course
LeavingStatusList status = new LeavingStatusList();
repositoryManager.leave(getIdentity(), getRepositoryEntry(), status, reMailing);
// leave groups
businessGroupService.leave(getIdentity(), getRepositoryEntry(), status, reMailing);
if (status.isWarningManagedGroup() || status.isWarningManagedCourse()) {
showWarning("sign.out.warning.managed");
} else if (status.isWarningGroupWithMultipleResources()) {
showWarning("sign.out.warning.mutiple.resources");
} else {
showInfo("sign.out.success", new String[] { getRepositoryEntry().getDisplayname() });
}
doClose(ureq);
}
use of org.olat.repository.LeavingStatusList in project OpenOLAT by OpenOLAT.
the class RepositoryEntryDetailsController method doLeave.
protected void doLeave() {
if (guestOnly)
return;
MailerResult result = new MailerResult();
MailPackage reMailing = new MailPackage(result, getWindowControl().getBusinessControl().getAsString(), true);
LeavingStatusList status = new LeavingStatusList();
// leave course
repositoryManager.leave(getIdentity(), entry, status, reMailing);
// leave groups
businessGroupService.leave(getIdentity(), entry, status, reMailing);
// make sur all changes are committed
DBFactory.getInstance().commit();
if (status.isWarningManagedGroup() || status.isWarningManagedCourse()) {
showWarning("sign.out.warning.managed");
} else if (status.isWarningGroupWithMultipleResources()) {
showWarning("sign.out.warning.mutiple.resources");
} else {
showInfo("sign.out.success", new String[] { entry.getDisplayname() });
}
}
Aggregations