Examples of ScoreEvaluation


Examples of org.olat.course.run.scoring.ScoreEvaluation

   */
  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.run.scoring.ScoreEvaluation

    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.run.scoring.ScoreEvaluation

   */
  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.run.scoring.ScoreEvaluation

  @Override
  protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    setFormTitle("form.title", null);
   
    UserCourseEnvironment userCourseEnv = assessedIdentityWrapper.getUserCourseEnvironment();
    ScoreEvaluation scoreEval = userCourseEnv.getScoreAccounting().evalCourseNode(assessableCourseNode);
    if (scoreEval == null) scoreEval = new ScoreEvaluation(null, null);

    if (hasAttempts) {
      attemptsValue = assessableCourseNode.getUserAttempts(userCourseEnv);
      attempts = uifactory.addIntegerElement("attempts", "form.attempts", (attemptsValue == null ? 0 : attemptsValue.intValue()), formLayout);
      attempts.setDisplaySize(3);
      attempts.setMinValueCheck(0, null);
    }

    if (hasScore) {
      min = assessableCourseNode.getMinScoreConfiguration();
      max = assessableCourseNode.getMaxScoreConfiguration();
      if (hasPassed) {
        cut = assessableCourseNode.getCutValueConfiguration();
      }

     
      minVal = uifactory.addStaticTextElement("minval", "form.min", ((min == null) ? translate("form.valueUndefined") : min.toString()), formLayout);
      maxVal = uifactory.addStaticTextElement("maxval", "form.max", ((max == null) ? translate("form.valueUndefined") : max.toString()), formLayout);

      // Use init variables from wrapper, already loaded from db
      scoreValue = scoreEval.getScore();
      score = uifactory.addTextElement("score","form.score" , 10, "", formLayout);
      score.setDisplaySize(4);
      score.setExampleKey("form.score.rounded", null);
      if (scoreValue != null) {
        score.setValue(AssessmentHelper.getRoundedScore(scoreValue));
      }
      score.setRegexMatchCheck("(\\d+)||(\\d+\\.\\d{1,3})", "form.error.wrongFloat");
    }

    if (hasPassed) {
      if (cut != null) {
        // Display cut value if defined
        cutVal = uifactory.addStaticTextElement(
            "cutval","form.cut" ,
            ((cut == null) ? translate("form.valueUndefined") : cut.toString()),
            formLayout
        );
      }
     
      String[] trueFalseKeys = new String[] { "undefined", "true", "false" };
      String[] passedNotPassedValues = new String[] {
          translate("form.passed.undefined"),
          translate("form.passed.true"),
          translate("form.passed.false")
      };

      //passed = new StaticSingleSelectionElement("form.passed", trueFalseKeys, passedNotPassedValues);
      passed = uifactory.addRadiosVertical("passed", "form.passed", formLayout, trueFalseKeys, passedNotPassedValues)
     
      Boolean passedValue = scoreEval.getPassed();
      passed.select(passedValue == null ? "undefined" :passedValue.toString(), true);
      // When cut value is defined, no manual passed possible
      passed.setEnabled(cut == null);
    }
View Full Code Here

Examples of org.olat.course.run.scoring.ScoreEvaluation

          ienv.setIdentity((Identity)identityAndItsNodePassed[0]);
          UserCourseEnvironment uce = new UserCourseEnvironmentImpl(ienv, course.getCourseEnvironment());
          String nodePassed = (String) identityAndItsNodePassed[1];
          if((nodePassed != null && nodePassed.equals("y")) || (nodePassed != null && nodePassed.equals("n"))){
            if (hasPassed && cut == null){ // Configuration of manual assessment --> Display passed/not passed: yes, Type of display: Manual by tutor
                ScoreEvaluation seOld = courseNode.getUserScoreEvaluation(uce);
                Float score = seOld.getScore();
                Boolean passed = Boolean.TRUE;
                if(nodePassed.equals("n"))passed = Boolean.FALSE;
                ScoreEvaluation seNew = new ScoreEvaluation(score, passed);
               
                // Update score,passed properties in db, and the user's efficiency statement
                boolean incrementAttempts = false;
                courseNode.updateUserScoreEvaluation(seNew, uce, coachIdentity, incrementAttempts);
               
View Full Code Here

Examples of org.olat.course.run.scoring.ScoreEvaluation

      myContent.contextPut(MSCourseNode.CONFIG_KEY_SCORE_MIN, config.get(MSCourseNode.CONFIG_KEY_SCORE_MIN));
      myContent.contextPut(MSCourseNode.CONFIG_KEY_SCORE_MAX, config.get(MSCourseNode.CONFIG_KEY_SCORE_MAX));
  }
 
  private void exposeUserDataToVC(UserCourseEnvironment userCourseEnv, AssessableCourseNode courseNode) {
    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

Examples of org.olat.course.run.scoring.ScoreEvaluation

    // read score from properties save score, passed and attempts information
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    Boolean passed = am.getNodePassed(this, mySelf);
    Float score = am.getNodeScore(this, mySelf);
    ScoreEvaluation se = new ScoreEvaluation(score, passed);
    return se;
  }
View Full Code Here

Examples of org.olat.course.run.scoring.ScoreEvaluation

   */
  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.run.scoring.ScoreEvaluation

    if (source == pf) {
      if (event == Form.EVNT_VALIDATION_OK) {
        int score = pf.getPointValue();
        Float cutValue = cn.getCutValueConfiguration();
        boolean passed = score >= (cutValue == null ? 0 : cutValue.floatValue());
        ScoreEvaluation sceval = new ScoreEvaluation(new Float(score), new Boolean(passed));
        boolean incrementUserAttempts = true;
        cn.updateUserScoreEvaluation(sceval, userCourseEnv, ureq.getIdentity(), incrementUserAttempts);
        userCourseEnv.getScoreAccounting().scoreInfoChanged(cn, sceval);       
        getWindowControl().setInfo(translate("preview.points.set"));
      }
View Full Code Here

Examples of org.olat.course.run.scoring.ScoreEvaluation

    Integer attempts = 1;
    String coachComment = "SomeUselessCoachComment";
    String userComment = "UselessUserComment";
   
    //store ScoreEvaluation for the assessableCourseNode and student
    ScoreEvaluation scoreEvaluation = new ScoreEvaluation(score,passed, assessmentID);
   
    IdentityEnvironment ienv = new IdentityEnvironment();
    ienv.setIdentity(student);
    UserCourseEnvironment userCourseEnv = new UserCourseEnvironmentImpl(ienv, course.getCourseEnvironment());
    boolean incrementAttempts = true;
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.