Package org.olat.course.auditing

Examples of org.olat.course.auditing.UserNodeAuditManager


    } else if (role.equals(PreviewSettingsForm.ROLE_GLOBALAUTHOR)) {
      isGlobalAuthor = true;
    }

    final CourseGroupManager cgm = new PreviewCourseGroupManager(groups, new ArrayList(areas), isCoach, isCourseAdmin);
    final UserNodeAuditManager auditman = new PreviewAuditManager();
    final AssessmentManager am = new PreviewAssessmentManager();
    final CoursePropertyManager cpm = new PreviewCoursePropertyManager();
    final Structure runStructure = course.getEditorTreeModel().createStructureForPreview();
    final String title = course.getCourseTitle();
View Full Code Here


public class PreviewConfigHelper {

  public static CourseEnvironment getPreviewCourseEnvironment(boolean isCoach, boolean isCourseAdmin, ICourse course) {
    //generateEnvironment();       
    final CourseGroupManager cgm = new PreviewCourseGroupManager(new ArrayList(), new ArrayList(), isCoach, isCourseAdmin);
    final UserNodeAuditManager auditman = new PreviewAuditManager();
    final AssessmentManager am = new PreviewAssessmentManager();
    final CoursePropertyManager cpm = new PreviewCoursePropertyManager();
    final Structure runStructure = course.getEditorTreeModel().createStructureForPreview();
    final String title = course.getCourseTitle();
View Full Code Here

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserLog(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    String logValue = am.getUserNodeLog(this, userCourseEnvironment.getIdentityEnvironment().getIdentity());
    return logValue;
  }
View Full Code Here

    ScoreEvaluation scoreEval = courseNode.getUserScoreEvaluation(userCourseEnv);
    myContent.contextPut("score", AssessmentHelper.getRoundedScore(scoreEval.getScore()));
    myContent.contextPut("hasPassedValue", (scoreEval.getPassed() == null ? Boolean.FALSE : Boolean.TRUE));
    myContent.contextPut("passed", scoreEval.getPassed());
    myContent.contextPut("comment", courseNode.getUserUserComment(userCourseEnv));
    UserNodeAuditManager am = userCourseEnv.getCourseEnvironment().getAuditManager();
    myContent.contextPut("log", am.getUserNodeLog(courseNode, userCourseEnv.getIdentityEnvironment().getIdentity()));
  }
View Full Code Here

   
    configurationVC = this.createVelocityContainer("edit");
    editScoringConfigButton = LinkFactory.createButtonSmall("scoring.config.enable.button", configurationVC, this);
   
    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    UserNodeAuditManager auditManager = course.getCourseEnvironment().getAuditManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();

    // Accessibility precondition
    Condition accessCondition = msNode.getPreConditionAccess();
    accessibilityCondContr = new ConditionEditController(ureq, getWindowControl(), groupMgr, accessCondition, "accessabilityConditionForm",
        AssessmentHelper.getAssessableNodes(editorModel, msNode), euce);   
    this.listenTo(accessibilityCondContr);

    modConfigController = new MSEditFormController(ureq, wControl, msNode.getModuleConfiguration());
    listenTo(modConfigController);
    configurationVC.put("mseditform", modConfigController.getInitialComponent());
   
    // if there is already user data available, make for read only
    //TODO:chg:a concurrency issues?
    hasLogEntries = auditManager.hasUserNodeLogs(msNode);
    configurationVC.contextPut("hasLogEntries", new Boolean(hasLogEntries));
    if (hasLogEntries) {
      modConfigController.setDisplayOnly(true);
    }
  }
View Full Code Here

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserLog(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    String logValue = am.getUserNodeLog(this, mySelf);
    return logValue;
  }
View Full Code Here

  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == dropboxFolderRunController) {
      if (event instanceof FolderEvent) {
        FolderEvent folderEvent = (FolderEvent) event;
        if (folderEvent.getCommand().equals(FolderEvent.DELETE_EVENT)) {
          UserNodeAuditManager am = userCourseEnv.getCourseEnvironment().getAuditManager();
          // log entry for this file
          Identity coach = ureq.getIdentity();
          Identity student = userCourseEnv.getIdentityEnvironment().getIdentity();
          am.appendToUserNodeLog(node, coach, student, "FILE DELETED: " + folderEvent.getFilename());
        }
      }
    } else if (source == returnboxFolderRunController) {
      if (event instanceof FolderEvent) {
        FolderEvent folderEvent = (FolderEvent) event;
        if (   folderEvent.getCommand().equals(FolderEvent.UPLOAD_EVENT)
            || folderEvent.getCommand().equals(FolderEvent.NEW_FILE_EVENT) ) {
          UserNodeAuditManager am = userCourseEnv.getCourseEnvironment().getAuditManager();
          // log entry for this file
          Identity coach = ureq.getIdentity();
          Identity student = userCourseEnv.getIdentityEnvironment().getIdentity();
          am.appendToUserNodeLog(node, coach, student, "FILE UPLOADED: " + folderEvent.getFilename());
          String toMail = student.getUser().getProperty(UserConstants.EMAIL, ureq.getLocale());
          Locale locale = I18nManager.getInstance().getLocaleOrDefault(student.getUser().getPreferences().getLanguage());
          Translator userTrsl = new PackageTranslator(PACKAGE, locale);
         
          String nodeUrl = new URLEncoder().encode("[" + OresHelper.calculateTypeName(CourseNode.class) + ":" + node.getIdent() + "]");
          String link = JumpInManager.getJumpInUri(this.getWindowControl().getBusinessControl()) + nodeUrl;
          log.debug("DEBUG : Returnbox notification email with link=" + link);
          MailTemplate mailTempl = new MailTemplate(userTrsl.translate("returnbox.email.subject"), userTrsl.translate(
              "returnbox.email.body", new String[] { userCourseEnv.getCourseEnvironment().getCourseTitle(), node.getShortTitle(),
                  folderEvent.getFilename(), link }), null) {

            @Override
            public void putVariablesInMailContext(VelocityContext context, Identity recipient) {
              // nothing to do
            }
          };
           
          MailerResult result = MailerWithTemplate.getInstance().sendMail(student, null, null, mailTempl, null);
         
          if(result.getReturnCode() > 0) {
            am.appendToUserNodeLog(node, coach, student, "MAIL SEND FAILED TO:" + toMail + "; MailReturnCode: " + result.getReturnCode());
            log.warn("Could not send email 'returnbox notification' to " + student + "with email=" + toMail);
          } else {
            log.info("Send email 'returnbox notification' to " + student + "with email=" + toMail);
          }
        }
View Full Code Here

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserLog(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    String logValue = am.getUserNodeLog(this, mySelf);
    return logValue;
  }
View Full Code Here

    scoringController = new MSEditFormController(ureq, wControl, config);
    listenTo(scoringController);
    editScoring.put("scoringController", scoringController.getInitialComponent());
   
    // if there is already user data available, make for read only
    UserNodeAuditManager am = course.getCourseEnvironment().getAuditManager();
    hasLogEntries = am.hasUserNodeLogs(node);
    editScoring.contextPut("hasLogEntries", new Boolean(hasLogEntries));
    if (hasLogEntries) {
      scoringController.setDisplayOnly(true);
    }
    //Initialstate
View Full Code Here

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserLog(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public String getUserLog(UserCourseEnvironment userCourseEnvironment) {
    UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager();
    String logValue = am.getUserNodeLog(this, userCourseEnvironment.getIdentityEnvironment().getIdentity());
    return logValue;
  }
View Full Code Here

TOP

Related Classes of org.olat.course.auditing.UserNodeAuditManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.