ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Survey\Editing\EditSessionRepo Class Reference

Stores access codes of anonymous session. More...

+ Collaboration diagram for ILIAS\Survey\Editing\EditSessionRepo:

Public Member Functions

 __construct ()
 
 setConstraintStructure (?array $structure)
 
 getConstraintStructure ()
 
 clearConstraintStructure ()
 
 setConstraintElements (?array $elements)
 
 getConstraintElements ()
 
 clearConstraintElements ()
 
 setMoveSurveyQuestions (int $survey_id, array $question_ids)
 
 clearMoveSurveyQuestions ()
 
 getMoveSurveyQuestions ()
 
 getMoveSurveyId ()
 
 setQuestionClipboard (int $ref_id, int $page, string $mode, array $question_ids)
 
 clearQuestionClipboard ($ref_id)
 
 getQuestionClipboardSourcePage (int $ref_id)
 
 getQuestionClipboardMode (int $ref_id)
 
 getQuestionClipboardQuestions (int $ref_id)
 
 isQuestionClipboardEmpty (int $ref_id)
 
 setPoolChoice (int $id)
 
 getPoolChoice ()
 
 setExternalText (string $text)
 
 getExternalText ()
 

Protected Member Functions

 getClipKey (int $ref_id)
 

Protected Attributes

const KEY_BASE = "svy_edit_"
 
const KEY_CONSTRAINT_STRUCTURE = self::KEY_BASE . "constraints"
 
const KEY_CONSTRAINT_ELEMENTS = self::KEY_BASE . "elements"
 
const KEY_EXT_TEXT = self::KEY_BASE . "ext_text"
 

Detailed Description

Stores access codes of anonymous session.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 27 of file class.EditSessionRepo.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Survey\Editing\EditSessionRepo::__construct ( )

Definition at line 34 of file class.EditSessionRepo.php.

35 {
36 }

Member Function Documentation

◆ clearConstraintElements()

ILIAS\Survey\Editing\EditSessionRepo::clearConstraintElements ( )

Definition at line 63 of file class.EditSessionRepo.php.

63 : void
64 {
65 \ilSession::clear(self::KEY_CONSTRAINT_ELEMENTS);
66 }
static clear(string $a_var)

References ilSession\clear().

+ Here is the call graph for this function:

◆ clearConstraintStructure()

ILIAS\Survey\Editing\EditSessionRepo::clearConstraintStructure ( )

Definition at line 48 of file class.EditSessionRepo.php.

48 : void
49 {
50 \ilSession::clear(self::KEY_CONSTRAINT_STRUCTURE);
51 }

References ilSession\clear().

+ Here is the call graph for this function:

◆ clearMoveSurveyQuestions()

ILIAS\Survey\Editing\EditSessionRepo::clearMoveSurveyQuestions ( )

Definition at line 74 of file class.EditSessionRepo.php.

74 : void
75 {
76 \ilSession::clear(self::KEY_BASE . "move_svy_id");
77 \ilSession::clear(self::KEY_BASE . "move_svy_qids");
78 }

References ilSession\clear().

+ Here is the call graph for this function:

◆ clearQuestionClipboard()

ILIAS\Survey\Editing\EditSessionRepo::clearQuestionClipboard (   $ref_id)

Definition at line 117 of file class.EditSessionRepo.php.

117 : void
118 {
120 }
$ref_id
Definition: ltiauth.php:66

References $ref_id, and ilSession\clear().

+ Here is the call graph for this function:

◆ getClipKey()

ILIAS\Survey\Editing\EditSessionRepo::getClipKey ( int  $ref_id)
protected

Definition at line 96 of file class.EditSessionRepo.php.

96 : string
97 {
98 return self::KEY_BASE . "q_clip_" . $ref_id;
99 }

References $ref_id.

◆ getConstraintElements()

ILIAS\Survey\Editing\EditSessionRepo::getConstraintElements ( )

Definition at line 58 of file class.EditSessionRepo.php.

