Examples of AssessmentManager


Examples of org.olat.course.assessment.AssessmentManager

      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();

    simCourseEnv = new PreviewCourseEnvironment(title, runStructure, psf.getDate(), course.getCourseFolderContainer(), course
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

  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();

    CourseEnvironment previewCourseEnvironment = new PreviewCourseEnvironment(title, runStructure, new Date(), course.getCourseFolderContainer(),
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

      // create a identenv with no roles, no attributes, no locale
      IdentityEnvironment ienv = new IdentityEnvironment();
      ienv.setIdentity(identity);
      UserCourseEnvironment uce = new UserCourseEnvironmentImpl(ienv, course.getCourseEnvironment());
      uce.getScoreAccounting().evaluateAll();
      AssessmentManager am = course.getCourseEnvironment().getAssessmentManager();

      Iterator iterNodes = myNodes.iterator();
      while (iterNodes.hasNext()) {
        AssessableCourseNode acnode = (AssessableCourseNode) iterNodes.next();
        boolean scoreOk = acnode.hasScoreConfigured();
        boolean passedOk = acnode.hasPassedConfigured();
        boolean attemptsOk = acnode.hasAttemptsConfigured();
        boolean commentOk = acnode.hasCommentConfigured();

        if (scoreOk || passedOk || commentOk || attemptsOk) {
          ScoreEvaluation se = uce.getScoreAccounting().getScoreEvaluation(acnode);
          boolean nodeColumnOk = false;
          StringBuilder tabs = new StringBuilder();

          if (scoreOk) {
            Float score = se.getScore();
            nodeColumnOk = true;
            tabs.append("\t"); // tabulators for header1 after node title

            if (firstIteration) {
              tableHeader2.append(sc);
              tableHeader2.append("\t");
            }

            if (score != null) {
              tableContent.append(AssessmentHelper.getRoundedScore(score));
              tableContent.append("\t");
            } else { // score == null
              tableContent.append(mi);
              tableContent.append("\t");
            }
          }

          if (passedOk) {
            Boolean passed = se.getPassed();
            nodeColumnOk = true;
            tabs.append("\t"); // tabulators for header1 after node title

            if (firstIteration) {
              tableHeader2.append(pa);
              tableHeader2.append("\t");
            }

            if (passed != null) {
              String yesno;
              if (passed.booleanValue()) {
                yesno = yes;
              } else {
                yesno = no;
              }
              tableContent.append(yesno);
              tableContent.append("\t");
            } else { // passed == null
              tableContent.append(mi);
              tableContent.append("\t");
            }
          }

          if (attemptsOk) {
            Integer attempts = am.getNodeAttempts(acnode, identity);
            int a = attempts.intValue();
            nodeColumnOk = true;
            tabs.append("\t"); // tabulators for header1 after node title

            if (firstIteration) {
              tableHeader2.append(at);
              tableHeader2.append("\t");
            }

            tableContent.append(a);
            tableContent.append("\t");
          }

          if (commentOk) {
              // Comments for user
            String comment = am.getNodeComment(acnode, identity);
            nodeColumnOk = true;
            tabs.append("\t"); // tabulators for header1 after node title

            if (firstIteration) {
              tableHeader2.append(co);
              tableHeader2.append("\t");
            }

            if (comment != null) {
              // put comment between double quote in order to prevent that
              // '\t','\r' or '\n' destroy the excel table
              tableContent.append("\"");
              tableContent.append(comment);
              tableContent.append("\"\t");
            } else {
              tableContent.append(mi);
              tableContent.append("\t");
            }
           
            // Comments for tutors
            String coachComment = am.getNodeCoachComment(acnode, identity);
            tabs.append("\t"); // tabulators for header1 after node title

            if (firstIteration) {
              tableHeader2.append(cco);
              tableHeader2.append("\t");
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserCoachComment(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public String getUserCoachComment(UserCourseEnvironment userCourseEnvironment) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    String coachCommentValue = am.getNodeCoachComment(this, userCourseEnvironment.getIdentityEnvironment().getIdentity());
    return coachCommentValue;
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserUserComment(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public String getUserUserComment(UserCourseEnvironment userCourseEnvironment) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    String userCommentValue = am.getNodeComment(this, userCourseEnvironment.getIdentityEnvironment().getIdentity());
    return userCommentValue;
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#updateUserCoachComment(java.lang.String,
   *      org.olat.course.run.userview.UserCourseEnvironment)
   */
  public void updateUserCoachComment(String coachComment, UserCourseEnvironment userCourseEnvironment) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    if (coachComment != null) {
      am.saveNodeCoachComment(this, mySelf, coachComment);
    }
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

   *      org.olat.course.run.userview.UserCourseEnvironment,
   *      org.olat.core.id.Identity)
   */
  public void updateUserScoreEvaluation(ScoreEvaluation scoreEvaluation, UserCourseEnvironment userCourseEnvironment,
      Identity coachingIdentity, boolean incrementAttempts) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    am.saveScoreEvaluation(this, coachingIdentity, mySelf, new ScoreEvaluation(scoreEvaluation.getScore(), scoreEvaluation.getPassed()), userCourseEnvironment, incrementAttempts);   
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

   * @see org.olat.course.nodes.AssessableCourseNode#updateUserUserComment(java.lang.String,
   *      org.olat.course.run.userview.UserCourseEnvironment,
   *      org.olat.core.id.Identity)
   */
  public void updateUserUserComment(String userComment, UserCourseEnvironment userCourseEnvironment, Identity coachingIdentity) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    if (userComment != null) {
      am.saveNodeComment(this, coachingIdentity, mySelf, userComment);
    }
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

    /*
     * the real function evaluation which is used during run time
     */
    CourseNode node = getUserCourseEnv().getCourseEnvironment().getRunStructure().getNode(nodeId);
    AssessmentManager am = getUserCourseEnv().getCourseEnvironment().getAssessmentManager();
    Identity identity = getUserCourseEnv().getIdentityEnvironment().getIdentity();

    return am.getNodeAttempts(node, identity);
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

      OLATResourceable ores = repositoryEntry.getOlatResource();
      Long resId = ores.getResourceableId();
      SurveyFileResource fr = new SurveyFileResource();
      fr.overrideResourceableId(resId);
      if(!CoordinatorManager.getCoordinator().getLocker().isLocked(fr, null)) {
        AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
        IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
        controller = new IQRunController(userCourseEnv, this.getModuleConfiguration(), sec, ureq, wControl, this);
      } else {
        Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
        String title = trans.translate("editor.lock.title");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.