Search in sources :

Example 21 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.

the class IQIdentityListCourseNodeController method initMultiSelectionTools.

@Override
protected void initMultiSelectionTools(UserRequest ureq, FormLayoutContainer formLayout) {
    // bulk
    super.initMultiSelectionTools(ureq, formLayout);
    RepositoryEntry testEntry = getReferencedRepositoryEntry();
    if (((IQTESTCourseNode) courseNode).hasQTI21TimeLimit(testEntry)) {
        extraTimeButton = uifactory.addFormLink("extra.time", formLayout, Link.BUTTON);
        extraTimeButton.setIconLeftCSS("o_icon o_icon_extra_time");
    }
    boolean qti21 = isTestQTI21();
    boolean onyx = !qti21 && OnyxModule.isOnyxTest(testEntry.getOlatResource());
    statsButton = uifactory.addFormLink("button.stats", formLayout, Link.BUTTON);
    statsButton.setIconLeftCSS("o_icon o_icon-fw o_icon_statistics_tool");
    if (!coachCourseEnv.isCourseReadOnly()) {
        if (!onyx) {
            pullButton = uifactory.addFormLink("retrieve.tests.title", formLayout, Link.BUTTON);
            pullButton.setIconLeftCSS("o_icon o_icon_pull");
        }
        if (qti21) {
            if (assessmentCallback.isAdmin()) {
                resetButton = uifactory.addFormLink("tool.delete.data", formLayout, Link.BUTTON);
                resetButton.setIconLeftCSS("o_icon o_icon_delete_item");
            }
            if (qtiService.needManualCorrection(testEntry) || IQEditController.CORRECTION_MANUAL.equals(courseNode.getModuleConfiguration().getStringValue(IQEditController.CONFIG_CORRECTION_MODE))) {
                correctionButton = uifactory.addFormLink("correction.test.title", formLayout, Link.BUTTON);
                correctionButton.setIconLeftCSS("o_icon o_icon-fw o_icon_correction");
            }
            if (courseNode.getModuleConfiguration().getBooleanSafe(IQEditController.CONFIG_DIGITAL_SIGNATURE, false)) {
                validateButton = uifactory.addFormLink("validate.xml.signature", formLayout, Link.BUTTON);
                validateButton.setIconLeftCSS("o_icon o_icon-fw o_icon_correction");
            }
        }
    }
    if (!onyx) {
        exportResultsButton = uifactory.addFormLink("button.export", formLayout, Link.BUTTON);
        exportResultsButton.setIconLeftCSS("o_icon o_icon-fw o_icon_export");
    }
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) RepositoryEntry(org.olat.repository.RepositoryEntry)

Example 22 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.

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 23 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.

the class IQIdentityListCourseNodeController method doExportResults.

private void doExportResults(UserRequest ureq) {
    List<Identity> identities = getIdentities();
    if (identities != null && !identities.isEmpty()) {
        MediaResource resource;
        CourseEnvironment courseEnv = getCourseEnvironment();
        if (isTestQTI21()) {
            resource = new QTI21ResultsExportMediaResource(courseEnv, identities, (IQTESTCourseNode) courseNode, getLocale());
        } else {
            resource = new QTI12ResultsExportMediaResource(courseEnv, getLocale(), identities, (IQTESTCourseNode) courseNode);
        }
        ureq.getDispatchResult().setResultingMediaResource(resource);
    } else {
        showWarning("error.no.assessed.users");
    }
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) CourseEnvironment(org.olat.course.run.environment.CourseEnvironment) QTI12ResultsExportMediaResource(org.olat.ims.qti.resultexport.QTI12ResultsExportMediaResource) MediaResource(org.olat.core.gui.media.MediaResource) QTI21ResultsExportMediaResource(org.olat.ims.qti21.resultexport.QTI21ResultsExportMediaResource) Identity(org.olat.core.id.Identity) QTI21ResultsExportMediaResource(org.olat.ims.qti21.resultexport.QTI21ResultsExportMediaResource) QTI12ResultsExportMediaResource(org.olat.ims.qti.resultexport.QTI12ResultsExportMediaResource)

Example 24 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.

the class IQIdentityListCourseNodeController method doConfirmResetData.

private void doConfirmResetData(UserRequest ureq) {
    AssessmentToolOptions asOptions = getOptions();
    CourseEnvironment courseEnv = getCourseEnvironment();
    resetDataCtrl = new QTI21ResetDataController(ureq, getWindowControl(), courseEnv, asOptions, (IQTESTCourseNode) courseNode);
    listenTo(resetDataCtrl);
    String title = translate("tool.reset");
    cmc = new CloseableModalController(getWindowControl(), null, resetDataCtrl.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) QTI21ResetDataController(org.olat.ims.qti21.ui.QTI21ResetDataController)

Example 25 with IQTESTCourseNode

use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.

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