ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestEvaluationUserData Class Reference
+ Collaboration diagram for ilTestEvaluationUserData:

Public Member Functions

 __sleep ()
 __construct ($passScoring)
 Constructor.
 __destruct ()
 unsetPasses ()
 unsetQuestions ()
 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.

Constructor & Destructor Documentation

ilTestEvaluationUserData::__construct (   $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::__destruct ( )

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

References unsetPasses(), and unsetQuestions().

{
$this->unsetPasses();
$this->unsetQuestions();
}

+ Here is the call graph for this function:

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 357 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 439 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" => $question_id, "o_id" => $original_id, "points" => $max_points, "sequence" => $sequence));
}
ilTestEvaluationUserData::addQuestionTitle (   $question_id,
  $question_title 
)

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

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

Definition at line 479 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 391 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 269 of file class.ilTestEvaluationUserData.php.

References $markECTS.

{
}
ilTestEvaluationUserData::getFirstVisit ( )

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

References $firstVisit.

{
}
ilTestEvaluationUserData::getLastPass ( )

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

References $lastVisit.

{
}
ilTestEvaluationUserData::getLogin ( )

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

References $login.

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

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

References $mark.

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

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

References $mark_official.

{
}
ilTestEvaluationUserData::getMaxpoints ( )

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

References $name.

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

Definition at line 295 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 362 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 374 of file class.ilTestEvaluationUserData.php.

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

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

References $passed.

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

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

References $passes.

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

Definition at line 194 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 445 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 457 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 427 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 279 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 312 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 422 of file class.ilTestEvaluationUserData.php.

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

Definition at line 234 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 467 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 254 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 489 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 379 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 317 of file class.ilTestEvaluationUserData.php.

References $pass.

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

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

References $user_id.

{
}
ilTestEvaluationUserData::setECTSMark (   $a_mark_ects)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

References $passScoring.

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

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

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

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

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

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

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

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

{
$this->user_id = $a_usr_id;
}
ilTestEvaluationUserData::unsetPasses ( )

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

Referenced by __destruct().

{
$this->passes = array();
}

+ Here is the caller graph for this function:

ilTestEvaluationUserData::unsetQuestions ( )

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

Referenced by __destruct().

{
$this->questions = array();
}

+ Here is the caller graph for this function:

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

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

Referenced by __construct(), getPassScoring(), and setPassScoring().

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: