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);
}
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));
}
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);
}
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));
}
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);
}
Aggregations