58 : ?array
59 {
60 return \ilSession::get(self::KEY_CONSTRAINT_ELEMENTS);
61 }
get(string $class_name)

References ILIAS\GlobalScreen\get().

+ Here is the call graph for this function:

◆ getConstraintStructure()

ILIAS\Survey\Editing\EditSessionRepo::getConstraintStructure ( )

Definition at line 43 of file class.EditSessionRepo.php.

43 : ?array
44 {
45 return \ilSession::get(self::KEY_CONSTRAINT_STRUCTURE);
46 }

References ILIAS\GlobalScreen\get().

+ Here is the call graph for this function:

◆ getExternalText()

ILIAS\Survey\Editing\EditSessionRepo::getExternalText ( )

Definition at line 175 of file class.EditSessionRepo.php.

175 : string
176 {
177 return (string) \ilSession::get(self::KEY_EXT_TEXT);
178 }
static get(string $a_var)

References ilSession\get().

+ Here is the call graph for this function:

◆ getMoveSurveyId()

ILIAS\Survey\Editing\EditSessionRepo::getMoveSurveyId ( )

Definition at line 88 of file class.EditSessionRepo.php.

88 : int
89 {
90 if (\ilSession::has(self::KEY_BASE . "move_svy_id")) {
91 return \ilSession::get(self::KEY_BASE . "move_svy_id");
92 }
93 return 0;
94 }
static has($a_var)

References ILIAS\GlobalScreen\get(), and ilSession\has().

+ Here is the call graph for this function:

◆ getMoveSurveyQuestions()

ILIAS\Survey\Editing\EditSessionRepo::getMoveSurveyQuestions ( )

Definition at line 80 of file class.EditSessionRepo.php.

80 : array
81 {
82 if (\ilSession::has(self::KEY_BASE . "move_svy_qids")) {
83 return \ilSession::get(self::KEY_BASE . "move_svy_qids");
84 }
85 return [];
86 }

References ILIAS\GlobalScreen\get(), and ilSession\has().

+ Here is the call graph for this function:

◆ getPoolChoice()

ILIAS\Survey\Editing\EditSessionRepo::getPoolChoice ( )

Definition at line 162 of file class.EditSessionRepo.php.

162 : int
163 {
164 if (\ilSession::has(self::KEY_BASE . "pool_choice")) {
165 return \ilSession::get(self::KEY_BASE . "pool_choice");
166 }
167 return 0;
168 }

References ILIAS\GlobalScreen\get(), and ilSession\has().

+ Here is the call graph for this function:

◆ getQuestionClipboardMode()

ILIAS\Survey\Editing\EditSessionRepo::getQuestionClipboardMode ( int  $ref_id)

Definition at line 131 of file class.EditSessionRepo.php.

131 : string
132 {
133 if (\ilSession::has($this->getClipKey($ref_id))) {
135 return $data["mode"];
136 }
137 return "";
138 }

References $data, $ref_id, ilSession\get(), and ilSession\has().

+ Here is the call graph for this function:

◆ getQuestionClipboardQuestions()

ILIAS\Survey\Editing\EditSessionRepo::getQuestionClipboardQuestions ( int  $ref_id)

Definition at line 140 of file class.EditSessionRepo.php.

140 : array
141 {
142 if (\ilSession::has($this->getClipKey($ref_id))) {
144 return $data["question_ids"];
145 }
146 return [];
147 }

References $data, $ref_id, ilSession\get(), and ilSession\has().

+ Here is the call graph for this function:

◆ getQuestionClipboardSourcePage()

ILIAS\Survey\Editing\EditSessionRepo::getQuestionClipboardSourcePage ( int  $ref_id)

Definition at line 122 of file class.EditSessionRepo.php.

122 : ?int
123 {
124 if (\ilSession::has($this->getClipKey($ref_id))) {
126 return $data["source_page"];
127 }
128 return null;
129 }

References $data, $ref_id, ilSession\get(), and ilSession\has().

+ Here is the call graph for this function:

