Class ilTestEvaluationData. More...
Public Member Functions | |
| ilTestEvaluationData ($test_id) | |
| Constructor. | |
| addQuestionTitle ($question_id, $question_title) | |
| getQuestionTitles () | |
| getQuestionTitle ($question_id) | |
| & | getParticipants () |
| addQuestionForParticipant ($active_id, $question_id, $max_points, $sequence=NULL, $pass=0, $type="", $copy_id="") | |
| getLastPassOfParticipant ($active_id) | |
| getParticipantIds () | |
| addParticipant ($active_id, $participant) | |
| & | getParticipant ($active_id) |
| participantExists ($active_id) | |
| & | getStatistics () |
| calculateStatistics () | |
| sortParticipants ($order) | |
Data Fields | |
| $questionTitles | |
| $participants | |
| $statistics | |
Class ilTestEvaluationData.
class.ilTestEvaluationData.php Assessment
Definition at line 34 of file class.ilTestEvaluationData.php.
| ilTestEvaluationData::addParticipant | ( | $ | active_id, | |
| $ | participant | |||
| ) |
Definition at line 120 of file class.ilTestEvaluationData.php.
{
$this->participants[$active_id] = $participant;
}
| ilTestEvaluationData::addQuestionForParticipant | ( | $ | active_id, | |
| $ | question_id, | |||
| $ | max_points, | |||
| $ | sequence = NULL, |
|||
| $ | pass = 0, |
|||
| $ | type = "", |
|||
| $ | copy_id = "" | |||
| ) |
Definition at line 95 of file class.ilTestEvaluationData.php.
References $type.
{
if (array_key_exists($active_id, $this->participants))
{
$this->participants[$active_id]->addQuestion($question_id, $max_points, $sequence, $pass, $type, $copy_id);
}
}
| ilTestEvaluationData::addQuestionTitle | ( | $ | question_id, | |
| $ | question_title | |||
| ) |
Definition at line 68 of file class.ilTestEvaluationData.php.
{
$this->questionTitles[$question_id] = $question_title;
}
| ilTestEvaluationData::calculateStatistics | ( | ) |
Definition at line 147 of file class.ilTestEvaluationData.php.
{
include_once "./assessment/classes/class.ilTestStatistics.php";
$this->statistics = new ilTestStatistics($this);
}
| ilTestEvaluationData::getLastPassOfParticipant | ( | $ | active_id | ) |
Definition at line 103 of file class.ilTestEvaluationData.php.
{
if (array_key_exists($active_id, $this->participants))
{
return $this->participants[$active_id]->getLastPass();
}
else
{
return 0;
}
}
| & ilTestEvaluationData::getParticipant | ( | $ | active_id | ) |
Definition at line 125 of file class.ilTestEvaluationData.php.
References participantExists().
{
if ($this->participantExists($active_id))
{
return $this->participants[$active_id];
}
else
{
return null;
}
}
Here is the call graph for this function:| ilTestEvaluationData::getParticipantIds | ( | ) |
Definition at line 115 of file class.ilTestEvaluationData.php.
{
return array_keys($this->participants);
}
| & ilTestEvaluationData::getParticipants | ( | ) |
Definition at line 90 of file class.ilTestEvaluationData.php.
{
return $this->participants;
}
| ilTestEvaluationData::getQuestionTitle | ( | $ | question_id | ) |
Definition at line 78 of file class.ilTestEvaluationData.php.
{
if (array_key_exists($question_id, $this->questionTitles))
{
return $this->questionTitles[$question_id];
}
else
{
return "";
}
}
| ilTestEvaluationData::getQuestionTitles | ( | ) |
Definition at line 73 of file class.ilTestEvaluationData.php.
{
return $this->questionTitles;
}
| & ilTestEvaluationData::getStatistics | ( | ) |
Definition at line 142 of file class.ilTestEvaluationData.php.
{
return $this->statistics;
}
| ilTestEvaluationData::ilTestEvaluationData | ( | $ | test_id | ) |
Constructor.
public
Definition at line 62 of file class.ilTestEvaluationData.php.
{
$this->participants = array();
$this->questionTitles = array();
}
| ilTestEvaluationData::participantExists | ( | $ | active_id | ) |
Definition at line 137 of file class.ilTestEvaluationData.php.
Referenced by getParticipant().
{
return array_key_exists($active_id, $this->participants);
}
Here is the caller graph for this function:| ilTestEvaluationData::sortParticipants | ( | $ | order | ) |
Definition at line 153 of file class.ilTestEvaluationData.php.
References $result.
{
function sortAscending($a, $b)
{
$result = strcmp($a->getName(), $b->getName());
return $result;
}
function sortDescending($b, $a)
{
$result = strcmp($a->getName(), $b->getName());
return $result;
}
if (strcmp(strtolower($order), "asc") == 0)
{
uasort($this->participants, "sortAscending");
}
else
{
uasort($this->participants, "sortDescending");
}
}
| ilTestEvaluationData::$participants |
Definition at line 48 of file class.ilTestEvaluationData.php.
| ilTestEvaluationData::$questionTitles |
Definition at line 41 of file class.ilTestEvaluationData.php.
| ilTestEvaluationData::$statistics |
Definition at line 55 of file class.ilTestEvaluationData.php.
1.7.1