Search in sources :

Example 26 with UserNodeAuditManager

use of org.olat.course.auditing.UserNodeAuditManager in project OpenOLAT by OpenOLAT.

the class CourseAssessmentManagerImpl method removeIndividualAssessmentDocument.

@Override
public void removeIndividualAssessmentDocument(CourseNode courseNode, Identity identity, Identity assessedIdentity, File document) {
    if (document != null && document.exists()) {
        document.delete();
        // update counter
        File directory = getAssessmentDocumentsDirectory(courseNode, assessedIdentity);
        AssessmentEntry nodeAssessment = getOrCreate(assessedIdentity, courseNode);
        File[] docs = directory.listFiles(new SystemFileFilter(true, false));
        int numOfDocs = docs == null ? 0 : docs.length;
        nodeAssessment.setNumberOfAssessmentDocuments(numOfDocs);
        assessmentService.updateAssessmentEntry(nodeAssessment);
        // node log
        ICourse course = CourseFactory.loadCourse(cgm.getCourseEntry());
        UserNodeAuditManager am = course.getCourseEnvironment().getAuditManager();
        am.appendToUserNodeLog(courseNode, identity, assessedIdentity, "assessment document removed: " + document.getName());
        // user activity logging
        ThreadLocalUserActivityLogger.log(AssessmentLoggingAction.ASSESSMENT_DOCUMENT_REMOVED, getClass(), LoggingResourceable.wrap(assessedIdentity), LoggingResourceable.wrapNonOlatResource(StringResourceableType.assessmentDocument, "", StringHelper.stripLineBreaks(document.getName())));
    }
}
Also used : UserNodeAuditManager(org.olat.course.auditing.UserNodeAuditManager) ICourse(org.olat.course.ICourse) SystemFileFilter(org.olat.core.util.io.SystemFileFilter) File(java.io.File) AssessmentEntry(org.olat.modules.assessment.AssessmentEntry)

Example 27 with UserNodeAuditManager

use of org.olat.course.auditing.UserNodeAuditManager in project OpenOLAT by OpenOLAT.

the class MSCourseNode method getUserLog.

/**
 * @see org.olat.course.nodes.AssessableCourseNode#getUserLog(org.olat.course.run.userview.UserCourseEnvironment)
 */
@Override
public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    String logValue = am.getUserNodeLog(this, userCourseEnvironment.getIdentityEnvironment().getIdentity());
    return logValue;
}
Also used : UserNodeAuditManager(org.olat.course.auditing.UserNodeAuditManager)

Example 28 with UserNodeAuditManager

use of org.olat.course.auditing.UserNodeAuditManager in project OpenOLAT by OpenOLAT.

the class ScormCourseNode method getUserLog.

/**
 * @see org.olat.course.nodes.AssessableCourseNode#getUserLog(org.olat.course.run.userview.UserCourseEnvironment)
 */
@Override
public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    String logValue = am.getUserNodeLog(this, mySelf);
    return logValue;
}
Also used : UserNodeAuditManager(org.olat.course.auditing.UserNodeAuditManager) Identity(org.olat.core.id.Identity)

Example 29 with UserNodeAuditManager

use of org.olat.course.auditing.UserNodeAuditManager in project OpenOLAT by OpenOLAT.

the class TACourseNode method getUserLog.

/**
 * @see org.olat.course.nodes.AssessableCourseNode#getUserLog(org.olat.course.run.userview.UserCourseEnvironment)
 */
@Override
public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    String logValue = am.getUserNodeLog(this, userCourseEnvironment.getIdentityEnvironment().getIdentity());
    return logValue;
}
Also used : UserNodeAuditManager(org.olat.course.auditing.UserNodeAuditManager)

Example 30 with UserNodeAuditManager

use of org.olat.course.auditing.UserNodeAuditManager in project OpenOLAT by OpenOLAT.

the class BasicLTICourseNode method getUserLog.

@Override
public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    // having score defined means the node is assessable
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    return am.getUserNodeLog(this, mySelf);
}
Also used : UserNodeAuditManager(org.olat.course.auditing.UserNodeAuditManager) Identity(org.olat.core.id.Identity)

Aggregations

UserNodeAuditManager (org.olat.course.auditing.UserNodeAuditManager)46 ICourse (org.olat.course.ICourse)18 AssessmentEntry (org.olat.modules.assessment.AssessmentEntry)16 Identity (org.olat.core.id.Identity)14 AssessmentChangedEvent (org.olat.course.assessment.AssessmentChangedEvent)12 File (java.io.File)10 CoursePropertyManager (org.olat.course.properties.CoursePropertyManager)10 Date (java.util.Date)8 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)8 RepositoryEntry (org.olat.repository.RepositoryEntry)8 SyncerExecutor (org.olat.core.util.coordinate.SyncerExecutor)4 SystemFileFilter (org.olat.core.util.io.SystemFileFilter)4 MailContext (org.olat.core.util.mail.MailContext)4 Structure (org.olat.course.Structure)4 AssessmentManager (org.olat.course.assessment.AssessmentManager)4 CertificateTemplate (org.olat.course.certificate.CertificateTemplate)4 CertificateInfos (org.olat.course.certificate.model.CertificateInfos)4 CourseConfig (org.olat.course.config.CourseConfig)4 CourseGroupManager (org.olat.course.groupsandrights.CourseGroupManager)4 CourseNode (org.olat.course.nodes.CourseNode)4