use of org.olat.ims.qti21.QTI21DeliveryOptions 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