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;
}
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;
}
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;
}
Aggregations