ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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  {
35  $_SESSION[__CLASS__] = array();
36  }
37 
38  if( !isset($_SESSION[__CLASS__][$this->questionId]) )
39  {
40  $_SESSION[__CLASS__][$this->questionId] = null;
41  }
42  }
43 
49  public function resetStored()
50  {
51  $_SESSION[__CLASS__][$this->questionId] = null;
52  }
53 
61  public function setStored($hintId)
62  {
63  $_SESSION[__CLASS__][$this->questionId] = $hintId;
64  }
65 
72  public function getStored()
73  {
74  return $_SESSION[__CLASS__][$this->questionId];
75  }
76 
85  public function isStored($hintId)
86  {
87  if( $_SESSION[__CLASS__][$this->questionId] === $hintId )
88  {
89  return true;
90  }
91 
92  return false;
93  }
94 
101  public function hasStored()
102  {
103  if( $_SESSION[__CLASS__][$this->questionId] !== null )
104  {
105  return true;
106  }
107 
108  return false;
109  }
110 }
111 
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