use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project OpenOLAT by OpenOLAT.
the class AssessedIdentityRepositoryEntryController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (assessmentForm == source) {
if (event instanceof AssessmentFormEvent) {
AssessmentFormEvent afe = (AssessmentFormEvent) event;
if (afe.isClose()) {
stackPanel.popController(assessmentForm);
fireEvent(ureq, Event.DONE_EVENT);
} else {
fireEvent(ureq, Event.CHANGED_EVENT);
}
} else if (event == Event.CANCELLED_EVENT) {
stackPanel.popController(assessmentForm);
}
} else if (detailsCtrl == source) {
if (event == Event.CHANGED_EVENT || event == Event.DONE_EVENT) {
assessmentForm.reloadData();
fireEvent(ureq, Event.CHANGED_EVENT);
}
}
super.event(ureq, source, event);
}
use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project openolat by klemens.
the class IdentityListCourseNodeController method event.
@Override
public void event(UserRequest ureq, Controller source, Event event) {
if (currentIdentityCtrl == source) {
if (event instanceof AssessmentFormEvent) {
AssessmentFormEvent aee = (AssessmentFormEvent) event;
loadModel(ureq);
if (aee.isClose()) {
stackPanel.popController(currentIdentityCtrl);
}
} else if (event == Event.CHANGED_EVENT) {
loadModel(ureq);
} else if (event == Event.CANCELLED_EVENT) {
stackPanel.popController(currentIdentityCtrl);
}
} else if (bulkToolsList != null && bulkToolsList.contains(source)) {
if (event == Event.CHANGED_EVENT) {
loadModel(ureq);
}
} else if (changeUserVisibilityCtrl == source) {
if (event == Event.DONE_EVENT) {
doSetVisibility(ureq, changeUserVisibilityCtrl.getVisibility(), changeUserVisibilityCtrl.getRows());
}
cmc.deactivate();
cleanUp();
} else if (toolsCtrl == source) {
if (event instanceof ShowDetailsEvent) {
doSelect(ureq, ((ShowDetailsEvent) event).getAssessedIdentity());
toolsCalloutCtrl.deactivate();
cleanUp();
} else if (event == Event.CHANGED_EVENT) {
loadModel(ureq);
toolsCalloutCtrl.deactivate();
cleanUp();
} else if (event == Event.CLOSE_EVENT) {
// don't dispose it, there are some popup window at work
toolsCalloutCtrl.deactivate();
} else if (event == Event.CANCELLED_EVENT) {
toolsCalloutCtrl.deactivate();
cleanUp();
}
} else if (toolsCalloutCtrl == source) {
cleanUp();
} else if (cmc == source) {
cleanUp();
}
super.event(ureq, source, event);
}
use of org.olat.modules.assessment.ui.event.AssessmentFormEvent in project openolat by klemens.
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 klemens.
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 IdentityListCourseNodeController method event.
@Override
public void event(UserRequest ureq, Controller source, Event event) {
if (currentIdentityCtrl == source) {
if (event instanceof AssessmentFormEvent) {
AssessmentFormEvent aee = (AssessmentFormEvent) event;
loadModel(ureq);
if (aee.isClose()) {
stackPanel.popController(currentIdentityCtrl);
}
} else if (event == Event.CHANGED_EVENT) {
loadModel(ureq);
} else if (event == Event.CANCELLED_EVENT) {
stackPanel.popController(currentIdentityCtrl);
}
} else if (bulkToolsList != null && bulkToolsList.contains(source)) {
if (event == Event.CHANGED_EVENT) {
loadModel(ureq);
}
} else if (changeUserVisibilityCtrl == source) {
if (event == Event.DONE_EVENT) {
doSetVisibility(ureq, changeUserVisibilityCtrl.getVisibility(), changeUserVisibilityCtrl.getRows());
}
cmc.deactivate();
cleanUp();
} else if (toolsCtrl == source) {
if (event instanceof ShowDetailsEvent) {
doSelect(ureq, ((ShowDetailsEvent) event).getAssessedIdentity());
toolsCalloutCtrl.deactivate();
cleanUp();
} else if (event == Event.CHANGED_EVENT) {
loadModel(ureq);
toolsCalloutCtrl.deactivate();
cleanUp();
} else if (event == Event.CLOSE_EVENT) {
// don't dispose it, there are some popup window at work
toolsCalloutCtrl.deactivate();
} else if (event == Event.CANCELLED_EVENT) {
toolsCalloutCtrl.deactivate();
cleanUp();
}
} else if (toolsCalloutCtrl == source) {
cleanUp();
} else if (cmc == source) {
cleanUp();
}
super.event(ureq, source, event);
}
Aggregations