ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
QuestionManager.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\COPage\PC\Question
;
22
26
class
QuestionManager
27
{
28
protected \ILIAS\COPage\Dom\DomUtil
$dom_util
;
29
30
public
function
__construct
()
31
{
32
global
$DIC
;
33
$this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
34
}
35
40
public
function
resolveQuestionReferences
(
41
\
DOMDocument
$dom,
42
array $a_mapping
43
): bool {
44
$path
=
"//Question"
;
45
$updated =
false
;
46
$nodes = $this->dom_util->path($dom,
$path
);
47
foreach
($nodes as $node) {
48
$qref = $node->getAttribute(
"QRef"
);
49
if
(isset($a_mapping[$qref])) {
50
$node->setAttribute(
"QRef"
,
"il__qst_"
. $a_mapping[$qref][
"pool"
]);
51
$updated =
true
;
52
}
53
}
54
return
$updated;
55
}
56
}
DOMDocument
ILIAS\COPage\PC\Question\QuestionManager\resolveQuestionReferences
resolveQuestionReferences(\DOMDocument $dom, array $a_mapping)
Resolve all quesiont references (after import)
Definition:
QuestionManager.php:40
$path
$path
Definition:
ltiservices.php:29
ILIAS\COPage\PC\Question\QuestionManager
Definition:
QuestionManager.php:26
ILIAS\COPage\PC\Question
Definition:
QuestionManager.php:21
$DIC
global $DIC
Definition:
shib_login.php:22
ILIAS\COPage\PC\Question\QuestionManager\__construct
__construct()
Definition:
QuestionManager.php:30
ILIAS\COPage\PC\Question\QuestionManager\$dom_util
ILIAS COPage Dom DomUtil $dom_util
Definition:
QuestionManager.php:28
components
ILIAS
COPage
PC
Question
QuestionManager.php
Generated on Sat Apr 5 2025 23:02:55 for ILIAS by
1.8.13 (using
Doxyfile
)