Examples of AssessmentManager


Examples of org.olat.course.assessment.AssessmentManager

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserAttempts(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public Integer getUserAttempts(UserCourseEnvironment userCourseEnvironment) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    Integer userAttemptsValue = am.getNodeAttempts(this, mySelf);
    return userAttemptsValue;

  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

   *      org.olat.course.run.userview.UserCourseEnvironment,
   *      org.olat.core.id.Identity)
   */
  public void updateUserAttempts(Integer userAttempts, UserCourseEnvironment userCourseEnvironment, Identity coachingIdentity) {
    if (userAttempts != null) {
      AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
      Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
      am.saveNodeAttempts(this, coachingIdentity, mySelf, userAttempts);
    }
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#incrementUserAttempts(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public void incrementUserAttempts(UserCourseEnvironment userCourseEnvironment) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    am.incrementNodeAttempts(this, mySelf, userCourseEnvironment);
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

        // -> qti file was locked -> show info message
        // user must click again on course node to activate
        mainPanel.pushContent(returnController.getInitialComponent());
      }
    } else if(source == showResultsButton) {     
      AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
      Long assessmentID = am.getAssessmentID(courseNode, ureq.getIdentity());     
      if(assessmentID==null) {
        //fallback solution: if the assessmentID is not available via AssessmentManager than try to get it via IQManager
        long callingResId = userCourseEnv.getCourseEnvironment().getCourseResourceableId().longValue();
        String callingResDetail = courseNode.getIdent();
        assessmentID = IQManager.getInstance().getLastAssessmentID(ureq.getIdentity(), callingResId, callingResDetail);
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

   */
  public void event(UserRequest urequest, Controller source, Event event) {
    if (source == displayController) {
      if (event instanceof IQSubmittedEvent) {
        IQSubmittedEvent se = (IQSubmittedEvent) event;
        AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
       
       
        // Save results in case of test
        if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS)) {
          // update scoring overview for the user in the current course
          Float score = new Float(se.getScore());
          Boolean passed = new Boolean(se.isPassed());
          ScoreEvaluation sceval = new ScoreEvaluation(score, passed, new Long(se.getAssessmentID()));
          AssessableCourseNode acn = (AssessableCourseNode)courseNode; // assessment nodes are assesable     
          boolean incrementUserAttempts = true;
          acn.updateUserScoreEvaluation(sceval, userCourseEnv, urequest.getIdentity(), incrementUserAttempts);
          //userCourseEnv.getScoreAccounting().scoreInfoChanged(acn, sceval);         
          exposeUserTestDataToVC(urequest);
                   
          // Mark publisher for notifications
          AssessmentNotificationsHandler anh = AssessmentNotificationsHandler.getInstance();
          Long courseId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
          anh.markPublisherNews(urequest.getIdentity(), courseId);
          if(!assessmentStopped) {
            assessmentStopped = true;           
            AssessmentEvent assessmentStoppedEvent = new AssessmentEvent(AssessmentEvent.TYPE.STOPPED, userSession);
            singleUserEventCenter.fireEventToListenersOf(assessmentStoppedEvent, assessmentEventOres);
          }
        }
        // Save results in case of questionnaire
        else if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY)) {
          // save number of attempts
          // although this is not an assessable node we still use the assessment
          // manager since this one uses caching
          am.incrementNodeAttempts(courseNode, urequest.getIdentity(), userCourseEnv);
          exposeUserQuestionnaireDataToVC();
          getWindowControl().pop();
        }
        // Don't save results in case of self-test
       
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

      }
    }   
  }

  private void exposeUserQuestionnaireDataToVC() {
    AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
    Identity identity = userCourseEnv.getIdentityEnvironment().getIdentity();
    // although this is not an assessable node we still use the assessment
    // manager since this one uses caching
    myContent.contextPut("attempts", am.getNodeAttempts(courseNode, identity));
  }
View Full Code Here

Examples of org.olat.course.assessment.AssessmentManager

  /**
   * @see org.olat.course.nodes.AssessableCourseNode#getUserScoreEvaluation(org.olat.course.run.userview.UserCourseEnvironment)
   */
  public ScoreEvaluation getUserScoreEvaluation(UserCourseEnvironment userCourseEnvironment) {
    // read score from properties
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    Boolean passed = null;
    Float score = null;
    // only db lookup if configured, else return null
    if (hasPassedConfigured()) passed = am.getNodePassed(this, mySelf);
    if (hasScoreConfigured()) score = am.getNodeScore(this, mySelf);

    ScoreEvaluation se = new ScoreEvaluation(score, passed);
    return se;
  }
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
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.