use of org.olat.modules.portfolio.model.SectionRefImpl in project OpenOLAT by OpenOLAT.
the class TableOfContentController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty()) {
return;
}
String resName = entries.get(0).getOLATResourceable().getResourceableTypeName();
if ("Page".equalsIgnoreCase(resName) || "Entry".equalsIgnoreCase(resName)) {
Long pageKey = entries.get(0).getOLATResourceable().getResourceableId();
Page page = portfolioService.getPageByKey(pageKey);
if (page != null && page.getSection() != null && binder.equals(page.getSection().getBinder())) {
Activateable2 activateable = doOpenPage(ureq, page);
if (activateable != null) {
List<ContextEntry> subEntries = entries.subList(1, entries.size());
activateable.activate(ureq, subEntries, entries.get(0).getTransientState());
}
}
} else if ("Section".equalsIgnoreCase(resName)) {
Long sectionKey = entries.get(0).getOLATResourceable().getResourceableId();
Section section = portfolioService.getSection(new SectionRefImpl(sectionKey));
if (section != null && binder.equals(section.getBinder())) {
doOpenSection(ureq, section);
}
}
}
use of org.olat.modules.portfolio.model.SectionRefImpl in project openolat by klemens.
the class TableOfContentController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty()) {
return;
}
String resName = entries.get(0).getOLATResourceable().getResourceableTypeName();
if ("Page".equalsIgnoreCase(resName) || "Entry".equalsIgnoreCase(resName)) {
Long pageKey = entries.get(0).getOLATResourceable().getResourceableId();
Page page = portfolioService.getPageByKey(pageKey);
if (page != null && page.getSection() != null && binder.equals(page.getSection().getBinder())) {
Activateable2 activateable = doOpenPage(ureq, page);
if (activateable != null) {
List<ContextEntry> subEntries = entries.subList(1, entries.size());
activateable.activate(ureq, subEntries, entries.get(0).getTransientState());
}
}
} else if ("Section".equalsIgnoreCase(resName)) {
Long sectionKey = entries.get(0).getOLATResourceable().getResourceableId();
Section section = portfolioService.getSection(new SectionRefImpl(sectionKey));
if (section != null && binder.equals(section.getBinder())) {
doOpenSection(ureq, section);
}
}
}
Aggregations