Search in sources :

Example 6 with AssessmentFormEvent

use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project OpenOLAT by OpenOLAT.

the class AssessmentForm method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (saveAndDoneLink == source) {
        if (validateFormLogic(ureq)) {
            doUpdateAssessmentData(true);
            fireEvent(ureq, new AssessmentFormEvent(AssessmentFormEvent.ASSESSMENT_DONE, true));
        }
    } else if (reopenLink == source) {
        doReopen();
        fireEvent(ureq, new AssessmentFormEvent(AssessmentFormEvent.ASSESSMENT_REOPEN, false));
    } else if (uploadDocsEl == source) {
        if (uploadDocsEl.getUploadFile() != null && StringHelper.containsNonWhitespace(uploadDocsEl.getUploadFileName())) {
            assessableCourseNode.addIndividualAssessmentDocument(uploadDocsEl.getUploadFile(), uploadDocsEl.getUploadFileName(), assessedUserCourseEnv, getIdentity());
            reloadAssessmentDocs();
            uploadDocsEl.reset();
        }
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        Object uobject = link.getUserObject();
        if (link.getCmd() != null && link.getCmd().startsWith("delete_doc_") && uobject instanceof DocumentWrapper) {
            DocumentWrapper wrapper = (DocumentWrapper) uobject;
            doConfirmDeleteAssessmentDocument(ureq, wrapper.getDocument());
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : AssessmentFormEvent(org.olat.modules.assessment.ui.event.AssessmentFormEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 7 with AssessmentFormEvent

use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project OpenOLAT by OpenOLAT.

the class AssessmentForm method formOK.

@Override
protected void formOK(UserRequest ureq) {
    doUpdateAssessmentData(false);
    fireEvent(ureq, new AssessmentFormEvent(AssessmentFormEvent.ASSESSMENT_CHANGED, true));
}
Also used : AssessmentFormEvent(org.olat.modules.assessment.ui.event.AssessmentFormEvent)

Example 8 with AssessmentFormEvent

use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project OpenOLAT by OpenOLAT.

the class GTACoachedParticipantGradingController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (assessmentForm == source) {
        if (event instanceof AssessmentFormEvent) {
            UserCourseEnvironment assessedUserCourseEnv = assessmentForm.getAssessedUserCourseEnvironment();
            doGraded(ureq, assessedUserCourseEnv);
        }
        cmc.deactivate();
        cleanUp();
    } else if (cmc == source) {
        cleanUp();
    }
    super.event(ureq, source, event);
}
Also used : AssessmentFormEvent(org.olat.modules.assessment.ui.event.AssessmentFormEvent) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment)

Example 9 with AssessmentFormEvent

use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project OpenOLAT by OpenOLAT.

the class AssessmentForm method formOK.

@Override
protected void formOK(UserRequest ureq) {
    doUpdateAssessmentData(false);
    fireEvent(ureq, new AssessmentFormEvent(AssessmentFormEvent.ASSESSMENT_CHANGED, true));
}
Also used : AssessmentFormEvent(org.olat.modules.assessment.ui.event.AssessmentFormEvent)

Example 10 with AssessmentFormEvent

use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project OpenOLAT by OpenOLAT.

the class AssessmentForm method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (saveAndDoneLink == source) {
        if (validateFormLogic(ureq)) {
            doUpdateAssessmentData(true);
            fireEvent(ureq, new AssessmentFormEvent(AssessmentFormEvent.ASSESSMENT_DONE, true));
        }
    } else if (reopenLink == source) {
        doReopen();
        fireEvent(ureq, new AssessmentFormEvent(AssessmentFormEvent.ASSESSMENT_CHANGED, false));
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : AssessmentFormEvent(org.olat.modules.assessment.ui.event.AssessmentFormEvent)

Aggregations

AssessmentFormEvent (org.olat.modules.assessment.ui.event.AssessmentFormEvent)14 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)2 ShowDetailsEvent (org.olat.course.assessment.ui.tool.event.ShowDetailsEvent)2 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)2