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

Merge OpenOLAT default branch to OpenOLAT qti with a123f50a275b4081bda1825b26dd4907620a1068

parents 3b5675b2 98512d5a
No related branches found
No related tags found
No related merge requests found
......@@ -280,7 +280,7 @@ public class EPMultipleMapController extends BasicController implements Activate
EPTargetResource resource = structMap.getTargetResource();
RepositoryEntry repoEntry = RepositoryManager.getInstance().lookupRepositoryEntry(resource.getOLATResourceable(), false);
if(repoEntry != null) {
vC.contextPut("courseName" + i, repoEntry.getDisplayname());
vC.contextPut("courseName" + i, StringHelper.escapeHtml(repoEntry.getDisplayname()));
String url = Settings.getServerContextPathURI();
url += "/url/RepositoryEntry/" + repoEntry.getKey() + "/CourseNode/" + resource.getSubPath();
vC.contextPut("courseLink" + i, url);
......
......@@ -26,6 +26,7 @@ import java.util.UUID;
import org.junit.Assert;
import org.junit.Test;
import org.olat.basesecurity.Group;
import org.olat.basesecurity.Invitation;
import org.olat.core.commons.persistence.DB;
import org.olat.core.id.Identity;
......@@ -64,6 +65,21 @@ public class InvitationDAOTest extends OlatTestCase {
Assert.assertNotNull(invitation.getToken());
}
@Test
public void findInvitation_group() {
Invitation invitation = invitationDao.createAndPersistInvitation();
Group baseGroup = invitation.getBaseGroup();
Assert.assertNotNull(invitation);
dbInstance.commitAndCloseSession();
Invitation reloadedInvitation = invitationDao.findInvitation(baseGroup);
Assert.assertNotNull(reloadedInvitation);
Assert.assertNotNull(reloadedInvitation.getKey());
Assert.assertEquals(baseGroup, reloadedInvitation.getBaseGroup());
Assert.assertEquals(invitation, reloadedInvitation);
Assert.assertEquals(invitation.getToken(), reloadedInvitation.getToken());
}
@Test
public void findInvitation_token() {
Invitation invitation = invitationDao.createAndPersistInvitation();
......@@ -78,6 +94,7 @@ public class InvitationDAOTest extends OlatTestCase {
Assert.assertEquals(invitation.getToken(), reloadedInvitation.getToken());
}
@Test
public void hasInvitationPolicies_testHQL() {
String token = UUID.randomUUID().toString();
......
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