Search in sources :

Example 1 with SPPeekviewController

use of org.olat.course.nodes.sp.SPPeekviewController in project OpenOLAT by OpenOLAT.

the class SPCourseNode 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)
 */
public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
    if (ne.isAtLeastOneAccessible()) {
        OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
        ModuleConfiguration config = getModuleConfiguration();
        return new SPPeekviewController(ureq, wControl, userCourseEnv, config, ores);
    } else {
        // use standard peekview
        return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
    }
}
Also used : ModuleConfiguration(org.olat.modules.ModuleConfiguration) OLATResourceable(org.olat.core.id.OLATResourceable) SPPeekviewController(org.olat.course.nodes.sp.SPPeekviewController)

Example 2 with SPPeekviewController

use of org.olat.course.nodes.sp.SPPeekviewController in project openolat by klemens.

the class SPCourseNode 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)
 */
public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
    if (ne.isAtLeastOneAccessible()) {
        OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
        ModuleConfiguration config = getModuleConfiguration();
        return new SPPeekviewController(ureq, wControl, userCourseEnv, config, ores);
    } else {
        // use standard peekview
        return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
    }
}
Also used : ModuleConfiguration(org.olat.modules.ModuleConfiguration) OLATResourceable(org.olat.core.id.OLATResourceable) SPPeekviewController(org.olat.course.nodes.sp.SPPeekviewController)

Aggregations

OLATResourceable (org.olat.core.id.OLATResourceable)2 SPPeekviewController (org.olat.course.nodes.sp.SPPeekviewController)2 ModuleConfiguration (org.olat.modules.ModuleConfiguration)2