Package ch.tatool.data

Examples of ch.tatool.data.Trial


      } else {
        samples = timerSampleSize;
      }

      for (int i = 0; i < samples - 1; i++) {
        Trial t = trials.get(trials.size() - 1 - i);
        Long duration = durationProperty.getValue(t, this);
        if (duration != null) {
          // use reactionTime or timeout if no reactionTime is present
          //Long duration = durationProperty.getValue(t, this);
          Long reactionTime = reactionTimeProperty.getValue(t, this);
View Full Code Here


    Executable executable = context.getActiveExecutable();

    // loop through all trials
    for (int i = 0; i < trials.size(); i++) {
      Trial trial = trials.get(i);

      totalScore += Points.getPointsProperty().getValue(trial, trial.getParentId(), 0);
      maxScore += Points.getMaxPointsProperty().getValue(trial, trial.getParentId(), 0);

      if (trials.isEmpty()) return currentLevel;

      String trialOutcome = Misc.getOutcomeProperty().getValue(trial, executable);
View Full Code Here

    Executable executable = context.getActiveExecutable();

    // loop through all trials
    for (int i = 0; i < trials.size(); i++) {
      Trial trial = trials.get(i);

      totalScore += Points.getPointsProperty().getValue(trial, trial.getParentId(), 0);
      maxScore += Points.getMaxPointsProperty().getValue(trial, trial.getParentId(), 0);

      if (trials.isEmpty()) return currentLevel;

      String trialOutcome = Misc.getOutcomeProperty().getValue(trial, executable);
     
View Full Code Here

    Executable executable = context.getActiveExecutable();

    // loop through all trials
    for (int i = 0; i < trials.size(); i++) {
      Trial trial = trials.get(i);

      totalScore += Points.getPointsProperty().getValue(trial, trial.getParentId(), 0);
      maxScore += Points.getMaxPointsProperty().getValue(trial, trial.getParentId(), 0);

      if (trials.isEmpty()) return currentLevel;

      String trialOutcome = Misc.getOutcomeProperty().getValue(trial, executable);
View Full Code Here

    Executable executable = context.getActiveExecutable();

    // loop through all trials
    for (int i = 0; i < trials.size(); i++) {
      Trial trial = trials.get(i);

      totalScore += Points.getPointsProperty().getValue(trial,
          trial.getParentId(), 0);
      maxScore += Points.getMaxPointsProperty().getValue(trial,
          trial.getParentId(), 0);

      if (trials.isEmpty())
        return currentLevel;

      String trialOutcome = Misc.getOutcomeProperty().getValue(trial,
View Full Code Here

      } else {
        samples = timerSampleSize;
      }

      for (int i = 0; i < samples - 1; i++) {
        Trial t = trials.get(trials.size() - 1 - i);
        Long duration = durationProperty.getValue(t, this);
        if (duration != null) {
          // use reactionTime or timeout if no reactionTime is present
          //Long duration = durationProperty.getValue(t, this);
          Long reactionTime = reactionTimeProperty.getValue(t, this);
View Full Code Here

  private void executionPostProcess(ExecutionContext context) {
    if (this.getParent() == context.getActiveExecutable()) {
      List<Trial> trials = context.getExecutionData().getTrials();
      if (trials != null && trials.size() > 0) {
        Trial firstTrial = trials.get(0);
            durationProperty.setValue(firstTrial, this, defaultTimerDuration);
            reactionTimeProperty.setValue(firstTrial, this, reactionTime);
      }
         
        }
View Full Code Here

   
    /** Set the timeout in the trial properties. */
    private void executionPostProcess(ExecutionContext context) {
        // only set if we are applied to the current task
        if (this.getParent() == context.getActiveExecutable() && logTrialProperties) {
          Trial firstTrial = context.getExecutionData().getCreateFirstTrial();
          durationProperty.setValue(firstTrial, this, defaultTimerDuration);
          reactionTimeProperty.setValue(firstTrial, this, reactionTime);
        }
    }
View Full Code Here

  /** Delete a trial object. */
  public void deleteTrial(Module module, ModuleSession session, Trial trial) {
    Iterator<Trial> it = ((ModuleSessionImpl) session).getTrials()
        .iterator();
    while (it.hasNext()) {
      Trial t = it.next();
      if (t.getId().equals(trial.getId())) {
        it.remove();
      }
    }
    sessionFactory.getCurrentSession().delete(trial);
  }
View Full Code Here

   
    /** Delete a trial object. */
    public void deleteTrial(Module module, ModuleSession session, Trial trial) {
        Iterator<Trial> it = ((ModuleSessionImpl) session).getTrials().iterator();
        while (it.hasNext()) {
            Trial t = it.next();
            if (t.getId().equals(trial.getId())) {
                it.remove();
            }
        }
        getHibernateTemplate().delete(trial);
    }
View Full Code Here

TOP

Related Classes of ch.tatool.data.Trial

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.