Search in sources :

Example 6 with CorrectionIdentityRow

use of org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityRow in project OpenOLAT by OpenOLAT.

the class CorrectionIdentityListController method doConfirmSaveTests.

private void doConfirmSaveTests(UserRequest ureq) {
    int notCorrectedQuestions = 0;
    List<CorrectionIdentityRow> rows = tableModel.getObjects();
    for (CorrectionIdentityRow row : rows) {
        notCorrectedQuestions += row.getNumNotCorrected();
    }
    confirmSaveTestCtrl = new ConfirmSaveTestsController(ureq, getWindowControl(), notCorrectedQuestions > 0);
    listenTo(confirmSaveTestCtrl);
    cmc = new CloseableModalController(getWindowControl(), "close", confirmSaveTestCtrl.getInitialComponent(), true, translate("save.tests"));
    cmc.activate();
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) CorrectionIdentityRow(org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityRow)

Example 7 with CorrectionIdentityRow

use of org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityRow in project OpenOLAT by OpenOLAT.

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));
}
Also used : AssessmentTest(uk.ac.ed.ph.jqtiplus.node.test.AssessmentTest) AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) ArrayList(java.util.ArrayList) CompleteAssessmentTestSessionEvent(org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent) CorrectionIdentityRow(org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityRow)

Example 8 with CorrectionIdentityRow

use of org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityRow in project openolat by klemens.

the class CorrectionIdentityListController method doConfirmSaveTests.

private void doConfirmSaveTests(UserRequest ureq) {
    int notCorrectedQuestions = 0;
    List<CorrectionIdentityRow> rows = tableModel.getObjects();
    for (CorrectionIdentityRow row : rows) {
        notCorrectedQuestions += row.getNumNotCorrected();
    }
    confirmSaveTestCtrl = new ConfirmSaveTestsController(ureq, getWindowControl(), notCorrectedQuestions > 0);
    listenTo(confirmSaveTestCtrl);
    cmc = new CloseableModalController(getWindowControl(), "close", confirmSaveTestCtrl.getInitialComponent(), true, translate("save.tests"));
    cmc.activate();
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) CorrectionIdentityRow(org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityRow)

Aggregations

CorrectionIdentityRow (org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityRow)8 ArrayList (java.util.ArrayList)4 AssessmentTestSession (org.olat.ims.qti21.AssessmentTestSession)4 HashMap (java.util.HashMap)2 Map (java.util.Map)2 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 Identity (org.olat.core.id.Identity)2 AssessmentItemSession (org.olat.ims.qti21.AssessmentItemSession)2 ItemSessionKey (org.olat.ims.qti21.ui.assessment.model.ItemSessionKey)2 CompleteAssessmentTestSessionEvent (org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent)2 AssessmentItemRef (uk.ac.ed.ph.jqtiplus.node.test.AssessmentItemRef)2 AssessmentTest (uk.ac.ed.ph.jqtiplus.node.test.AssessmentTest)2 ItemSessionState (uk.ac.ed.ph.jqtiplus.state.ItemSessionState)2 TestPlanNodeKey (uk.ac.ed.ph.jqtiplus.state.TestPlanNodeKey)2 TestSessionState (uk.ac.ed.ph.jqtiplus.state.TestSessionState)2