Search in sources :

Example 1 with AssessmentToolController

use of org.olat.course.assessment.ui.tool.AssessmentToolController 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 2 with AssessmentToolController

use of org.olat.course.assessment.ui.tool.AssessmentToolController in project openolat by klemens.

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)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 AssessmentToolController (org.olat.course.assessment.ui.tool.AssessmentToolController)2 BusinessGroup (org.olat.group.BusinessGroup)2 AssessmentToolSecurityCallback (org.olat.modules.assessment.ui.AssessmentToolSecurityCallback)2