ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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