ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
ilAssQuestionHintsOrderingClipboard Class Reference
+ Collaboration diagram for ilAssQuestionHintsOrderingClipboard:

Public Member Functions

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

Private Attributes

 $questionId = null
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionHintsOrderingClipboard::__construct ( assQuestion  $questionOBJ)

Constructor.

public

Parameters
assQuestion$questionOBJ

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

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

30  {
31  $this->questionId = $questionOBJ->getId();
32 
33  if( !isset($_SESSION[__CLASS__]) )
34  {
35  $_SESSION[__CLASS__] = array();
36  }
37 
38  if( !isset($_SESSION[__CLASS__][$this->questionId]) )
39  {
40  $_SESSION[__CLASS__][$this->questionId] = null;
41  }
42  }
getId()
Gets the id of the assQuestion object.
$_SESSION["AccountId"]
+ Here is the call graph for this function:

Member Function Documentation

◆ getStored()

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.

◆ hasStored()

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.

102  {
103  if( $_SESSION[__CLASS__][$this->questionId] !== null )
104  {
105  return true;
106  }
107 
108  return false;
109  }
$_SESSION["AccountId"]

◆ isStored()

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.

86  {
87  if( $_SESSION[__CLASS__][$this->questionId] === $hintId )
88  {
89  return true;
90  }
91 
92  return false;
93  }
$_SESSION["AccountId"]

◆ resetStored()

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.

◆ setStored()

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.

Field Documentation

◆ $questionId

ilAssQuestionHintsOrderingClipboard::$questionId = null
private

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