ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\COPage\PC\Question\QuestionManager Class Reference
+ Collaboration diagram for ILIAS\COPage\PC\Question\QuestionManager:

Public Member Functions

 __construct ()
 
 resolveQuestionReferences (\DOMDocument $dom, array $a_mapping)
 Resolve all quesiont references (after import) More...
 

Protected Attributes

ILIAS COPage Dom DomUtil $dom_util
 

Detailed Description

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

Definition at line 26 of file QuestionManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\COPage\PC\Question\QuestionManager::__construct ( )

Definition at line 30 of file QuestionManager.php.

References $DIC.

31  {
32  global $DIC;
33  $this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
34  }
global $DIC
Definition: shib_login.php:26

Member Function Documentation

◆ resolveQuestionReferences()

ILIAS\COPage\PC\Question\QuestionManager::resolveQuestionReferences ( \DOMDocument  $dom,
array  $a_mapping 
)

Resolve all quesiont references (after import)

Definition at line 40 of file QuestionManager.php.

References $path.

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  }
$path
Definition: ltiservices.php:29

Field Documentation

◆ $dom_util

ILIAS COPage Dom DomUtil ILIAS\COPage\PC\Question\QuestionManager::$dom_util
protected

Definition at line 28 of file QuestionManager.php.


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