ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
SequenceManager.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Survey\Sequence
;
22
23
use
ILIAS\Survey\InternalRepoService
;
24
use
ILIAS\Survey\InternalDomainService
;
25
26
class
SequenceManager
27
{
28
protected \ilObjSurvey
$survey
;
29
protected \ilLogger
$log
;
30
protected
int
$survey_id
;
31
protected
InternalDomainService
$domain
;
32
protected
SequenceDBRepository
$question_repo
;
33
34
public
function
__construct
(
35
InternalRepoService
$repo,
36
InternalDomainService
$domain,
37
int
$survey_id,
38
\
ilObjSurvey
$survey
39
) {
40
$this->question_repo = $repo->
sequence
();
41
$this->domain =
$domain
;
42
$this->survey_id =
$survey_id
;
// not object id
43
$this->log = $domain->
log
();
44
$this->survey =
$survey
;
45
}
46
47
public
function
appendQuestion
(
48
int
$survey_question_id,
49
bool
$duplicate =
true
,
50
bool
$force_duplicate =
false
51
):
int
{
52
$this->log->debug(
"append question, id: "
. $survey_question_id .
", duplicate: "
. $duplicate .
", force: "
. $force_duplicate);
53
54
// create duplicate if pool question (or forced for question blocks copy)
55
if
($duplicate) {
56
// this does nothing if this is not a pool question and $a_force_duplicate is false
57
$survey_question_id = $this->survey->duplicateQuestionForSurvey($survey_question_id, $force_duplicate);
58
}
59
60
// check if question is not already in the survey, see #22018
61
if
($this->survey->isQuestionInSurvey($survey_question_id)) {
62
return
$survey_question_id;
63
}
64
65
// append to survey
66
$next_id = $this->question_repo->insert($this->survey_id, $survey_question_id);
67
68
$this->log->debug(
"insert svy_svy_qst, id: "
. $next_id .
", qfi: "
. $survey_question_id);
69
70
return
$survey_question_id;
71
}
72
73
}
ILIAS\Survey\Sequence\SequenceManager\$log
ilLogger $log
Definition:
SequenceManager.php:29
ilObjSurvey
Definition:
class.ilObjSurvey.php:25
ILIAS\Survey\InternalRepoService\sequence
sequence()
Definition:
class.InternalRepoService.php:84
ILIAS\Survey\InternalDomainService\log
log()
Definition:
class.InternalDomainService.php:60
InternalDomainService
ILIAS\Survey\Sequence\SequenceManager\$question_repo
SequenceDBRepository $question_repo
Definition:
SequenceManager.php:32
ILIAS\Survey\Sequence
Definition:
SequenceDBRepository.php:21
ILIAS\Survey\InternalRepoService
Survey internal data service.
Definition:
class.InternalRepoService.php:31
ILIAS\Survey\Sequence\SequenceManager\appendQuestion
appendQuestion(int $survey_question_id, bool $duplicate=true, bool $force_duplicate=false)
Definition:
SequenceManager.php:47
ILIAS\Survey\Sequence\SequenceManager\$domain
InternalDomainService $domain
Definition:
SequenceManager.php:31
InternalRepoService
ILIAS\Survey\Sequence\SequenceDBRepository
Definition:
SequenceDBRepository.php:25
ILIAS\Survey\Sequence\SequenceManager\__construct
__construct(InternalRepoService $repo, InternalDomainService $domain, int $survey_id, \ilObjSurvey $survey)
Definition:
SequenceManager.php:34
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ILIAS\Survey\InternalDomainService
Survey internal domain service.
Definition:
class.InternalDomainService.php:34
ILIAS\Survey\Sequence\SequenceManager
Definition:
SequenceManager.php:26
ILIAS\Survey\Sequence\SequenceManager\$survey_id
int $survey_id
Definition:
SequenceManager.php:30
ILIAS\Survey\Sequence\SequenceManager\$survey
ilObjSurvey $survey
Definition:
SequenceManager.php:28
Modules
Survey
Sequence
SequenceManager.php
Generated on Tue Apr 1 2025 22:01:37 for ILIAS by
1.8.13 (using
Doxyfile
)