Search in sources :

Example 1 with AssessmentModeGuardController

use of org.olat.course.assessment.ui.mode.AssessmentModeGuardController in project OpenOLAT by OpenOLAT.

the class BaseFullWebappController method checkAssessmentGuard.

private boolean checkAssessmentGuard(UserRequest ureq, TransientAssessmentMode mode) {
    boolean needUpdate;
    if (assessmentGuardCtrl == null) {
        if (lockStatus == LockStatus.need) {
            List<TransientAssessmentMode> modes = mode == null ? Collections.<TransientAssessmentMode>emptyList() : Collections.singletonList(mode);
            assessmentGuardCtrl = new AssessmentModeGuardController(ureq, getWindowControl(), modes, true);
            listenTo(assessmentGuardCtrl);
            assessmentGuardCtrl.getInitialComponent();
            lockStatus = LockStatus.popup;
            lockGUI();
            needUpdate = true;
        } else {
            needUpdate = false;
        }
    } else {
        needUpdate = assessmentGuardCtrl.updateAssessmentMode(ureq);
    }
    return needUpdate;
}
Also used : TransientAssessmentMode(org.olat.course.assessment.model.TransientAssessmentMode) AssessmentModeGuardController(org.olat.course.assessment.ui.mode.AssessmentModeGuardController)

Example 2 with AssessmentModeGuardController

use of org.olat.course.assessment.ui.mode.AssessmentModeGuardController in project openolat by klemens.

the class BaseFullWebappController method checkAssessmentGuard.

private boolean checkAssessmentGuard(UserRequest ureq, TransientAssessmentMode mode) {
    boolean needUpdate;
    if (assessmentGuardCtrl == null) {
        if (lockStatus == LockStatus.need) {
            List<TransientAssessmentMode> modes = mode == null ? Collections.<TransientAssessmentMode>emptyList() : Collections.singletonList(mode);
            assessmentGuardCtrl = new AssessmentModeGuardController(ureq, getWindowControl(), modes, true);
            listenTo(assessmentGuardCtrl);
            assessmentGuardCtrl.getInitialComponent();
            lockStatus = LockStatus.popup;
            lockGUI();
            needUpdate = true;
        } else {
            needUpdate = false;
        }
    } else {
        needUpdate = assessmentGuardCtrl.updateAssessmentMode(ureq);
    }
    return needUpdate;
}
Also used : TransientAssessmentMode(org.olat.course.assessment.model.TransientAssessmentMode) AssessmentModeGuardController(org.olat.course.assessment.ui.mode.AssessmentModeGuardController)

Aggregations

TransientAssessmentMode (org.olat.course.assessment.model.TransientAssessmentMode)2 AssessmentModeGuardController (org.olat.course.assessment.ui.mode.AssessmentModeGuardController)2