ILIAS  Release_3_10_x_branch Revision 61812
 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 ()

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 37 of file class.ilTestEvaluationUserData.php.

Member Function Documentation

ilTestEvaluationUserData::__sleep ( )

Definition at line 158 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 343 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 425 of file class.ilTestEvaluationUserData.php.

References $pass.

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

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

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

Definition at line 464 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();
return $available;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getBestPass ( )

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

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

Referenced by getScoredPass().

{
$bestpoints = 0;
$bestpass = 0;
foreach ($this->passes as $pass)
{
$reached = $this->getReachedPointsInPercentForPass($pass->getPass());
if ($reached > $bestpoints)
{
$bestpoints = $reached;
$bestpass = $pass->getPass();
}
}
return $bestpass;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getECTSMark ( )

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

References $markECTS.

{
}
ilTestEvaluationUserData::getFirstVisit ( )

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

References $firstVisit.

{
}
ilTestEvaluationUserData::getLastPass ( )

Definition at line 393 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::getLastVisit ( )

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

References $lastVisit.

{
}
ilTestEvaluationUserData::getLogin ( )

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

References $login.

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

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

References $mark.

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

Definition at line 496 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());
//return $this->maxpoints;
}

+ Here is the call graph for this function:

ilTestEvaluationUserData::getName ( )

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

References $name.

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

Definition at line 281 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 348 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 360 of file class.ilTestEvaluationUserData.php.

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

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

References $passed.

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

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

References $passes.

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

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

References $passScoring.

Referenced by getScoredPass().

{
}

+ Here is the caller graph for this function:

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

Definition at line 431 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 443 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 413 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 265 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 298 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 408 of file class.ilTestEvaluationUserData.php.

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

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

References getReachedPoints(), and getScoredPass().

Referenced by getReachedPointsInPercent().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getReachedPoints (   $pass = 0)

Definition at line 453 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;
return $reached;
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::getReachedPointsInPercent ( )

Definition at line 240 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 473 of file class.ilTestEvaluationUserData.php.

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

Referenced by getBestPass().

{
$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::getScoredPass ( )

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

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

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

{
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::getTimeOfWork ( )

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

References $pass.

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

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

References $user_id.

{
}
ilTestEvaluationUserData::ilTestEvaluationUserData (   $passScoring)

Constructor.

public

Definition at line 170 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 260 of file class.ilTestEvaluationUserData.php.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

References $passScoring.

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

Definition at line 276 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 313 of file class.ilTestEvaluationUserData.php.

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

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

{
$this->user_id = $a_usr_id;
}

Field Documentation

ilTestEvaluationUserData::$firstVisit

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

Referenced by getFirstVisit().

ilTestEvaluationUserData::$lastVisit

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

Referenced by getLastVisit().

ilTestEvaluationUserData::$login

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

Referenced by getLogin().

ilTestEvaluationUserData::$mark

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

Referenced by getMark().

ilTestEvaluationUserData::$mark_official

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

Referenced by getMarkOfficial().

ilTestEvaluationUserData::$markECTS

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

Referenced by getECTSMark().

ilTestEvaluationUserData::$maxpoints

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

ilTestEvaluationUserData::$name

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

Referenced by getName().

ilTestEvaluationUserData::$numberOfQuestions

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

ilTestEvaluationUserData::$passed

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

Referenced by getPassed().

ilTestEvaluationUserData::$passes

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

Referenced by getPasses().

ilTestEvaluationUserData::$passScoring
private
ilTestEvaluationUserData::$questions

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

ilTestEvaluationUserData::$questionsWorkedThrough

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

ilTestEvaluationUserData::$reached
ilTestEvaluationUserData::$timeOfWork

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

ilTestEvaluationUserData::$user_id

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

Referenced by getUserID().


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