15 include_once 
"./Services/Object/classes/class.ilObject.php";
 
   16 include_once 
"./Modules/Test/classes/inc.AssessmentConstants.php";
 
  141                 return array(
'questions', 
'passes', 
'passed', 
'lastVisit', 
'firstVisit', 
'timeOfWork', 
'numberOfQuestions', 
 
  142                 'questionsWorkedThrough', 
'markECTS', 
'mark_official', 
'mark', 
'maxpoints', 
'reached', 
'user_id', 
'login', 
 
  143                 'name', 
'passScoring');
 
  153                 $this->passes = array();
 
  154                 $this->questions = array();
 
  155                 $this->passed = FALSE;
 
  176                 $this->passed = ($a_passed ? TRUE : FALSE);
 
  186                 $this->name = $a_name;
 
  196                 $this->login = $a_login;
 
  206                 $this->reached = $a_reached;
 
  216                 $this->maxpoints = $a_max_points;
 
  221                 return $this->getMaxPoints() ? $this->
getReached() / $this->getMaxPoints() * 100.0 : 0;
 
  231                 $this->mark = $a_mark;
 
  241                 $this->markECTS = $a_mark_ects;
 
  247                 if (!is_object($this->passes[$questionpass])) $questionpass = 0;
 
  248                 if (is_object($this->passes[$questionpass])) 
 
  250                         return $this->passes[$questionpass]->getNrOfAnsweredQuestions();
 
  257                 $this->questionsWorkedThrough = $a_nr;
 
  263                 if (!is_object($this->passes[$questionpass])) $questionpass = 0;
 
  264                 if (is_object($this->passes[$questionpass])) 
 
  266                         return $this->passes[$questionpass]->getQuestionCount();
 
  274                 $this->numberOfQuestions = $a_nr;
 
  285                 foreach ($this->passes as 
$pass)
 
  287                         $time += $pass->getWorkingTime();
 
  294                 $this->timeOfWork = $a_time_of_work;
 
  304                 $this->firstVisit = $a_time;
 
  314                 $this->lastVisit = $a_time;
 
  324                 $this->passes[$pass_nr] = 
$pass;
 
  329                 if (array_key_exists($pass_nr, $this->passes))
 
  331                         return $this->passes[$pass_nr];
 
  341                 return count($this->passes);
 
  363                 foreach( $this->passes as 
$pass )
 
  367                         if(
$reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
 
  370                                 $bestpass = $pass->getPass();
 
  380                 foreach (array_keys($this->passes) as 
$pass)
 
  382                         if ($pass > $lastpass) $lastpass = 
$pass;
 
  389                 $this->questionTitles[$question_id] = $question_title;
 
  394                 return $this->questionTitles;
 
  399                 if (array_key_exists(
$pass, $this->questions))
 
  401                         return $this->questions[
$pass];
 
  411                 if( !isset($this->questions[
$pass]) )
 
  413                         $this->questions[
$pass] = array();
 
  416                 $this->questions[
$pass][] = array(
 
  417                         "id" => $question_id,
 
  418                         "o_id" => $original_id,
 
  419                         "points" => $max_points,
 
  420                         "sequence" => $sequence
 
  426                 if (array_key_exists($index, $this->questions[
$pass]))
 
  428                         return $this->questions[
$pass][$index];
 
  439                 if (array_key_exists(
$pass, $this->passes))
 
  441                         $count = $this->passes[
$pass]->getQuestionCount();
 
  449                 if (array_key_exists(
$pass, $this->passes))
 
  461                 if (!is_object($this->passes[
$pass])) $pass = 0;
 
  462                 if (!is_object($this->passes[$pass])) 
return 0;
 
  463                 $available = $this->passes[
$pass]->getMaxPoints();
 
  464                 $available = round($available, 2);
 
  472                 $percent = ($available > 0 ) ? 
$reached / $available : 0;
 
  478                 $this->user_id = $a_usr_id;
 
  488                 $this->mark_official = $a_mark_official;
 
  538                 $requestedHintsCount = $this->passes[
$pass]->getRequestedHintsCount();
 
  540                 return $requestedHintsCount;
 
  556                 foreach( $this->passes as 
$pass )
 
  560                         if(
$reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
 
  563                                 $bestpassObject = 
$pass;
 
  567                 return $bestpassObject;
 
  580                 foreach( array_keys($this->passes) as $passIndex )
 
  582                         if ($passIndex > $lastpassIndex) $lastpassIndex = $passIndex;
 
  585                 $lastpassObject = $this->passes[$lastpassIndex];
 
  587                 return $lastpassObject;
 
  598                 foreach( $this->passes as 
$pass )
 
  600                         if( $pass->areObligationsAnswered() )