use of org.olat.ims.qti21.manager.audit.AssessmentSessionAuditFileLog in project OpenOLAT by OpenOLAT.
the class QTI21ServiceImpl method getAssessmentSessionAuditLogger.
@Override
public AssessmentSessionAuditLogger getAssessmentSessionAuditLogger(AssessmentTestSession session, boolean authorMode) {
if (authorMode) {
return new AssessmentSessionAuditOLog();
}
if (session.getIdentity() == null && StringHelper.containsNonWhitespace(session.getAnonymousIdentifier())) {
return new AssessmentSessionAuditOLog();
}
try {
File auditLog = getAssessmentSessionAuditLogFile(session);
FileOutputStream outputStream = new FileOutputStream(auditLog, true);
return new AssessmentSessionAuditFileLog(outputStream);
} catch (IOException e) {
log.error("Cannot open the user specific log audit, fall back to OLog", e);
return new AssessmentSessionAuditOLog();
}
}
use of org.olat.ims.qti21.manager.audit.AssessmentSessionAuditFileLog in project openolat by klemens.
the class QTI21ServiceImpl method getAssessmentSessionAuditLogger.
@Override
public AssessmentSessionAuditLogger getAssessmentSessionAuditLogger(AssessmentTestSession session, boolean authorMode) {
if (authorMode) {
return new AssessmentSessionAuditOLog();
}
if (session.getIdentity() == null && StringHelper.containsNonWhitespace(session.getAnonymousIdentifier())) {
return new AssessmentSessionAuditOLog();
}
try {
File auditLog = getAssessmentSessionAuditLogFile(session);
FileOutputStream outputStream = new FileOutputStream(auditLog, true);
return new AssessmentSessionAuditFileLog(outputStream);
} catch (IOException e) {
log.error("Cannot open the user specific log audit, fall back to OLog", e);
return new AssessmentSessionAuditOLog();
}
}
Aggregations