ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilAssQuestionHintsOrderingClipboard.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
14 {
21  private $questionId = null;
22 
29  public function __construct(assQuestion $questionOBJ)
30  {
31  $this->questionId = $questionOBJ->getId();
32 
33  if (!isset($_SESSION[__CLASS__])) {
34  $_SESSION[__CLASS__] = array();
35  }
36 
37  if (!isset($_SESSION[__CLASS__][$this->questionId])) {
38  $_SESSION[__CLASS__][$this->questionId] = null;
39  }
40  }
41 
47  public function resetStored()
48  {
49  $_SESSION[__CLASS__][$this->questionId] = null;
50  }
51 
59  public function setStored($hintId)
60  {
61  $_SESSION[__CLASS__][$this->questionId] = $hintId;
62  }
63 
70  public function getStored()
71  {
72  return $_SESSION[__CLASS__][$this->questionId];
73  }
74 
83  public function isStored($hintId)
84  {
85  if ($_SESSION[__CLASS__][$this->questionId] === $hintId) {
86  return true;
87  }
88 
89  return false;
90  }
91 
98  public function hasStored()
99  {
100  if ($_SESSION[__CLASS__][$this->questionId] !== null) {
101  return true;
102  }
103 
104  return false;
105  }
106 }
getId()
Gets the id of the assQuestion object.
resetStored()
resets the clipboard by ensuring no hint is stored
$_SESSION["AccountId"]
Abstract basic class which is to be extended by the concrete assessment question type classes...
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 ...
Create styles array
The data for the language used.
setStored($hintId)
sets the passed hint id, so relating hint is deemed to be cut to clipboard
hasStored()
returns the fact wether any hint is stored in clipboard currently or not