Search in sources :

Example 6 with NodeRunConstructionResult

use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.

the class DialogCourseNode method createNodeRunConstructionResult.

/**
 * @see org.olat.course.nodes.GenericCourseNode#createNodeRunConstructionResult(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.control.WindowControl,
 *      org.olat.course.run.userview.UserCourseEnvironment,
 *      org.olat.course.run.userview.NodeEvaluation, java.lang.String)
 */
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    DialogCourseNodeRunController ctrl = new DialogCourseNodeRunController(ureq, wControl, this, userCourseEnv, ne);
    Controller wrappedCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, ctrl, this, "o_dialog_icon");
    return new NodeRunConstructionResult(wrappedCtrl);
}
Also used : DialogCourseNodeRunController(org.olat.course.nodes.dialog.ui.DialogCourseNodeRunController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) DialogCourseNodeRunController(org.olat.course.nodes.dialog.ui.DialogCourseNodeRunController) DialogCourseNodeEditController(org.olat.course.nodes.dialog.ui.DialogCourseNodeEditController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 7 with NodeRunConstructionResult

use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.

the class EdubaseCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller runCtrl;
    if (userCourseEnv.isCourseReadOnly()) {
        Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
        String title = trans.translate("freezenoaccess.title");
        String message = trans.translate("freezenoaccess.message");
        runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else if (userCourseEnv.getIdentityEnvironment().getRoles().isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
        String title = trans.translate("guestnoaccess.title");
        String message = trans.translate("guestnoaccess.message");
        runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
        runCtrl = new EdubaseRunController(ureq, wControl, this.getModuleConfiguration());
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, runCtrl, this, "o_edubase_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : EdubaseRunController(org.olat.course.nodes.edubase.EdubaseRunController) Translator(org.olat.core.gui.translator.Translator) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) EdubaseRunController(org.olat.course.nodes.edubase.EdubaseRunController) EdubaseEditController(org.olat.course.nodes.edubase.EdubaseEditController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) EdubasePeekViewController(org.olat.course.nodes.edubase.EdubasePeekViewController) ConditionEditController(org.olat.course.condition.ConditionEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 8 with NodeRunConstructionResult

use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.

the class GTACourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(GTACourseNode.class, ureq.getLocale());
        String title = trans.translate("guestnoaccess.title");
        String message = trans.translate("guestnoaccess.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
        controller = new GTARunController(ureq, wControl, this, userCourseEnv);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_gta_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : GTARunController(org.olat.course.nodes.gta.ui.GTARunController) Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) GroupRoles(org.olat.basesecurity.GroupRoles) NodeEditController(org.olat.course.editor.NodeEditController) GTAEditController(org.olat.course.nodes.gta.ui.GTAEditController) GTAAssessmentDetailsController(org.olat.course.nodes.gta.ui.GTAAssessmentDetailsController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) GTACoachedGroupListController(org.olat.course.nodes.gta.ui.GTACoachedGroupListController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) GTAIdentityListCourseNodeController(org.olat.course.nodes.gta.ui.GTAIdentityListCourseNodeController) Controller(org.olat.core.gui.control.Controller) GTARunController(org.olat.course.nodes.gta.ui.GTARunController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 9 with NodeRunConstructionResult

use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.

the class GoToMeetingCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(GoToMeetingEditController.class, ureq.getLocale());
        String title = trans.translate("guestnoaccess.title");
        String message = trans.translate("guestnoaccess.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
        // check if user is moderator of the virtual classroom
        boolean admin = roles.isOLATAdmin();
        boolean moderator = admin;
        RepositoryEntry re = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
        if (!admin) {
            RepositoryManager rm = RepositoryManager.getInstance();
            if (re != null) {
                admin = rm.isOwnerOfRepositoryEntry(ureq.getIdentity(), re) || rm.isInstitutionalRessourceManagerFor(ureq.getIdentity(), roles, re);
                moderator = admin || rm.isIdentityInTutorSecurityGroup(ureq.getIdentity(), re) || isCoach(re, ureq.getIdentity());
            }
        }
        // create run controller
        RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
        controller = new GoToMeetingRunController(ureq, wControl, courseEntry, getIdent(), null, admin, moderator, userCourseEnv.isCourseReadOnly());
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_gotomeeting_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : Translator(org.olat.core.gui.translator.Translator) GoToMeetingRunController(org.olat.modules.gotomeeting.ui.GoToMeetingRunController) Roles(org.olat.core.id.Roles) RepositoryManager(org.olat.repository.RepositoryManager) RepositoryEntry(org.olat.repository.RepositoryEntry) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) GoToMeetingPeekViewController(org.olat.course.nodes.gotomeeting.GoToMeetingPeekViewController) GoToMeetingEditController(org.olat.course.nodes.gotomeeting.GoToMeetingEditController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) GoToMeetingRunController(org.olat.modules.gotomeeting.ui.GoToMeetingRunController) ConditionEditController(org.olat.course.condition.ConditionEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 10 with NodeRunConstructionResult

use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.

the class InfoCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    InfoRunController infoCtrl = new InfoRunController(ureq, wControl, userCourseEnv, ne, this);
    Controller titledCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, infoCtrl, this, "o_infomsg_icon");
    return new NodeRunConstructionResult(titledCtrl);
}
Also used : InfoRunController(org.olat.course.nodes.info.InfoRunController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) InfoRunController(org.olat.course.nodes.info.InfoRunController) InfoCourseNodeEditController(org.olat.course.nodes.info.InfoCourseNodeEditController) InfoPeekViewController(org.olat.course.nodes.info.InfoPeekViewController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Aggregations

NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)72 Controller (org.olat.core.gui.control.Controller)62 NodeEditController (org.olat.course.editor.NodeEditController)62 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)60 Translator (org.olat.core.gui.translator.Translator)36 Roles (org.olat.core.id.Roles)36 ConditionEditController (org.olat.course.condition.ConditionEditController)22 AssessmentCourseNodeController (org.olat.course.assessment.ui.tool.AssessmentCourseNodeController)20 RepositoryEntry (org.olat.repository.RepositoryEntry)18 PackageTranslator (org.olat.core.gui.translator.PackageTranslator)12 OLATResourceable (org.olat.core.id.OLATResourceable)10 IdentityListCourseNodeController (org.olat.course.assessment.ui.tool.IdentityListCourseNodeController)8 SubscriptionContext (org.olat.core.commons.services.notifications.SubscriptionContext)6 ICourse (org.olat.course.ICourse)6 AssessmentManager (org.olat.course.assessment.AssessmentManager)6 CourseIQSecurityCallback (org.olat.course.nodes.iq.CourseIQSecurityCallback)6 IQEditController (org.olat.course.nodes.iq.IQEditController)6 RepositoryManager (org.olat.repository.RepositoryManager)6 BusinessControl (org.olat.core.id.context.BusinessControl)4 BusinessControlFactory (org.olat.core.id.context.BusinessControlFactory)4