Skip to content
Snippets Groups Projects
Commit d944c993 authored by srosse's avatar srosse
Browse files

Merge remote-tracking branch 'origin/OpenOLAT_13.2'

parents 49db27b5 c9566a57
No related branches found
No related tags found
No related merge requests found
#Fri May 03 20:47:34 CEST 2019 #Mon May 13 16:59:55 CEST 2019
businessgroup.contact.bodytext=<p></p>---<p>Ir imediatamente para o grupo "{0}"\: {1}</p> businessgroup.contact.bodytext=<p></p>---<p>Ir imediatamente para o grupo "{0}"\: {1}</p>
businessgroup.contact.subject=Mensagem para grupo {0} businessgroup.contact.subject=Mensagem para grupo {0}
contact.all.coaches=Todos os treinadores (coaches) de grupo contact.all.coaches=Todos os treinadores (coaches) de grupo
......
...@@ -99,7 +99,7 @@ digital.signature.mail.test.option=Testquittung per Mail schicken ...@@ -99,7 +99,7 @@ digital.signature.mail.test.option=Testquittung per Mail schicken
digital.signature.test.option=Testquittung erstellen digital.signature.test.option=Testquittung erstellen
digital.signature.text=Testquittung der Testergebnisse digital.signature.text=Testquittung der Testergebnisse
download.log=Logdatei download.log=Logdatei
download.pdf=Resultaten als PDF download.pdf=Resultate als PDF
drawing.brushsize=Pinselgr\u00F6sse drawing.brushsize=Pinselgr\u00F6sse
drawing.opacity=Deckkraft drawing.opacity=Deckkraft
error.as.directed=Alle 4 Antwortm\u00F6glichkeiten m\u00FCssen entweder mit Richtig oder Falsch beantwortet werden. error.as.directed=Alle 4 Antwortm\u00F6glichkeiten m\u00FCssen entweder mit Richtig oder Falsch beantwortet werden.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
admin.description=Der Dokumentenpool stellt eine Dokumentenbibliothek bereit mit automatischer Strukturierung auf der Basis einer Taxonomie und Kompetenzen. admin.description=Der Dokumentenpool stellt eine Dokumentenbibliothek bereit mit automatischer Strukturierung auf der Basis einer Taxonomie und Kompetenzen.
admin.menu.title=Dokumentenpool admin.menu.title=Dokumentenpool
admin.menu.title.alt=Dokumentenpool admin.menu.title.alt=Dokumentenpool
admin.permissions.description=Die Zugangsberechtigungen zum Dokumentenpool basieren auf Kompetenzen von Benutzern auf die jeweiligen Taxonomieebenen. Die Steuerung erfolgt \u00FCber assozierten Ebenentypen. admin.permissions.description=Die Zugangsberechtigungen zum Dokumentenpool basieren auf Kompetenzen von Benutzern auf die jeweiligen Taxonomieebenen. Die Steuerung erfolgt \u00FCber assozierte Ebenentypen.
create.infos.page=Infoseite erstellen create.infos.page=Infoseite erstellen
document.pool.admin.enabled=Dokumentenpool einschalten document.pool.admin.enabled=Dokumentenpool einschalten
document.pool.configuration=Dokumentenpool document.pool.configuration=Dokumentenpool
......
...@@ -260,10 +260,8 @@ public class GenericSelectionPropertyHandler extends AbstractUserPropertyHandler ...@@ -260,10 +260,8 @@ public class GenericSelectionPropertyHandler extends AbstractUserPropertyHandler
} }
if (formItem instanceof SingleSelection) { if (formItem instanceof SingleSelection) {
SingleSelection sel = (SingleSelection)formItem; SingleSelection sel = (SingleSelection)formItem;
if(sel.isOneSelected()) { if(sel.isOneSelected() && !NO_SEL_KEY.equals(sel.getSelectedKey())) {
return sel.getSelectedKey(); return sel.getSelectedKey();
} else {
return null;
} }
} }
return null; return null;
......
...@@ -1228,6 +1228,64 @@ public class BusinessGroupServiceTest extends OlatTestCase { ...@@ -1228,6 +1228,64 @@ public class BusinessGroupServiceTest extends OlatTestCase {
Assert.assertTrue(contactList.contains(adminIdentity)); Assert.assertTrue(contactList.contains(adminIdentity));
} }
@Test
public void allowToLeavingBusinessGroup_subAndMoreOrganisation() {
// a special
String uuid = UUID.randomUUID().toString();
Organisation organisation = organisationService.getDefaultOrganisation();
Organisation subOrganisation1 = organisationService
.createOrganisation("Sub-organisation 1", uuid, "", organisation, null);
Organisation subOrganisation1_1 = organisationService
.createOrganisation("Sub-organisation 1.1", uuid, "", subOrganisation1, null);
Organisation subOrganisation2 = organisationService
.createOrganisation("Sub-organisation 2", uuid, "", organisation, null);
// create an administrator
String adminName = "admin" + uuid;
User adminUser = userManager.createUser("Admin", "Istrator", uuid + "admin@openolat.org");
Identity adminIdentity = securityManager.createAndPersistIdentityAndUser(adminName, null, adminUser, null, adminName);
organisationService.addMember(subOrganisation1, adminIdentity, OrganisationRoles.user);
organisationService.addMember(subOrganisation1, adminIdentity, OrganisationRoles.administrator);
// create a second administrator in the second sub organization
String adminName2 = "admin2" + uuid;
User adminUser2 = userManager.createUser("Admin", "Istrator", uuid + "admin@openolat.org");
Identity adminIdentity2 = securityManager.createAndPersistIdentityAndUser(adminName2, null, adminUser2, null, adminName2);
organisationService.addMember(subOrganisation2, adminIdentity2, OrganisationRoles.user);
organisationService.addMember(subOrganisation2, adminIdentity2, OrganisationRoles.administrator);
// create a third administrator in the organization under the first sub organization
String adminName3 = "admin3" + uuid;
User adminUser3 = userManager.createUser("Admin", "Istrator", uuid + "admin@openolat.org");
Identity adminIdentity3 = securityManager.createAndPersistIdentityAndUser(adminName3, null, adminUser3, null, adminName3);
organisationService.addMember(subOrganisation1, adminIdentity3, OrganisationRoles.user);
organisationService.addMember(subOrganisation1_1, adminIdentity3, OrganisationRoles.administrator);
//create a user
String userName = "user" + uuid;
User user = userManager.createUser("Us", "er", uuid + "user@openolat.org");
Identity userIdentity = securityManager.createAndPersistIdentityAndUser(userName, null, user, null, userName);
organisationService.addMember(subOrganisation1, userIdentity, OrganisationRoles.user);
dbInstance.commitAndCloseSession();
BusinessGroup group = businessGroupService.createBusinessGroup(null, "Leaving group", "But you cannot leave :-(", new Integer(0), new Integer(2), false, false, null);
businessGroupRelationDao.addRole(userIdentity, group, GroupRoles.participant.name());
dbInstance.commitAndCloseSession();
//set to not allowed to leave
group = businessGroupService.updateAllowToLeaveBusinessGroup(group, false);
dbInstance.commitAndCloseSession();
//check the authors group leaving option
LeaveOption optionToLeave = businessGroupService.isAllowToLeaveBusinessGroup(userIdentity, group);
Assert.assertNotNull(optionToLeave);
Assert.assertFalse(optionToLeave.isAllowToLeave());
ContactList contacts = optionToLeave.getContacts();
Collection<Identity> contactList = contacts.getIdentiEmails().values();
Assert.assertNotNull(contactList);
Assert.assertFalse(contactList.isEmpty());
Assert.assertTrue(contactList.contains(adminIdentity));
Assert.assertFalse(contactList.contains(adminIdentity2));
Assert.assertFalse(contactList.contains(adminIdentity3));
}
@Ignore @Test @Ignore @Test
public void parallelRemoveParticipants() { public void parallelRemoveParticipants() {
mailModule.setInterSystem(true); mailModule.setInterSystem(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment