Search in sources :

Example 36 with IQTESTCourseNode

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

the class QTI21IdentityListCourseNodeToolsController method doConfirmPullSession.

private void doConfirmPullSession(UserRequest ureq, AssessmentTestSession session) {
    retrieveConfirmationCtr = new QTI21RetrieveTestsController(ureq, getWindowControl(), session, (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) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) QTI21RetrieveTestsController(org.olat.ims.qti21.ui.QTI21RetrieveTestsController)

Example 37 with IQTESTCourseNode

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

the class QTI21ResetDataController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    if (courseNode instanceof IQTESTCourseNode) {
        IQTESTCourseNode testCourseNode = (IQTESTCourseNode) courseNode;
        RepositoryEntry testEntry = courseNode.getReferencedRepositoryEntry();
        RepositoryEntry courseEntry = courseEnv.getCourseGroupManager().getCourseEntry();
        ICourse course = CourseFactory.loadCourse(courseEntry);
        archiveData(course, options);
        qtiService.deleteAssessmentTestSession(identities, testEntry, courseEntry, courseNode.getIdent());
        for (Identity identity : identities) {
            ScoreEvaluation scoreEval = new ScoreEvaluation(null, null, AssessmentEntryStatus.notStarted, null, Boolean.FALSE, 0.0d, AssessmentRunStatus.notStarted, null);
            IdentityEnvironment ienv = new IdentityEnvironment(identity, studentRoles);
            UserCourseEnvironment uce = new UserCourseEnvironmentImpl(ienv, courseEnv);
            testCourseNode.updateUserScoreEvaluation(scoreEval, uce, getIdentity(), false, Role.coach);
            testCourseNode.updateCurrentCompletion(uce, getIdentity(), null, AssessmentRunStatus.notStarted, Role.coach);
        }
    } else if (assessedEntry != null) {
        archiveData(assessedEntry);
        qtiService.deleteAssessmentTestSession(identities, assessedEntry, null, null);
    }
    fireEvent(ureq, Event.CHANGED_EVENT);
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) ScoreEvaluation(org.olat.course.run.scoring.ScoreEvaluation) UserCourseEnvironmentImpl(org.olat.course.run.userview.UserCourseEnvironmentImpl) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) ICourse(org.olat.course.ICourse) RepositoryEntry(org.olat.repository.RepositoryEntry) Identity(org.olat.core.id.Identity) IdentityEnvironment(org.olat.core.id.IdentityEnvironment)

Example 38 with IQTESTCourseNode

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

the class OLATUpgrade_11_0_0 method postCopyPassedScore.

/**
 * Used if a passed or score value was set.
 * @param nodeAssessment
 * @param course
 */
private void postCopyPassedScore(AssessmentEntry entry, ICourse course) {
    String nodeIdent = entry.getSubIdent();
    CourseNode courseNode = course.getRunStructure().getNode(nodeIdent);
    if (courseNode instanceof GTACourseNode) {
    // 
    } else if (courseNode instanceof TACourseNode) {
        entry.setAssessmentStatus(AssessmentEntryStatus.done);
    } else if (courseNode instanceof IQTESTCourseNode) {
    // 
    } else if (courseNode instanceof PortfolioCourseNode) {
        entry.setAssessmentStatus(AssessmentEntryStatus.done);
    } else if (courseNode instanceof MSCourseNode) {
        entry.setAssessmentStatus(AssessmentEntryStatus.done);
    } else if (courseNode instanceof BasicLTICourseNode) {
        entry.setAssessmentStatus(AssessmentEntryStatus.done);
    } else if (courseNode instanceof ScormCourseNode) {
        entry.setAssessmentStatus(AssessmentEntryStatus.done);
    }
}
Also used : BasicLTICourseNode(org.olat.course.nodes.BasicLTICourseNode) IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) PortfolioCourseNode(org.olat.course.nodes.PortfolioCourseNode) MSCourseNode(org.olat.course.nodes.MSCourseNode) GTACourseNode(org.olat.course.nodes.GTACourseNode) STCourseNode(org.olat.course.nodes.STCourseNode) GTACourseNode(org.olat.course.nodes.GTACourseNode) MSCourseNode(org.olat.course.nodes.MSCourseNode) ScormCourseNode(org.olat.course.nodes.ScormCourseNode) CourseNode(org.olat.course.nodes.CourseNode) PortfolioCourseNode(org.olat.course.nodes.PortfolioCourseNode) TACourseNode(org.olat.course.nodes.TACourseNode) AssessableCourseNode(org.olat.course.nodes.AssessableCourseNode) IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) BasicLTICourseNode(org.olat.course.nodes.BasicLTICourseNode) GTACourseNode(org.olat.course.nodes.GTACourseNode) TACourseNode(org.olat.course.nodes.TACourseNode) ScormCourseNode(org.olat.course.nodes.ScormCourseNode)

Example 39 with IQTESTCourseNode

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

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

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

the class IQIdentityListCourseNodeController method loadModel.

@Override
protected void loadModel(UserRequest ureq) {
    super.loadModel(ureq);
    if (((IQTESTCourseNode) courseNode).hasQTI21TimeLimit(getReferencedRepositoryEntry())) {
        Map<Long, ExtraTimeInfos> extraTimeInfos = getExtraTimes();
        List<AssessedIdentityElementRow> rows = usersTableModel.getObjects();
        for (AssessedIdentityElementRow row : rows) {
            row.setDetails(extraTimeInfos.get(row.getIdentityKey()));
        }
    }
    if (pullButton != null) {
        boolean enabled = isTestRunning();
        pullButton.setEnabled(enabled);
    }
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) AssessedIdentityElementRow(org.olat.modules.assessment.ui.AssessedIdentityElementRow)

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