◆ isQuestionClipboardEmpty()

ILIAS\Survey\Editing\EditSessionRepo::isQuestionClipboardEmpty ( int  $ref_id)

Definition at line 149 of file class.EditSessionRepo.php.

149 : bool
150 {
151 if (\ilSession::has($this->getClipKey($ref_id))) {
152 return false;
153 }
154 return true;
155 }

References $ref_id, and ilSession\has().

+ Here is the call graph for this function:

◆ setConstraintElements()

ILIAS\Survey\Editing\EditSessionRepo::setConstraintElements ( ?array  $elements)

Definition at line 53 of file class.EditSessionRepo.php.

53 : void
54 {
55 \ilSession::set(self::KEY_CONSTRAINT_ELEMENTS, $elements);
56 }
static set(string $a_var, $a_val)
Set a value.

References ilSession\set().

+ Here is the call graph for this function:

◆ setConstraintStructure()

ILIAS\Survey\Editing\EditSessionRepo::setConstraintStructure ( ?array  $structure)

Definition at line 38 of file class.EditSessionRepo.php.

38 : void
39 {
40 \ilSession::set(self::KEY_CONSTRAINT_STRUCTURE, $structure);
41 }
$structure
TOTAL STRUCTURE.

References $structure, and ilSession\set().

+ Here is the call graph for this function:

◆ setExternalText()

ILIAS\Survey\Editing\EditSessionRepo::setExternalText ( string  $text)

Definition at line 170 of file class.EditSessionRepo.php.

170 : void
171 {
172 \ilSession::set(self::KEY_EXT_TEXT, $text);
173 }

References ilSession\set().

+ Here is the call graph for this function:

◆ setMoveSurveyQuestions()

ILIAS\Survey\Editing\EditSessionRepo::setMoveSurveyQuestions ( int  $survey_id,
array  $question_ids 
)

Definition at line 68 of file class.EditSessionRepo.php.

68 : void
69 {
70 \ilSession::set(self::KEY_BASE . "move_svy_id", $survey_id);
71 \ilSession::set(self::KEY_BASE . "move_svy_qids", $question_ids);
72 }

References ilSession\set().

+ Here is the call graph for this function:

◆ setPoolChoice()

ILIAS\Survey\Editing\EditSessionRepo::setPoolChoice ( int  $id)

Definition at line 157 of file class.EditSessionRepo.php.

157 : void
158 {
159 \ilSession::set(self::KEY_BASE . "pool_choice", $id);
160 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, and ilSession\set().

+ Here is the call graph for this function:

◆ setQuestionClipboard()

ILIAS\Survey\Editing\EditSessionRepo::setQuestionClipboard ( int  $ref_id,
int  $page,
string  $mode,
array  $question_ids 
)

Definition at line 101 of file class.EditSessionRepo.php.

106 : void {
108 $this->getClipKey($ref_id),
109 [
110 "source_page" => $page,
111 "mode" => $mode,
112 "question_ids" => $question_ids
113 ]
114 );
115 }

Field Documentation

◆ KEY_BASE

const ILIAS\Survey\Editing\EditSessionRepo::KEY_BASE = "svy_edit_"
protected

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

◆ KEY_CONSTRAINT_ELEMENTS

const ILIAS\Survey\Editing\EditSessionRepo::KEY_CONSTRAINT_ELEMENTS = self::KEY_BASE . "elements"
protected

Definition at line 31 of file class.EditSessionRepo.php.

◆ KEY_CONSTRAINT_STRUCTURE

const ILIAS\Survey\Editing\EditSessionRepo::KEY_CONSTRAINT_STRUCTURE = self::KEY_BASE . "constraints"
protected

Definition at line 30 of file class.EditSessionRepo.php.

◆ KEY_EXT_TEXT

const ILIAS\Survey\Editing\EditSessionRepo::KEY_EXT_TEXT = self::KEY_BASE . "ext_text"
protected

Definition at line 32 of file class.EditSessionRepo.php.


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