use of org.olat.portfolio.model.structel.EPStructureElementToGroupRelation in project openolat by klemens.
the class EPStructureManager method createBaseGroup.
private EPStructureElementToGroupRelation createBaseGroup(EPStructureElement element, Identity author) {
// create security group
Group ownerGroup = groupDao.createGroup();
EPStructureElementToGroupRelation relation = new EPStructureElementToGroupRelation();
relation.setDefaultGroup(true);
relation.setCreationDate(new Date());
relation.setGroup(ownerGroup);
relation.setStructureElement(element);
groupDao.addMembershipTwoWay(ownerGroup, author, GroupRoles.owner.name());
return relation;
}
use of org.olat.portfolio.model.structel.EPStructureElementToGroupRelation in project openolat by klemens.
the class EPStructureManager method createPortfolioDefaultMap.
protected PortfolioStructureMap createPortfolioDefaultMap(Identity identity, String title, String description) {
EPDefaultMap el = new EPDefaultMap();
fillStructureElement(el, title, description);
// create security group
EPStructureElementToGroupRelation ownerGroup = createBaseGroup(el, identity);
Set<EPStructureElementToGroupRelation> relations = new HashSet<>();
relations.add(ownerGroup);
el.setGroups(relations);
return el;
}
Aggregations