ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestEvaluationUserData Class Reference
+ Collaboration diagram for ilTestEvaluationUserData:

Public Member Functions

 __sleep ()
 ilTestEvaluationUserData ($passScoring)
 Constructor.
 getPassScoring ()
 setPassScoring ($passScoring)
 getPassed ()
 setPassed ($a_passed)
 getName ()
 setName ($a_name)
 getLogin ()
 setLogin ($a_login)
 getReached ()
 setReached ($a_reached)
 getMaxpoints ()
 setMaxpoints ($a_max_points)
 getReachedPointsInPercent ()
 getMark ()
 setMark ($a_mark)
 getECTSMark ()
 setECTSMark ($a_mark_ects)
 getQuestionsWorkedThrough ()
 setQuestionsWorkedThrough ($a_nr)
 getNumberOfQuestions ()
 setNumberOfQuestions ($a_nr)
 getQuestionsWorkedThroughInPercent ()
 getTimeOfWork ()
 setTimeOfWork ($a_time_of_work)
 getFirstVisit ()
 setFirstVisit ($a_time)
 getLastVisit ()
 setLastVisit ($a_time)
 getPasses ()
 addPass ($pass_nr, $pass)
getPass ($pass_nr)
 getPassCount ()
 getScoredPass ()
 getBestPass ()
 getLastPass ()
 addQuestionTitle ($question_id, $question_title)
 getQuestionTitles ()
getQuestions ($pass=0)
 addQuestion ($original_id, $question_id, $max_points, $sequence=NULL, $pass=0)
getQuestion ($index, $pass=0)
 getQuestionCount ($pass=0)
 getReachedPoints ($pass=0)
 getAvailablePoints ($pass=0)
 getReachedPointsInPercentForPass ($pass=0)
 setUserID ($a_usr_id)
 getUserID ()
 setMarkOfficial ($a_mark_official)
 getMarkOfficial ()
 getScoredPassObject ()
 returns the object of class ilTestEvaluationPassData that relates to the the scored test pass (best pass / last pass)
 getRequestedHintsCountFromScoredPass ()
 returns the count of hints requested by participant for scored testpass
 getRequestedHintsCount ($pass)
 returns the count of hints requested by participant for given testpass
 getBestPassObject ()
 returns the object of class ilTestEvaluationPassData that relates to the the best test pass
 getLastPassObject ()
 returns the object of class ilTestEvaluationPassData that relates to the the last test pass
 doesObligationsAnsweredPassExist ()
 returns the fact wether a test pass with all obligations answered exists or not
 areObligationsAnswered ()
 returns the fact wether all obligations in the scored test pass are answered or not

Data Fields

 $name
 $login
 $user_id
 $reached
 $maxpoints
 $mark
 $mark_official
 $markECTS
 $questionsWorkedThrough
 $numberOfQuestions
 $timeOfWork
 $firstVisit
 $lastVisit
 $passed
 $passes
 $questions

Private Attributes

 $passScoring

Detailed Description

Definition at line 38 of file class.ilTestEvaluationUserData.php.

Member Function Documentation

ilTestEvaluationUserData::__sleep ( )

Definition at line 159 of file class.ilTestEvaluationUserData.php.

{
return array('questions', 'passes', 'passed', 'lastVisit', 'firstVisit', 'timeOfWork', 'numberOfQuestions',
'questionsWorkedThrough', 'markECTS', 'mark_official', 'mark', 'maxpoints', 'reached', 'user_id', 'login',
'name', 'passScoring');
}
ilTestEvaluationUserData::addPass (   $pass_nr,
  $pass 
)

Definition at line 342 of file class.ilTestEvaluationUserData.php.

References $pass.

{
$this->passes[$pass_nr] = $pass;
}
ilTestEvaluationUserData::addQuestion (   $original_id,
  $question_id,
  $max_points,
  $sequence = NULL,
  $pass = 0 
)

Definition at line 429 of file class.ilTestEvaluationUserData.php.

References $pass.

{
if( !isset($this->questions[$pass]) )
{
$this->questions[$pass] = array();
}
$this->questions[$pass][] = array(
"id" => $question_id,
"o_id" => $original_id,
"points" => $max_points,
"sequence" => $sequence
);
}
ilTestEvaluationUserData::addQuestionTitle (   $question_id,
  $question_title 
)

Definition at line 407 of file class.ilTestEvaluationUserData.php.

