Class ilUserQuestionResult.
More...
Detailed Description
Constructor & Destructor Documentation
ilUserQuestionResult::__construct |
( |
|
$question, |
|
|
|
$active_id, |
|
|
|
$pass |
|
) |
| |
Member Function Documentation
ilUserQuestionResult::addKeyValue |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
- Parameters
-
Definition at line 57 of file class.ilUserQuestionResult.php.
{
$this->solutions[] = array(
self::$USER_SOLUTION_IDENTIFIER_KEY => $key,
self::$USER_SOLUTION_IDENTIFIER_VALUE => $value
);
}
ilUserQuestionResult::getReachedPercentage |
( |
| ) |
|
ilUserQuestionResult::getSolutionForKey |
( |
|
$key | ) |
|
- Parameters
-
- Returns
- array
Definition at line 117 of file class.ilUserQuestionResult.php.
{
foreach($this->solutions as $solution)
{
if($solution[self::$USER_SOLUTION_IDENTIFIER_KEY] == $key)
{
return $solution;
}
}
return null;
}
ilUserQuestionResult::getSolutions |
( |
| ) |
|
ilUserQuestionResult::getUserSolutionsByIdentifier |
( |
|
$identifier | ) |
|
- Parameters
-
- Returns
- array
- Exceptions
-
Definition at line 86 of file class.ilUserQuestionResult.php.
References $solutions.
{
if(
$identifier != self::$USER_SOLUTION_IDENTIFIER_KEY &&
$identifier != self::$USER_SOLUTION_IDENTIFIER_VALUE
)
{
throw new Exception(sprintf("Unkown Identifier %s", $identifier));
}
foreach($this->solutions as $solution)
{
}
}
ilUserQuestionResult::hasSolutions |
( |
| ) |
|
ilUserQuestionResult::removeByKey |
( |
|
$key | ) |
|
- Parameters
-
Definition at line 68 of file class.ilUserQuestionResult.php.
{
foreach($this->solutions as $array_key => $solution)
{
if($solution[self::$USER_SOLUTION_IDENTIFIER_KEY] == $key)
{
unset($this->solutions[$array_key]);
break;
}
}
}
ilUserQuestionResult::setReachedPercentage |
( |
|
$reached_percentage | ) |
|
Field Documentation
ilUserQuestionResult::$active_id |
|
protected |
ilUserQuestionResult::$pass |
|
protected |
ilUserQuestionResult::$question |
|
protected |
ilUserQuestionResult::$reached_percentage |
|
protected |
ilUserQuestionResult::$solutions = array() |
|
protected |
ilUserQuestionResult::$USER_SOLUTION_IDENTIFIER_KEY = "key" |
|
static |
ilUserQuestionResult::$USER_SOLUTION_IDENTIFIER_VALUE = "value" |
|
static |
The documentation for this class was generated from the following file: