ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAssQuestionHintsOrderingClipboard Class Reference
+ Collaboration diagram for ilAssQuestionHintsOrderingClipboard:

Public Member Functions

 __construct (assQuestion $questionOBJ)
 Constructor.
 resetStored ()
 resets the clipboard by ensuring no hint is stored
 setStored ($hintId)
 sets the passed hint id, so relating hint is deemed to be cut to clipboard
 getStored ()
 returns the hint id currently stored in clipboard
 isStored ($hintId)
 returns the fact wether the hint relating to the passed hint id is stored in clipboard or not
 hasStored ()
 returns the fact wether any hint is stored in clipboard currently or not

Private Attributes

 $questionId = null

Detailed Description

Constructor & Destructor Documentation

ilAssQuestionHintsOrderingClipboard::__construct ( assQuestion  $questionOBJ)

Constructor.

public

Parameters
assQuestion$questionOBJ

Definition at line 29 of file class.ilAssQuestionHintsOrderingClipboard.php.

References $_SESSION, $questionId, and assQuestion\getId().

{
$this->questionId = $questionOBJ->getId();
if( !isset($_SESSION[__CLASS__]) )
{
$_SESSION[__CLASS__] = array();
}
if( !isset($_SESSION[__CLASS__][$this->questionId]) )
{
$_SESSION[__CLASS__][$this->questionId] = null;
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilAssQuestionHintsOrderingClipboard::getStored ( )

returns the hint id currently stored in clipboard

public

Returns
integer $hintId

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

References $_SESSION, and $questionId.

{
return $_SESSION[__CLASS__][$this->questionId];
}
ilAssQuestionHintsOrderingClipboard::hasStored ( )

returns the fact wether any hint is stored in clipboard currently or not

public

Returns
boolean $hasStored

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

References $_SESSION.

{
if( $_SESSION[__CLASS__][$this->questionId] !== null )
{
return true;
}
return false;
}
ilAssQuestionHintsOrderingClipboard::isStored (   $hintId)

returns the fact wether the hint relating to the passed hint id is stored in clipboard or not

public

Parameters
integer$hintId
Returns
boolean $isStored

Definition at line 85 of file class.ilAssQuestionHintsOrderingClipboard.php.

References $_SESSION.

{
if( $_SESSION[__CLASS__][$this->questionId] === $hintId )
{
return true;
}
return false;
}
ilAssQuestionHintsOrderingClipboard::resetStored ( )

resets the clipboard by ensuring no hint is stored

public

Definition at line 49 of file class.ilAssQuestionHintsOrderingClipboard.php.

References $_SESSION, and $questionId.

{
$_SESSION[__CLASS__][$this->questionId] = null;
}
ilAssQuestionHintsOrderingClipboard::setStored (   $hintId)

sets the passed hint id, so relating hint is deemed to be cut to clipboard

public

Parameters
integer$hintId

Definition at line 61 of file class.ilAssQuestionHintsOrderingClipboard.php.

References $_SESSION, and $questionId.

{
$_SESSION[__CLASS__][$this->questionId] = $hintId;
}

Field Documentation

ilAssQuestionHintsOrderingClipboard::$questionId = null
private

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