use of org.olat.course.nodes.bc.BCPeekviewController in project OpenOLAT by OpenOLAT.
the class BCCourseNode method createPeekViewRunController.
/**
* @see org.olat.course.nodes.GenericCourseNode#createPeekViewRunController(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation)
*/
@Override
public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
if (ne.isAtLeastOneAccessible()) {
updateModuleConfigDefaults(false);
// Create a folder peekview controller that shows the latest two entries
VFSContainer rootFolder = null;
if (getModuleConfiguration().getBooleanSafe(BCCourseNodeEditController.CONFIG_AUTO_FOLDER)) {
rootFolder = getNodeFolderContainer(this, userCourseEnv.getCourseEnvironment());
} else {
String subPath = getModuleConfiguration().getStringValue(BCCourseNodeEditController.CONFIG_SUBPATH, "");
VFSItem item = userCourseEnv.getCourseEnvironment().getCourseFolderContainer().resolve(subPath);
if (item instanceof VFSContainer) {
rootFolder = (VFSContainer) item;
}
}
if (rootFolder == null) {
return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
}
rootFolder.setDefaultItemFilter(new SystemItemFilter());
return new BCPeekviewController(ureq, wControl, rootFolder, getIdent(), 4);
} else {
// use standard peekview
return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
}
}
use of org.olat.course.nodes.bc.BCPeekviewController in project openolat by klemens.
the class BCCourseNode method createPeekViewRunController.
/**
* @see org.olat.course.nodes.GenericCourseNode#createPeekViewRunController(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation)
*/
@Override
public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
if (ne.isAtLeastOneAccessible()) {
updateModuleConfigDefaults(false);
// Create a folder peekview controller that shows the latest two entries
VFSContainer rootFolder = null;
if (getModuleConfiguration().getBooleanSafe(BCCourseNodeEditController.CONFIG_AUTO_FOLDER)) {
rootFolder = getNodeFolderContainer(this, userCourseEnv.getCourseEnvironment());
} else {
String subPath = getModuleConfiguration().getStringValue(BCCourseNodeEditController.CONFIG_SUBPATH, "");
VFSItem item = userCourseEnv.getCourseEnvironment().getCourseFolderContainer().resolve(subPath);
if (item instanceof VFSContainer) {
rootFolder = (VFSContainer) item;
}
}
if (rootFolder == null) {
return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
}
rootFolder.setDefaultItemFilter(new SystemItemFilter());
return new BCPeekviewController(ureq, wControl, rootFolder, getIdent(), 4);
} else {
// use standard peekview
return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
}
}
Aggregations