use of org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent in project OpenOLAT by OpenOLAT.
the class CorrectionAssessmentItemListController method doSaveTests.
private void doSaveTests(UserRequest ureq) {
List<AssessmentTestSession> rows = new ArrayList<>(model.getLastSessions().values());
AssessmentTest assessmentTest = model.getResolvedAssessmentTest().getRootNodeLookup().extractIfSuccessful();
fireEvent(ureq, new CompleteAssessmentTestSessionEvent(rows, assessmentTest, AssessmentEntryStatus.done));
}
use of org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent in project OpenOLAT by OpenOLAT.
the class CorrectionIdentityAssessmentItemListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
CorrectionIdentityAssessmentItemRow row = tableModel.getObject(se.getIndex());
doSelect(ureq, row);
}
}
} else if (saveButton == source) {
List<AssessmentTestSession> sessions = Collections.singletonList(candidateSession);
AssessmentTest assessmentTest = model.getResolvedAssessmentTest().getRootNodeLookup().extractIfSuccessful();
fireEvent(ureq, new CompleteAssessmentTestSessionEvent(sessions, assessmentTest, AssessmentEntryStatus.done));
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent in project openolat by klemens.
the class CorrectionAssessmentItemListController method doSaveTests.
private void doSaveTests(UserRequest ureq) {
List<AssessmentTestSession> rows = new ArrayList<>(model.getLastSessions().values());
AssessmentTest assessmentTest = model.getResolvedAssessmentTest().getRootNodeLookup().extractIfSuccessful();
fireEvent(ureq, new CompleteAssessmentTestSessionEvent(rows, assessmentTest, AssessmentEntryStatus.done));
}
use of org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent in project openolat by klemens.
the class CorrectionIdentityAssessmentItemListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
CorrectionIdentityAssessmentItemRow row = tableModel.getObject(se.getIndex());
doSelect(ureq, row);
}
}
} else if (saveButton == source) {
List<AssessmentTestSession> sessions = Collections.singletonList(candidateSession);
AssessmentTest assessmentTest = model.getResolvedAssessmentTest().getRootNodeLookup().extractIfSuccessful();
fireEvent(ureq, new CompleteAssessmentTestSessionEvent(sessions, assessmentTest, AssessmentEntryStatus.done));
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent in project openolat by klemens.
the class CorrectionIdentityListController method doSaveTests.
private void doSaveTests(UserRequest ureq) {
Set<Integer> selections = tableEl.getMultiSelectedIndex();
List<AssessmentTestSession> rows = new ArrayList<>(selections.size());
for (Integer i : selections) {
CorrectionIdentityRow row = tableModel.getObject(i.intValue());
if (row != null) {
rows.add(row.getCandidateSession());
}
}
AssessmentTest assessmentTest = model.getResolvedAssessmentTest().getRootNodeLookup().extractIfSuccessful();
fireEvent(ureq, new CompleteAssessmentTestSessionEvent(rows, assessmentTest, AssessmentEntryStatus.done));
}
Aggregations