Search in sources :

Example 1 with FOPeekviewController

use of org.olat.course.nodes.fo.FOPeekviewController in project OpenOLAT by OpenOLAT.

the class ForumNodeForumCallback 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()) {
        // Create a forum peekview controller that shows the latest two messages
        Forum theForum = loadOrCreateForum(userCourseEnv.getCourseEnvironment());
        RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
        Controller peekViewController = new FOPeekviewController(ureq, wControl, courseEntry, theForum, getIdent(), 3);
        return peekViewController;
    } else {
        // use standard peekview
        return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
    }
}
Also used : FOPeekviewController(org.olat.course.nodes.fo.FOPeekviewController) RepositoryEntry(org.olat.repository.RepositoryEntry) FOPreviewController(org.olat.course.nodes.fo.FOPreviewController) FOCourseNodeRunController(org.olat.course.nodes.fo.FOCourseNodeRunController) NodeEditController(org.olat.course.editor.NodeEditController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) FOCourseNodeEditController(org.olat.course.nodes.fo.FOCourseNodeEditController) FOPeekviewController(org.olat.course.nodes.fo.FOPeekviewController) Controller(org.olat.core.gui.control.Controller) Forum(org.olat.modules.fo.Forum)

Example 2 with FOPeekviewController

use of org.olat.course.nodes.fo.FOPeekviewController in project openolat by klemens.

the class ForumNodeForumCallback 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()) {
        // Create a forum peekview controller that shows the latest two messages
        Forum theForum = loadOrCreateForum(userCourseEnv.getCourseEnvironment());
        RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
        Controller peekViewController = new FOPeekviewController(ureq, wControl, courseEntry, theForum, getIdent(), 3);
        return peekViewController;
    } else {
        // use standard peekview
        return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
    }
}
Also used : FOPeekviewController(org.olat.course.nodes.fo.FOPeekviewController) RepositoryEntry(org.olat.repository.RepositoryEntry) FOPreviewController(org.olat.course.nodes.fo.FOPreviewController) FOCourseNodeRunController(org.olat.course.nodes.fo.FOCourseNodeRunController) NodeEditController(org.olat.course.editor.NodeEditController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) FOCourseNodeEditController(org.olat.course.nodes.fo.FOCourseNodeEditController) FOPeekviewController(org.olat.course.nodes.fo.FOPeekviewController) Controller(org.olat.core.gui.control.Controller) Forum(org.olat.modules.fo.Forum)

Aggregations

Controller (org.olat.core.gui.control.Controller)2 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 FOCourseNodeEditController (org.olat.course.nodes.fo.FOCourseNodeEditController)2 FOCourseNodeRunController (org.olat.course.nodes.fo.FOCourseNodeRunController)2 FOPeekviewController (org.olat.course.nodes.fo.FOPeekviewController)2 FOPreviewController (org.olat.course.nodes.fo.FOPreviewController)2 Forum (org.olat.modules.fo.Forum)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2