35 include_once 
"./Services/Object/classes/class.ilObject.php";
 
   36 include_once 
"./Modules/Test/classes/inc.AssessmentConstants.php";
 
  161                 return array(
'questions', 
'passes', 
'passed', 
'lastVisit', 
'firstVisit', 
'timeOfWork', 
'numberOfQuestions', 
 
  162                 'questionsWorkedThrough', 
'markECTS', 
'mark_official', 
'mark', 
'maxpoints', 
'reached', 
'user_id', 
'login', 
 
  163                 'name', 
'passScoring');
 
  173                 $this->passes = array();
 
  174                 $this->questions = array();
 
  175                 $this->passed = FALSE;
 
  196                 $this->passed = ($a_passed ? TRUE : FALSE);
 
  206                 $this->name = $a_name;
 
  216                 $this->login = $a_login;
 
  226                 $this->reached = $a_reached;
 
  236                 $this->maxpoints = $a_max_points;
 
  241                 return $this->getMaxPoints() ? $this->
getReached() / $this->getMaxPoints() * 100.0 : 0;
 
  251                 $this->mark = $a_mark;
 
  261                 $this->markECTS = $a_mark_ects;
 
  267                 if (!is_object($this->passes[$questionpass])) $questionpass = 0;
 
  268                 if (is_object($this->passes[$questionpass])) 
 
  270                         return $this->passes[$questionpass]->getNrOfAnsweredQuestions();
 
  277                 $this->questionsWorkedThrough = $a_nr;
 
  283                 if (!is_object($this->passes[$questionpass])) $questionpass = 0;
 
  284                 if (is_object($this->passes[$questionpass])) 
 
  286                         return $this->passes[$questionpass]->getQuestionCount();
 
  294                 $this->numberOfQuestions = $a_nr;
 
  305                 foreach ($this->passes as 
$pass)
 
  307                         $time += $pass->getWorkingTime();
 
  314                 $this->timeOfWork = $a_time_of_work;
 
  324                 $this->firstVisit = $a_time;
 
  334                 $this->lastVisit = $a_time;
 
  344                 $this->passes[$pass_nr] = 
$pass;
 
  349                 if (array_key_exists($pass_nr, $this->passes))
 
  351                         return $this->passes[$pass_nr];
 
  361                 return count($this->passes);
 
  383                 foreach( $this->passes as 
$pass )
 
  387                         if(
$reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
 
  390                                 $bestpass = $pass->getPass();
 
  400                 foreach (array_keys($this->passes) as 
$pass)
 
  402                         if ($pass > $lastpass) $lastpass = 
$pass;
 
  409                 $this->questionTitles[$question_id] = $question_title;
 
  414                 return $this->questionTitles;
 
  419                 if (array_key_exists(
$pass, $this->questions))
 
  421                         return $this->questions[
$pass];
 
  431                 if( !isset($this->questions[
$pass]) )
 
  433                         $this->questions[
$pass] = array();
 
  436                 $this->questions[
$pass][] = array(
 
  437                         "id" => $question_id,
 
  438                         "o_id" => $original_id,
 
  439                         "points" => $max_points,
 
  440                         "sequence" => $sequence
 
  446                 if (array_key_exists($index, $this->questions[
$pass]))
 
  448                         return $this->questions[
$pass][$index];
 
  459                 if (array_key_exists(
$pass, $this->passes))
 
  461                         $count = $this->passes[
$pass]->getQuestionCount();
 
  469                 if (array_key_exists(
$pass, $this->passes))
 
  481                 if (!is_object($this->passes[
$pass])) $pass = 0;
 
  482                 if (!is_object($this->passes[$pass])) 
return 0;
 
  483                 $available = $this->passes[
$pass]->getMaxPoints();
 
  484                 $available = round($available, 2);
 
  492                 $percent = ($available > 0 ) ? 
$reached / $available : 0;
 
  498                 $this->user_id = $a_usr_id;
 
  508                 $this->mark_official = $a_mark_official;
 
  558                 $requestedHintsCount = $this->passes[
$pass]->getRequestedHintsCount();
 
  560                 return $requestedHintsCount;
 
  576                 foreach( $this->passes as 
$pass )
 
  580                         if(
$reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
 
  583                                 $bestpassObject = 
$pass;
 
  587                 return $bestpassObject;
 
  600                 foreach( array_keys($this->passes) as $passIndex )
 
  602                         if ($passIndex > $lastpassIndex) $lastpassIndex = $passIndex;
 
  605                 $lastpassObject = $this->passes[$lastpassIndex];
 
  607                 return $lastpassObject;
 
  618                 foreach( $this->passes as 
$pass )
 
  620                         if( $pass->areObligationsAnswered() )