Search in sources :

Example 71 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doEdit.

@Override
protected void doEdit(UserRequest ureq) {
    if ((reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR))) {
        removeCustomCSS();
        popToRoot(ureq);
        cleanUp();
        CourseNode currentCourseNode = getCurrentCourseNode();
        WindowControl bwControl = getSubWindowControl("Editor");
        EditorMainController ctrl = CourseFactory.createEditorController(ureq, addToHistory(ureq, bwControl), toolbarPanel, getRepositoryEntry(), currentCourseNode);
        // user activity logger which was initialized with course run
        if (ctrl != null) {
            editorCtrl = pushController(ureq, "Editor", ctrl);
            listenTo(editorCtrl);
            setIsInEditor(true);
            currentToolCtr = editorCtrl;
            setActiveTool(editLink);
        }
    }
}
Also used : ENCourseNode(org.olat.course.nodes.ENCourseNode) CourseNode(org.olat.course.nodes.CourseNode) WindowControl(org.olat.core.gui.control.WindowControl) EditorMainController(org.olat.course.editor.EditorMainController)

Example 72 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doCertificatesOptions.

private void doCertificatesOptions(UserRequest ureq) {
    if (delayedClose == Delayed.certificates || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) {
            removeCustomCSS();
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            CourseConfig courseConfig = course.getCourseEnvironment().getCourseConfig().clone();
            WindowControl bwControl = getSubWindowControl("CertificationSettings");
            CertificatesOptionsController ctrl = new CertificatesOptionsController(ureq, addToHistory(ureq, bwControl), getRepositoryEntry(), courseConfig, true);
            certificatesOptionsCtrl = pushController(ureq, translate("command.options"), ctrl);
            setActiveTool(certificatesOptionsLink);
            currentToolCtr = certificatesOptionsCtrl;
        }
    } else {
        delayedClose = Delayed.certificates;
    }
}
Also used : CertificatesOptionsController(org.olat.course.certificate.ui.CertificatesOptionsController) ICourse(org.olat.course.ICourse) WindowControl(org.olat.core.gui.control.WindowControl) CourseConfig(org.olat.course.config.CourseConfig)

Example 73 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doEfficiencyStatements.

private void doEfficiencyStatements(UserRequest ureq) {
    if (delayedClose == Delayed.efficiencyStatements || requestForClose(ureq)) {
        // will not be disposed on course run dispose, popus up as new browserwindow
        WindowControl bwControl = getSubWindowControl("Certification");
        CertificateAndEfficiencyStatementController efficiencyStatementController = new CertificateAndEfficiencyStatementController(addToHistory(ureq, bwControl), ureq, getRepositoryEntry());
        listenTo(efficiencyStatementController);
        efficiencyStatementController = pushController(ureq, translate("command.efficiencystatement"), efficiencyStatementController);
        currentToolCtr = efficiencyStatementController;
        setActiveTool(efficiencyStatementsLink);
    } else {
        delayedClose = Delayed.efficiencyStatements;
    }
}
Also used : CertificateAndEfficiencyStatementController(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 74 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doAssessmentTool.

private Activateable2 doAssessmentTool(UserRequest ureq) {
    if (delayedClose == Delayed.assessmentTool || requestForClose(ureq)) {
        OLATResourceable ores = OresHelper.createOLATResourceableType("assessmentToolv2");
        ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
        WindowControl swControl = addToHistory(ureq, ores, null);
        boolean admin = reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_ASSESSMENT);
        boolean nonMembers = reSecurity.isEntryAdmin();
        boolean repositoryEntryMembers = reSecurity.isCourseCoach();
        boolean businessGoupMembers = reSecurity.isGroupCoach();
        List<BusinessGroup> coachedGroups = null;
        if (businessGoupMembers) {
            coachedGroups = getUserCourseEnvironment().getCoachedGroups();
        }
        AssessmentToolSecurityCallback secCallBack = new AssessmentToolSecurityCallback(admin, nonMembers, repositoryEntryMembers, businessGoupMembers, coachedGroups);
        removeCustomCSS();
        AssessmentToolController ctrl = new AssessmentToolController(ureq, swControl, toolbarPanel, getRepositoryEntry(), getUserCourseEnvironment(), secCallBack);
        ctrl.activate(ureq, null, null);
        listenTo(ctrl);
        assessmentToolCtr = pushController(ureq, translate("command.openassessment"), ctrl);
        assessmentToolCtr.assessmentModeMessage();
        currentToolCtr = assessmentToolCtr;
        setActiveTool(assessmentLink);
        ctrl.initToolbar();
        return assessmentToolCtr;
    } else {
        delayedClose = Delayed.assessmentTool;
    }
    return null;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) BusinessGroup(org.olat.group.BusinessGroup) AssessmentToolSecurityCallback(org.olat.modules.assessment.ui.AssessmentToolSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl) AssessmentToolController(org.olat.course.assessment.ui.tool.AssessmentToolController)

Example 75 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doMembers.

@Override
protected Activateable2 doMembers(UserRequest ureq) {
    if (delayedClose == Delayed.members || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT) || hasCourseRight(CourseRights.RIGHT_MEMBERMANAGEMENT)) {
            removeCustomCSS();
            if (currentToolCtr instanceof MembersManagementMainController) {
                ((MembersManagementMainController) currentToolCtr).activate(ureq, null, null);
            } else {
                WindowControl bwControl = getSubWindowControl("MembersMgmt");
                MembersManagementMainController ctrl = new MembersManagementMainController(ureq, addToHistory(ureq, bwControl), toolbarPanel, getRepositoryEntry(), getUserCourseEnvironment(), reSecurity.isEntryAdmin(), hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT), hasCourseRight(CourseRights.RIGHT_MEMBERMANAGEMENT));
                listenTo(ctrl);
                membersCtrl = pushController(ureq, translate("command.opensimplegroupmngt"), ctrl);
                setActiveTool(membersLink);
                currentToolCtr = membersCtrl;
            }
        }
    } else {
        delayedClose = Delayed.members;
    }
    return membersCtrl;
}
Also used : WindowControl(org.olat.core.gui.control.WindowControl) MembersManagementMainController(org.olat.course.member.MembersManagementMainController)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)628 OLATResourceable (org.olat.core.id.OLATResourceable)300 UserRequest (org.olat.core.gui.UserRequest)136 Controller (org.olat.core.gui.control.Controller)70 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)68 RepositoryEntry (org.olat.repository.RepositoryEntry)68 StepsMainRunController (org.olat.core.gui.control.generic.wizard.StepsMainRunController)64 ContextEntry (org.olat.core.id.context.ContextEntry)58 Step (org.olat.core.gui.control.generic.wizard.Step)56 StepRunnerCallback (org.olat.core.gui.control.generic.wizard.StepRunnerCallback)56 StepsRunContext (org.olat.core.gui.control.generic.wizard.StepsRunContext)56 BusinessControl (org.olat.core.id.context.BusinessControl)56 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)46 ArrayList (java.util.ArrayList)42 Identity (org.olat.core.id.Identity)38 StateSite (org.olat.core.id.context.StateSite)32 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)28 AssertException (org.olat.core.logging.AssertException)24 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)22 List (java.util.List)20