ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
$_SESSION["AccountId"]
Abstract basic class which is to be extended by the concrete assessment question type classes.
getId()
Gets the id of the assQuestion object.
setStored($hintId)
sets the passed hint id, so relating hint is deemed to be cut to clipboard
isStored($hintId)
returns the fact wether the hint relating to the passed hint id is stored in clipboard or not
resetStored()
resets the clipboard by ensuring no hint is stored
hasStored()
returns the fact wether any hint is stored in clipboard currently or not
getStored()
returns the hint id currently stored in clipboard