24 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
55 $this->q_node =& $a_node->first_child();
65 if (is_object($this->q_node))
67 $this->q_node->set_attribute(
"QRef", $a_questionreference);
78 if (is_object($this->q_node))
80 return $this->q_node->get_attribute(
"QRef", $a_questionreference);
88 function create(&$a_pg_obj, $a_hier_id)
92 $this->q_node = $this->dom->create_element(
"Question");
93 $this->q_node = $this->node->append_child($this->q_node);
94 $this->q_node->set_attribute(
"QRef",
"");
105 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
106 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
108 $duplicate_id = $question->copyObject(0, $question->getTitle());
110 $duplicate->setObjId(0);
114 $q = $duplicate->getQuestion();
118 $ls =
'<span class="latex">';
123 $pos1 = strpos($q, $ls);
126 $pos2 = strpos($q, $le, $pos1);
130 $q = substr($q, 0, $pos2).
"[/tex]".substr($q, $pos2+7);
131 $q = substr($q, 0, $pos1).
"[tex]".substr($q, $pos1+20);
146 foreach ($tags as
$t)
152 $duplicate->setQuestion($q);
154 $duplicate->saveQuestionDataToDb();
156 $this->q_node->set_attribute(
"QRef",
"il__qst_".$duplicate_id);