{
$this->questionTitles[$question_id] = $question_title;
}
ilTestEvaluationUserData::areObligationsAnswered ( )

returns the fact wether all obligations in the scored test pass are answered or not

Returns
boolean

Definition at line 635 of file class.ilTestEvaluationUserData.php.

References getScoredPassObject().

{
return $this->getScoredPassObject()->areObligationsAnswered();
}

+ Here is the call graph for this function:

ilTestEvaluationUserData::doesObligationsAnsweredPassExist ( )

returns the fact wether a test pass with all obligations answered exists or not

Returns
boolean

Definition at line 616 of file class.ilTestEvaluationUserData.php.

References $pass.

Referenced by getBestPass(), and getBestPassObject().

{
foreach( $this->passes as $pass )
{
if( $pass->areObligationsAnswered() )
{
return true;
}
}
return false;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getAvailablePoints (   $pass = 0)

Definition at line 478 of file class.ilTestEvaluationUserData.php.

References $pass.

Referenced by getMaxpoints(), and getReachedPointsInPercentForPass().

{
$available = 0;
if (!is_object($this->passes[$pass])) $pass = 0;
if (!is_object($this->passes[$pass])) return 0;
$available = $this->passes[$pass]->getMaxPoints();
$available = round($available, 2);
return $available;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getBestPass ( )

Definition at line 376 of file class.ilTestEvaluationUserData.php.

References $pass, $reached, doesObligationsAnsweredPassExist(), and getReachedPointsInPercentForPass().

Referenced by getScoredPass().

{
$bestpoints = 0;
$bestpass = 0;
$obligationsAnsweredPassExists = $this->doesObligationsAnsweredPassExist();
foreach( $this->passes as $pass )
{
$reached = $this->getReachedPointsInPercentForPass( $pass->getPass() );
if($reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
{
$bestpoints = $reached;
$bestpass = $pass->getPass();
}
}
return $bestpass;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getBestPassObject ( )

returns the object of class ilTestEvaluationPassData that relates to the the best test pass

Returns
ilTestEvaluationPassData $passDataObject

Definition at line 569 of file class.ilTestEvaluationUserData.php.

References $pass, $reached, doesObligationsAnsweredPassExist(), and getReachedPointsInPercentForPass().

Referenced by getScoredPassObject().

{
$bestpoints = 0;
$bestpassObject = 0;
$obligationsAnsweredPassExists = $this->doesObligationsAnsweredPassExist();
foreach( $this->passes as $pass )
{
$reached = $this->getReachedPointsInPercentForPass( $pass->getPass() );
if($reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
{
$bestpoints = $reached;
$bestpassObject = $pass;
}
}
return $bestpassObject;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getECTSMark ( )

Definition at line 254 of file class.ilTestEvaluationUserData.php.

References $markECTS.

{
}
ilTestEvaluationUserData::getFirstVisit ( )

Definition at line 317 of file class.ilTestEvaluationUserData.php.

References $firstVisit.

{
}
ilTestEvaluationUserData::getLastPass ( )

Definition at line 397 of file class.ilTestEvaluationUserData.php.

References $pass.

Referenced by getScoredPass().

{
$lastpass = 0;
foreach (array_keys($this->passes) as $pass)
{
if ($pass > $lastpass) $lastpass = $pass;
}
return $lastpass;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getLastPassObject ( )

returns the object of class ilTestEvaluationPassData that relates to the the last test pass

Returns
ilTestEvaluationPassData $passDataObject

Definition at line 596 of file class.ilTestEvaluationUserData.php.

Referenced by getScoredPassObject().

{
$lastpassIndex = 0;
foreach( array_keys($this->passes) as $passIndex )
{
if ($passIndex > $lastpassIndex) $lastpassIndex = $passIndex;
}
$lastpassObject = $this->passes[$lastpassIndex];
return $lastpassObject;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getLastVisit ( )

Definition at line 327 of file class.ilTestEvaluationUserData.php.

References $lastVisit.

{
}
ilTestEvaluationUserData::getLogin ( )

Definition at line 209 of file class.ilTestEvaluationUserData.php.

References $login.

{
return $this->login;
}
ilTestEvaluationUserData::getMark ( )

Definition at line 244 of file class.ilTestEvaluationUserData.php.

References $mark.

{
return $this->mark;
}
ilTestEvaluationUserData::getMarkOfficial ( )

Definition at line 511 of file class.ilTestEvaluationUserData.php.

References $mark_official.

{
}
ilTestEvaluationUserData::getMaxpoints ( )

Definition at line 229 of file class.ilTestEvaluationUserData.php.

References getAvailablePoints(), and getScoredPass().

{
return $this->getAvailablePoints($this->getScoredPass());
}

+ Here is the call graph for this function:

ilTestEvaluationUserData::getName ( )

Definition at line 199 of file class.ilTestEvaluationUserData.php.

References $name.

{
return $this->name;
}
ilTestEvaluationUserData::getNumberOfQuestions ( )

Definition at line 280 of file class.ilTestEvaluationUserData.php.

References getScoredPass().

Referenced by getQuestionsWorkedThroughInPercent().

{
$questionpass = $this->getScoredPass();
if (!is_object($this->passes[$questionpass])) $questionpass = 0;
if (is_object($this->passes[$questionpass]))
{
return $this->passes[$questionpass]->getQuestionCount();
}
return 0;
// return $this->numberOfQuestions;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilTestEvaluationUserData::getPass (   $pass_nr)

Definition at line 347 of file class.ilTestEvaluationUserData.php.

{
if (array_key_exists($pass_nr, $this->passes))
{
return $this->passes[$pass_nr];
}
else
{
return NULL;
}
}
ilTestEvaluationUserData::getPassCount ( )

Definition at line 359 of file class.ilTestEvaluationUserData.php.

{
return count($this->passes);
}
ilTestEvaluationUserData::getPassed ( )

Definition at line 189 of file class.ilTestEvaluationUserData.php.

References $passed.

{
return $this->passed;
}
ilTestEvaluationUserData::getPasses ( )

Definition at line 337 of file class.ilTestEvaluationUserData.php.

References $passes.

{
return $this->passes;
}
ilTestEvaluationUserData::getPassScoring ( )

Definition at line 179 of file class.ilTestEvaluationUserData.php.

References $passScoring.

Referenced by getScoredPass(), and getScoredPassObject().

{
}

+ Here is the caller graph for this function:

& ilTestEvaluationUserData::getQuestion (   $index,
  $pass = 0 
)

Definition at line 444 of file class.ilTestEvaluationUserData.php.

References $pass.

{
if (array_key_exists($index, $this->questions[$pass]))
{
return $this->questions[$pass][$index];
}
else
{
return NULL;
}
}
ilTestEvaluationUserData::getQuestionCount (   $pass = 0)

Definition at line 456 of file class.ilTestEvaluationUserData.php.

References $pass.

{
$count = 0;
if (array_key_exists($pass, $this->passes))
{
$count = $this->passes[$pass]->getQuestionCount();
}
return $count;
}
& ilTestEvaluationUserData::getQuestions (   $pass = 0)

Definition at line 417 of file class.ilTestEvaluationUserData.php.

References $pass.

{
if (array_key_exists($pass, $this->questions))
{
return $this->questions[$pass];
}
else
{
return NULL;
}
}
ilTestEvaluationUserData::getQuestionsWorkedThrough ( )

Definition at line 264 of file class.ilTestEvaluationUserData.php.

References getScoredPass().

Referenced by getQuestionsWorkedThroughInPercent().

{
$questionpass = $this->getScoredPass();
if (!is_object($this->passes[$questionpass])) $questionpass = 0;
if (is_object($this->passes[$questionpass]))
{
return $this->passes[$questionpass]->getNrOfAnsweredQuestions();
}
return 0;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getQuestionsWorkedThroughInPercent ( )

Definition at line 297 of file class.ilTestEvaluationUserData.php.

References getNumberOfQuestions(), and getQuestionsWorkedThrough().

{
return $this->getNumberOfQuestions() ? $this->getQuestionsWorkedThrough() / $this->getNumberOfQuestions() * 100.0 : 0;
}

+ Here is the call graph for this function:

ilTestEvaluationUserData::getQuestionTitles ( )

Definition at line 412 of file class.ilTestEvaluationUserData.php.

{
return $this->questionTitles;
}
ilTestEvaluationUserData::getReached ( )

Definition at line 219 of file class.ilTestEvaluationUserData.php.

References getReachedPoints(), and getScoredPass().

Referenced by getReachedPointsInPercent().

{
return $this->getReachedPoints($this->getScoredPass());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getReachedPoints (   $pass = 0)

Definition at line 466 of file class.ilTestEvaluationUserData.php.

References $pass, and $reached.

Referenced by getReached(), and getReachedPointsInPercentForPass().

{
$reached = 0;
if (array_key_exists($pass, $this->passes))
{
$reached = $this->passes[$pass]->getReachedPoints();
}
$reached = ($reached < 0) ? 0 : $reached;
$reached = round($reached, 2);
return $reached;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getReachedPointsInPercent ( )

Definition at line 239 of file class.ilTestEvaluationUserData.php.

References getReached().

{
return $this->getMaxPoints() ? $this->getReached() / $this->getMaxPoints() * 100.0 : 0;
}

+ Here is the call graph for this function:

ilTestEvaluationUserData::getReachedPointsInPercentForPass (   $pass = 0)

Definition at line 488 of file class.ilTestEvaluationUserData.php.

References $pass, $reached, getAvailablePoints(), and getReachedPoints().

Referenced by getBestPass(), and getBestPassObject().

{
$available = $this->getAvailablePoints($pass);
$percent = ($available > 0 ) ? $reached / $available : 0;
return $percent;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getRequestedHintsCount (   $pass)

returns the count of hints requested by participant for given testpass

Parameters
integer$pass
Returns
integer $requestedHintsCount
Exceptions
ilTestException

Definition at line 551 of file class.ilTestEvaluationUserData.php.

References $pass.

Referenced by getRequestedHintsCountFromScoredPass().

{
if( !isset($this->passes[$pass]) || !($this->passes[$pass] instanceof ilTestEvaluationPassData) )
{
throw new ilTestException("invalid pass index given: $pass");
}
$requestedHintsCount = $this->passes[$pass]->getRequestedHintsCount();
return $requestedHintsCount;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getRequestedHintsCountFromScoredPass ( )

returns the count of hints requested by participant for scored testpass

Returns
integer $requestedHintsCount

Definition at line 539 of file class.ilTestEvaluationUserData.php.

References getRequestedHintsCount(), and getScoredPass().

{
return $this->getRequestedHintsCount($this->getScoredPass());
}

+ Here is the call graph for this function:

ilTestEvaluationUserData::getScoredPass ( )

Definition at line 364 of file class.ilTestEvaluationUserData.php.

References getBestPass(), getLastPass(), and getPassScoring().

Referenced by getMaxpoints(), getNumberOfQuestions(), getQuestionsWorkedThrough(), getReached(), and getRequestedHintsCountFromScoredPass().

{
if ($this->getPassScoring() == 1)
{
return $this->getBestPass();
}
else
{
return $this->getLastPass();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getScoredPassObject ( )

returns the object of class ilTestEvaluationPassData that relates to the the scored test pass (best pass / last pass)

Returns
ilTestEvaluationPassData $passDataObject

Definition at line 522 of file class.ilTestEvaluationUserData.php.

References getBestPassObject(), getLastPassObject(), and getPassScoring().

Referenced by areObligationsAnswered().

{
if ($this->getPassScoring() == 1)
{
return $this->getBestPassObject();
}
else
{
return $this->getLastPassObject();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getTimeOfWork ( )

Definition at line 302 of file class.ilTestEvaluationUserData.php.

References $pass.

{
$time = 0;
foreach ($this->passes as $pass)
{
$time += $pass->getWorkingTime();
}
return $time;
}
ilTestEvaluationUserData::getUserID ( )

Definition at line 501 of file class.ilTestEvaluationUserData.php.

References $user_id.

{
}
ilTestEvaluationUserData::ilTestEvaluationUserData (   $passScoring)

Constructor.

public

Definition at line 171 of file class.ilTestEvaluationUserData.php.

References $passScoring.

{
$this->passes = array();
$this->questions = array();
$this->passed = FALSE;
$this->passScoring = $passScoring;
}
ilTestEvaluationUserData::setECTSMark (   $a_mark_ects)

Definition at line 259 of file class.ilTestEvaluationUserData.php.

{
$this->markECTS = $a_mark_ects;
}
ilTestEvaluationUserData::setFirstVisit (   $a_time)

Definition at line 322 of file class.ilTestEvaluationUserData.php.

{
$this->firstVisit = $a_time;
}
ilTestEvaluationUserData::setLastVisit (   $a_time)

Definition at line 332 of file class.ilTestEvaluationUserData.php.

{
$this->lastVisit = $a_time;
}
ilTestEvaluationUserData::setLogin (   $a_login)

Definition at line 214 of file class.ilTestEvaluationUserData.php.

{
$this->login = $a_login;
}
ilTestEvaluationUserData::setMark (   $a_mark)

Definition at line 249 of file class.ilTestEvaluationUserData.php.

{
$this->mark = $a_mark;
}
ilTestEvaluationUserData::setMarkOfficial (   $a_mark_official)

Definition at line 506 of file class.ilTestEvaluationUserData.php.

{
$this->mark_official = $a_mark_official;
}
ilTestEvaluationUserData::setMaxpoints (   $a_max_points)

Definition at line 234 of file class.ilTestEvaluationUserData.php.

{
$this->maxpoints = $a_max_points;
}
ilTestEvaluationUserData::setName (   $a_name)

Definition at line 204 of file class.ilTestEvaluationUserData.php.

{
$this->name = $a_name;
}
ilTestEvaluationUserData::setNumberOfQuestions (   $a_nr)

Definition at line 292 of file class.ilTestEvaluationUserData.php.

{
$this->numberOfQuestions = $a_nr;
}
ilTestEvaluationUserData::setPassed (   $a_passed)

Definition at line 194 of file class.ilTestEvaluationUserData.php.

{
$this->passed = ($a_passed ? TRUE : FALSE);
}
ilTestEvaluationUserData::setPassScoring (   $passScoring)

Definition at line 184 of file class.ilTestEvaluationUserData.php.

References $passScoring.

{
$this->passScoring = $passScoring;
}
ilTestEvaluationUserData::setQuestionsWorkedThrough (   $a_nr)

Definition at line 275 of file class.ilTestEvaluationUserData.php.

{
$this->questionsWorkedThrough = $a_nr;
}
ilTestEvaluationUserData::setReached (   $a_reached)

Definition at line 224 of file class.ilTestEvaluationUserData.php.

{
$this->reached = $a_reached;
}
ilTestEvaluationUserData::setTimeOfWork (   $a_time_of_work)

Definition at line 312 of file class.ilTestEvaluationUserData.php.

{
$this->timeOfWork = $a_time_of_work;
}
ilTestEvaluationUserData::setUserID (   $a_usr_id)

Definition at line 496 of file class.ilTestEvaluationUserData.php.

{
$this->user_id = $a_usr_id;
}

Field Documentation

ilTestEvaluationUserData::$firstVisit

Definition at line 122 of file class.ilTestEvaluationUserData.php.

Referenced by getFirstVisit().

ilTestEvaluationUserData::$lastVisit

Definition at line 129 of file class.ilTestEvaluationUserData.php.

Referenced by getLastVisit().

ilTestEvaluationUserData::$login

Definition at line 52 of file class.ilTestEvaluationUserData.php.

Referenced by getLogin().

ilTestEvaluationUserData::$mark

Definition at line 80 of file class.ilTestEvaluationUserData.php.

Referenced by getMark().

ilTestEvaluationUserData::$mark_official

Definition at line 87 of file class.ilTestEvaluationUserData.php.

Referenced by getMarkOfficial().

ilTestEvaluationUserData::$markECTS

Definition at line 94 of file class.ilTestEvaluationUserData.php.

Referenced by getECTSMark().

ilTestEvaluationUserData::$maxpoints

Definition at line 73 of file class.ilTestEvaluationUserData.php.

ilTestEvaluationUserData::$name

Definition at line 45 of file class.ilTestEvaluationUserData.php.

Referenced by getName().

ilTestEvaluationUserData::$numberOfQuestions

Definition at line 108 of file class.ilTestEvaluationUserData.php.

ilTestEvaluationUserData::$passed

Definition at line 136 of file class.ilTestEvaluationUserData.php.

Referenced by getPassed().

ilTestEvaluationUserData::$passes

Definition at line 143 of file class.ilTestEvaluationUserData.php.

Referenced by getPasses().

ilTestEvaluationUserData::$passScoring
private
ilTestEvaluationUserData::$questions

Definition at line 150 of file class.ilTestEvaluationUserData.php.

ilTestEvaluationUserData::$questionsWorkedThrough

Definition at line 101 of file class.ilTestEvaluationUserData.php.

ilTestEvaluationUserData::$reached
ilTestEvaluationUserData::$timeOfWork

Definition at line 115 of file class.ilTestEvaluationUserData.php.

ilTestEvaluationUserData::$user_id

Definition at line 59 of file class.ilTestEvaluationUserData.php.

Referenced by getUserID().


The documentation for this class was generated from the following file: