Search in sources :

Example 31 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.

the class IQIdentityListCourseNodeController method initStatusColumns.

@Override
protected void initStatusColumns(FlexiTableColumnModel columnsModel) {
    super.initStatusColumns(columnsModel);
    IQTESTCourseNode testCourseNode = (IQTESTCourseNode) courseNode;
    if (testCourseNode != null && testCourseNode.hasCompletion()) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCourseElementCols.currentCompletion));
    }
    RepositoryEntry qtiTestEntry = getReferencedRepositoryEntry();
    if (testCourseNode != null && testCourseNode.hasQTI21TimeLimit(qtiTestEntry)) {
        int timeLimitInSeconds = testCourseNode.getQTI21TimeLimitMaxInSeconds(qtiTestEntry);
        boolean suspendEnabled = isSuspendEnable();
        FlexiCellRenderer renderer = new ExtraTimeCellRenderer(!suspendEnabled, timeLimitInSeconds, getLocale());
        String header = suspendEnabled ? "table.header.extra.time" : "table.header.end.date";
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(header, IdentityCourseElementCols.details.ordinal(), renderer));
    }
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) FlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiCellRenderer) RepositoryEntry(org.olat.repository.RepositoryEntry) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Example 32 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.

the class IQIdentityListCourseNodeController method doStartCorrection.

private void doStartCorrection(UserRequest ureq) {
    AssessmentToolOptions asOptions = getOptions();
    correctionIdentitiesCtrl = new CorrectionOverviewController(ureq, getWindowControl(), stackPanel, getCourseEnvironment(), asOptions, (IQTESTCourseNode) courseNode);
    if (correctionIdentitiesCtrl.getNumberOfAssessedIdentities() == 0) {
        showWarning("grade.nobody");
        correctionIdentitiesCtrl = null;
    } else {
        listenTo(correctionIdentitiesCtrl);
        stackPanel.pushController(translate("correction.test.title"), correctionIdentitiesCtrl);
    }
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) AssessmentToolOptions(org.olat.modules.assessment.AssessmentToolOptions) CorrectionOverviewController(org.olat.ims.qti21.ui.assessment.CorrectionOverviewController)

Example 33 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.

the class IQIdentityListCourseNodeController method doConfirmPull.

private void doConfirmPull(UserRequest ureq) {
    AssessmentToolOptions asOptions = getOptions();
    RepositoryEntry testEntry = getReferencedRepositoryEntry();
    CourseEnvironment courseEnv = getCourseEnvironment();
    if (ImsQTI21Resource.TYPE_NAME.equals(testEntry.getOlatResource().getResourceableTypeName())) {
        retrieveConfirmationCtr = new QTI21RetrieveTestsController(ureq, getWindowControl(), courseEnv, asOptions, (IQTESTCourseNode) courseNode);
    } else {
        retrieveConfirmationCtr = new QTI12PullTestsToolController(ureq, getWindowControl(), courseEnv, asOptions, (IQTESTCourseNode) courseNode);
    }
    listenTo(retrieveConfirmationCtr);
    String title = translate("tool.pull");
    cmc = new CloseableModalController(getWindowControl(), null, retrieveConfirmationCtr.getInitialComponent(), true, title, true);
    listenTo(cmc);
    cmc.activate();
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) CourseEnvironment(org.olat.course.run.environment.CourseEnvironment) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) AssessmentToolOptions(org.olat.modules.assessment.AssessmentToolOptions) RepositoryEntry(org.olat.repository.RepositoryEntry) QTI21RetrieveTestsController(org.olat.ims.qti21.ui.QTI21RetrieveTestsController) QTI12PullTestsToolController(org.olat.ims.qti.statistics.ui.QTI12PullTestsToolController)

Example 34 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.

the class IQIdentityListCourseNodeController method doUpdateCourseNode.

private void doUpdateCourseNode(List<AssessmentTestSession> testSessionsToComplete, AssessmentTest assessmentTest, AssessmentEntryStatus status) {
    if (testSessionsToComplete == null || testSessionsToComplete.isEmpty())
        return;
    Double cutValue = QtiNodesExtractor.extractCutValue(assessmentTest);
    for (AssessmentTestSession testSession : testSessionsToComplete) {
        UserCourseEnvironment assessedUserCourseEnv = AssessmentHelper.createAndInitUserCourseEnvironment(testSession.getIdentity(), getCourseEnvironment());
        ScoreEvaluation scoreEval = ((IQTESTCourseNode) courseNode).getUserScoreEvaluation(assessedUserCourseEnv);
        BigDecimal finalScore = testSession.getFinalScore();
        Float score = finalScore == null ? null : finalScore.floatValue();
        Boolean passed = scoreEval.getPassed();
        if (testSession.getManualScore() != null && finalScore != null && cutValue != null) {
            boolean calculated = finalScore.compareTo(BigDecimal.valueOf(cutValue.doubleValue())) >= 0;
            passed = Boolean.valueOf(calculated);
        }
        AssessmentEntryStatus finalStatus = status == null ? scoreEval.getAssessmentStatus() : status;
        ScoreEvaluation manualScoreEval = new ScoreEvaluation(score, passed, finalStatus, scoreEval.getUserVisible(), scoreEval.getFullyAssessed(), scoreEval.getCurrentRunCompletion(), scoreEval.getCurrentRunStatus(), testSession.getKey());
        ((IQTESTCourseNode) courseNode).updateUserScoreEvaluation(manualScoreEval, assessedUserCourseEnv, getIdentity(), false, Role.coach);
    }
}
Also used : AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) ScoreEvaluation(org.olat.course.run.scoring.ScoreEvaluation) IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) AssessmentEntryStatus(org.olat.modules.assessment.model.AssessmentEntryStatus) BigDecimal(java.math.BigDecimal)

Example 35 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.

the class IQIdentityListCourseNodeController method doLaunchStatistics.

private void doLaunchStatistics(UserRequest ureq) {
    Controller statisticsCtrl;
    RepositoryEntry testEntry = getReferencedRepositoryEntry();
    if (ImsQTI21Resource.TYPE_NAME.equals(testEntry.getOlatResource().getResourceableTypeName())) {
        statisticsCtrl = new QTI21StatisticsToolController(ureq, getWindowControl(), stackPanel, getCourseEnvironment(), getOptions(), (IQTESTCourseNode) courseNode);
    } else {
        statisticsCtrl = new QTI12StatisticsToolController(ureq, getWindowControl(), stackPanel, getCourseEnvironment(), getOptions(), (IQTESTCourseNode) courseNode);
    }
    listenTo(statisticsCtrl);
    stackPanel.pushController(translate("button.stats"), statisticsCtrl);
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) QTI12StatisticsToolController(org.olat.ims.qti.statistics.ui.QTI12StatisticsToolController) QTI21StatisticsToolController(org.olat.ims.qti21.ui.statistics.QTI21StatisticsToolController) RepositoryEntry(org.olat.repository.RepositoryEntry) QTI21RetrieveTestsController(org.olat.ims.qti21.ui.QTI21RetrieveTestsController) QTI21ResetDataController(org.olat.ims.qti21.ui.QTI21ResetDataController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) IdentityListCourseNodeToolsController(org.olat.course.assessment.ui.tool.IdentityListCourseNodeToolsController) QTI21StatisticsToolController(org.olat.ims.qti21.ui.statistics.QTI21StatisticsToolController) IdentityListCourseNodeController(org.olat.course.assessment.ui.tool.IdentityListCourseNodeController) QTI12PullTestsToolController(org.olat.ims.qti.statistics.ui.QTI12PullTestsToolController) CorrectionOverviewController(org.olat.ims.qti21.ui.assessment.CorrectionOverviewController) QTI12StatisticsToolController(org.olat.ims.qti.statistics.ui.QTI12StatisticsToolController) ValidationXmlSignatureController(org.olat.ims.qti21.ui.assessment.ValidationXmlSignatureController) Controller(org.olat.core.gui.control.Controller)

Aggregations

IQTESTCourseNode (org.olat.course.nodes.IQTESTCourseNode)50 RepositoryEntry (org.olat.repository.RepositoryEntry)14 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)12 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)10 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)10 CourseNode (org.olat.course.nodes.CourseNode)10 File (java.io.File)8 Identity (org.olat.core.id.Identity)8 MSCourseNode (org.olat.course.nodes.MSCourseNode)8 ScormCourseNode (org.olat.course.nodes.ScormCourseNode)8 TACourseNode (org.olat.course.nodes.TACourseNode)8 ScoreEvaluation (org.olat.course.run.scoring.ScoreEvaluation)8 ICourse (org.olat.course.ICourse)6 GTACourseNode (org.olat.course.nodes.GTACourseNode)6 STCourseNode (org.olat.course.nodes.STCourseNode)6 CourseEnvironment (org.olat.course.run.environment.CourseEnvironment)6 QTI21ResetDataController (org.olat.ims.qti21.ui.QTI21ResetDataController)6 QTI21RetrieveTestsController (org.olat.ims.qti21.ui.QTI21RetrieveTestsController)5 IOException (java.io.IOException)4 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)4