Search in sources :

Example 6 with DigitalSignatureOptions

use of org.olat.ims.qti21.model.DigitalSignatureOptions in project openolat by klemens.

the class AssessmentTestDisplayController method getDigitalSignatureOptions.

private DigitalSignatureOptions getDigitalSignatureOptions() {
    boolean sendMail = deliveryOptions.isDigitalSignatureMail();
    boolean digitalSignature = deliveryOptions.isDigitalSignature() && qtiModule.isDigitalSignatureEnabled();
    DigitalSignatureOptions options = new DigitalSignatureOptions(digitalSignature, sendMail, entry, testEntry);
    if (digitalSignature) {
        outcomesListener.decorateConfirmation(candidateSession, options, getCurrentRequestTimestamp(), getLocale());
    }
    return options;
}
Also used : DigitalSignatureOptions(org.olat.ims.qti21.model.DigitalSignatureOptions)

Example 7 with DigitalSignatureOptions

use of org.olat.ims.qti21.model.DigitalSignatureOptions in project openolat by klemens.

the class QTI21AssessmentDetailsController method getSignatureOptions.

private DigitalSignatureOptions getSignatureOptions(AssessmentTestSession session) {
    RepositoryEntry sessionTestEntry = session.getTestEntry();
    QTI21DeliveryOptions deliveryOptions = qtiService.getDeliveryOptions(sessionTestEntry);
    boolean digitalSignature = deliveryOptions.isDigitalSignature();
    boolean sendMail = deliveryOptions.isDigitalSignatureMail();
    if (courseNode != null) {
        ModuleConfiguration config = courseNode.getModuleConfiguration();
        digitalSignature = config.getBooleanSafe(IQEditController.CONFIG_DIGITAL_SIGNATURE, deliveryOptions.isDigitalSignature());
        sendMail = config.getBooleanSafe(IQEditController.CONFIG_DIGITAL_SIGNATURE_SEND_MAIL, deliveryOptions.isDigitalSignatureMail());
    }
    DigitalSignatureOptions options = new DigitalSignatureOptions(digitalSignature, sendMail, entry, testEntry);
    if (digitalSignature) {
        if (courseNode == null) {
            AssessmentEntryOutcomesListener.decorateResourceConfirmation(entry, testEntry, session, options, null, getLocale());
        } else {
            CourseEnvironment courseEnv = CourseFactory.loadCourse(entry).getCourseEnvironment();
            QTI21AssessmentRunController.decorateCourseConfirmation(session, options, courseEnv, courseNode, sessionTestEntry, null, getLocale());
        }
    }
    return options;
}
Also used : QTI21DeliveryOptions(org.olat.ims.qti21.QTI21DeliveryOptions) ModuleConfiguration(org.olat.modules.ModuleConfiguration) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) CourseEnvironment(org.olat.course.run.environment.CourseEnvironment) DigitalSignatureOptions(org.olat.ims.qti21.model.DigitalSignatureOptions) RepositoryEntry(org.olat.repository.RepositoryEntry)

Example 8 with DigitalSignatureOptions

use of org.olat.ims.qti21.model.DigitalSignatureOptions in project openolat by klemens.

the class QTI21RetrieveTestsController method getSignatureOptions.

private DigitalSignatureOptions getSignatureOptions(AssessmentTestSession session) {
    if (courseNode == null)
        return null;
    RepositoryEntry testEntry = session.getTestEntry();
    RepositoryEntry courseEntry = session.getRepositoryEntry();
    QTI21DeliveryOptions deliveryOptions = qtiService.getDeliveryOptions(testEntry);
    boolean digitalSignature = deliveryOptions.isDigitalSignature();
    boolean sendMail = deliveryOptions.isDigitalSignatureMail();
    ModuleConfiguration config = courseNode.getModuleConfiguration();
    digitalSignature = config.getBooleanSafe(IQEditController.CONFIG_DIGITAL_SIGNATURE, deliveryOptions.isDigitalSignature());
    sendMail = config.getBooleanSafe(IQEditController.CONFIG_DIGITAL_SIGNATURE_SEND_MAIL, deliveryOptions.isDigitalSignatureMail());
    DigitalSignatureOptions options = new DigitalSignatureOptions(digitalSignature, sendMail, courseEntry, testEntry);
    if (digitalSignature) {
        CourseEnvironment courseEnv = CourseFactory.loadCourse(courseEntry).getCourseEnvironment();
        QTI21AssessmentRunController.decorateCourseConfirmation(session, options, courseEnv, courseNode, testEntry, null, getLocale());
    }
    return options;
}
Also used : QTI21DeliveryOptions(org.olat.ims.qti21.QTI21DeliveryOptions) ModuleConfiguration(org.olat.modules.ModuleConfiguration) CourseEnvironment(org.olat.course.run.environment.CourseEnvironment) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) DigitalSignatureOptions(org.olat.ims.qti21.model.DigitalSignatureOptions) RepositoryEntry(org.olat.repository.RepositoryEntry)

Aggregations

DigitalSignatureOptions (org.olat.ims.qti21.model.DigitalSignatureOptions)6 CourseEnvironment (org.olat.course.run.environment.CourseEnvironment)4 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)4 QTI21DeliveryOptions (org.olat.ims.qti21.QTI21DeliveryOptions)4 ModuleConfiguration (org.olat.modules.ModuleConfiguration)4 RepositoryEntry (org.olat.repository.RepositoryEntry)4 Date (java.util.Date)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 AssessmentSessionAuditLogger (org.olat.ims.qti21.AssessmentSessionAuditLogger)2 RetrieveAssessmentTestSessionEvent (org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent)2