ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilPCQuestion Class Reference

Class ilPCQuestion. More...

+ Inheritance diagram for ilPCQuestion:
+ Collaboration diagram for ilPCQuestion:

Public Member Functions

 init ()
 Init page content component. More...
 
 setNode (&$a_node)
 Set node. More...
 
 setQuestionReference ($a_questionreference)
 Set Question Reference. More...
 
 getQuestionReference ()
 Get Question Reference. More...
 
 create (&$a_pg_obj, $a_hier_id)
 Create Question Element. More...
 
 copyPoolQuestionIntoPage ($a_q_id, $a_hier_id)
 Copy question from pool into page. More...
 
 _getPageForQuestionId ($a_q_id, $a_parent_type="")
 Get page for question id. More...
 
 modifyPageContentPostXsl ($a_output, $a_mode)
 Modify page content after xsl. More...
 
 getJavascriptFiles ($a_mode)
 Get Javascript files. More...
 
 getCssFiles ($a_mode)
 Get css files. More...
 
 getOnloadCode ($a_mode)
 Get on load code. More...
 
 getQuestionJsOfPage ($a_no_interaction, $a_mode)
 Get question js. More...
 
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 init ()
 Init object. More...
 
 getType ()
 Get type of page content. More...
 
 setNode (&$a_node)
 Set xml node of page content. More...
 
getNode ()
 Get xml node of page content. More...
 
 getJavascriptFiles ()
 Get Javascript files. More...
 
 getCssFiles ()
 Get css files. More...
 
 getOnloadCode ()
 Get on load code. More...
 
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure. More...
 
 getHierId ()
 Get hierarchical id. More...
 
 lookupHierId ()
 Get hierarchical id from dom. More...
 
 readHierId ()
 Read PC Id. More...
 
 setPcId ($a_pcid)
 Set PC Id. More...
 
 getPCId ()
 Get PC Id. More...
 
 readPCId ()
 Read PC Id. More...
 
 writePCId ($a_pc_id)
 Write pc id. More...
 
 isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
 setEnabled ($value)
 Set Enabled value for page content component. More...
 
 enable ()
 Enable page content. More...
 
 disable ()
 Disable page content. More...
 
 isEnabled ()
 Check whether page content is enabled. More...
 
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 modifyPageContentPostXsl ($a_output, $a_mode)
 Modify page content after xsl. More...
 

Static Public Member Functions

static getLangVars ()
 Get lang vars needed for editing. More...
 
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete ($a_page)
 Before page is being deleted. More...
 
static _getQuestionIdsForPage ($a_parent_type, $a_page_id, $a_lang="-")
 Get all questions of a page. More...
 
static resetInitialState ()
 Reset initial state (for exports) More...
 
static getJSTextInitCode ($a_lang)
 Get js txt init code. More...
 
- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number) More...
 
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number) More...
 
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container. More...
 
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content. More...
 
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete ($a_page)
 Before page is being deleted. More...
 
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created. More...
 

Data Fields

 $dom
 
 $q_node
 
- Data Fields inherited from ilPageContent
 $hier_id
 
 $node
 
 $dom
 

Static Protected Attributes

static $initial_done
 

Additional Inherited Members

- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 

Detailed Description

Class ilPCQuestion.

Assessment Question of ilPageObject

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 18 of file class.ilPCQuestion.php.

Member Function Documentation

◆ _getPageForQuestionId()

ilPCQuestion::_getPageForQuestionId (   $a_q_id,
  $a_parent_type = "" 
)

Get page for question id.

Parameters

Definition at line 245 of file class.ilPCQuestion.php.

References $ilDB.

Referenced by ilObjMediaObject\getParentObjectIdForUsage().

246  {
247  global $ilDB;
248 
249  $set = $ilDB->query("SELECT * FROM page_question ".
250  " WHERE question_id = ".$ilDB->quote($a_q_id, "integer")
251  );
252  while ($rec = $ilDB->fetchAssoc($set))
253  {
254  if ($a_parent_type == "" || $rec["page_parent_type"] == $a_parent_type)
255  {
256  return array("page_id" => $rec["page_id"], "parent_type" => $rec["page_parent_type"]);
257  }
258  }
259  return false;
260  }
global $ilDB
+ Here is the caller graph for this function:

◆ _getQuestionIdsForPage()

static ilPCQuestion::_getQuestionIdsForPage (   $a_parent_type,
  $a_page_id,
  $a_lang = "-" 
)
static

Get all questions of a page.

Definition at line 222 of file class.ilPCQuestion.php.

References $ilDB, and $res.

Referenced by ilSCORM2004Asset\exportHTMLPageObjects(), ilObjContentObject\exportHTMLPages(), ilSCORM2004Asset\exportPDFPrepareXmlNFiles(), ilSCORM2004Asset\exportXMLPageObjects(), ilObjectivesAlignmentTableGUI\fillRow(), ilLMPageObject\getQuestionIds(), ilLearningModuleExporter\getXmlRepresentation(), and ilSCORM2004ScoGUI\sahs_questions().

223  {
224  global $ilDB;
225 
226  $res = $ilDB->queryF("SELECT * FROM page_question WHERE page_parent_type = %s ".
227  " AND page_id = %s AND page_lang = %s",
228  array("text", "integer", "text"),
229  array($a_parent_type, $a_page_id, $a_lang));
230  $q_ids = array();
231  while ($rec = $ilDB->fetchAssoc($res))
232  {
233  $q_ids[] = $rec["question_id"];
234  }
235 
236  return $q_ids;
237  }
global $ilDB
+ Here is the caller graph for this function:

◆ afterPageUpdate()

static ilPCQuestion::afterPageUpdate (   $a_page,
DOMDocument  $a_domdoc,
  $a_xml,
  $a_creation 
)
static

After page has been updated (or created)

Parameters
objectpage object
DOMDocument$a_domdocdom document
stringxml
booltrue on creation, otherwise false

Definition at line 168 of file class.ilPCQuestion.php.

References $ilDB, ilPageContent\$node, ilInternalLink\_extractInstOfTarget(), and ilInternalLink\_extractObjIdOfTarget().

169  {
170  global $ilDB;
171 
172  include_once("./Services/Link/classes/class.ilInternalLink.php");
173 
174  $ilDB->manipulateF("DELETE FROM page_question WHERE page_parent_type = %s ".
175  " AND page_id = %s AND page_lang = %s", array("text", "integer", "text"),
176  array($a_page->getParentType(), $a_page->getId(), $a_page->getLanguage()));
177 
178  $xpath = new DOMXPath($a_domdoc);
179  $nodes = $xpath->query('//Question');
180  $q_ids = array();
181  foreach ($nodes as $node)
182  {
183  $q_ref = $node->getAttribute("QRef");
184 
185  $inst_id = ilInternalLink::_extractInstOfTarget($q_ref);
186  if (!($inst_id > 0))
187  {
189  if ($q_id > 0)
190  {
191  $q_ids[$q_id] = $q_id;
192  }
193  }
194  }
195  foreach($q_ids as $qid)
196  {
197  $ilDB->manipulateF("INSERT INTO page_question (page_parent_type, page_id, page_lang, question_id)".
198  " VALUES (%s,%s,%s,%s)",
199  array("text", "integer", "text", "integer"),
200  array($a_page->getParentType(), $a_page->getId(), $a_page->getLanguage(), $qid));
201  }
202 
203  }
global $ilDB
+ Here is the call graph for this function:

◆ beforePageDelete()

static ilPCQuestion::beforePageDelete (   $a_page)
static

Before page is being deleted.

Parameters
objectpage object

Definition at line 210 of file class.ilPCQuestion.php.

References $ilDB.

211  {
212  global $ilDB;
213 
214  $ilDB->manipulateF("DELETE FROM page_question WHERE page_parent_type = %s ".
215  " AND page_id = %s AND page_lang = %s", array("text", "integer", "text"),
216  array($a_page->getParentType(), $a_page->getId(), $a_page->getLanguage()));
217  }
global $ilDB

◆ copyPoolQuestionIntoPage()

ilPCQuestion::copyPoolQuestionIntoPage (   $a_q_id,
  $a_hier_id 
)

Copy question from pool into page.

Parameters

Definition at line 87 of file class.ilPCQuestion.php.

References assQuestion\_instanciateQuestion(), and ilAssSelfAssessmentQuestionFormatter\prepareQuestionForLearningModule().

88  {
89  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
90  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
91  $question = assQuestion::_instanciateQuestion($a_q_id);
92  $duplicate_id = $question->copyObject(0, $question->getTitle());
93  $duplicate = assQuestion::_instanciateQuestion($duplicate_id);
94  $duplicate->setObjId(0);
95 
96  /* PATCH-BEGIN: moved cleanup code to central place ilAssSelfAssessmentQuestionFormatter */
97  /*
98  // we remove everything not supported by the non-tiny self
99  // assessment question editor
100  $q = $duplicate->getQuestion();
101 
102  // we try to save all latex tags
103  $try = true;
104  $ls = '<span class="latex">';
105  $le = '</span>';
106  while ($try)
107  {
108  // search position of start tag
109  $pos1 = strpos($q, $ls);
110  if (is_int($pos1))
111  {
112  $pos2 = strpos($q, $le, $pos1);
113  if (is_int($pos2))
114  {
115  // both found: replace end tag
116  $q = substr($q, 0, $pos2)."[/tex]".substr($q, $pos2+7);
117  $q = substr($q, 0, $pos1)."[tex]".substr($q, $pos1+20);
118  }
119  else
120  {
121  $try = false;
122  }
123  }
124  else
125  {
126  $try = false;
127  }
128  }
129 
130  $tags = assQuestionGUI::getSelfAssessmentTags();
131  $tstr = "";
132  foreach ($tags as $t)
133  {
134  $tstr.="<".$t.">";
135  }
136  $q = ilUtil::secureString($q, true, $tstr);
137  // self assessment uses nl2br, not p
138  $duplicate->setQuestion($q);
139 
140  $duplicate->saveQuestionDataToDb();
141  */
142 
143  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssSelfAssessmentQuestionFormatter.php';
145 
146  /* PATCH-END: moved cleanup code to central place ilAssSelfAssessmentQuestionFormatter */
147 
148  $this->q_node->set_attribute("QRef", "il__qst_".$duplicate_id);
149  }
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
+ Here is the call graph for this function:

◆ create()

ilPCQuestion::create ( $a_pg_obj,
  $a_hier_id 
)

Create Question Element.

Definition at line 72 of file class.ilPCQuestion.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

73  {
74  $this->createPageContentNode();
75  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER);
76  $this->q_node = $this->dom->create_element("Question");
77  $this->q_node = $this->node->append_child($this->q_node);
78  $this->q_node->set_attribute("QRef", "");
79  }
const IL_INSERT_AFTER
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
+ Here is the call graph for this function:

◆ getCssFiles()

ilPCQuestion::getCssFiles (   $a_mode)

Get css files.

Definition at line 354 of file class.ilPCQuestion.php.

References ilPageContent\getPage().

355  {
356  if ($this->getPage()->getPageConfig()->getEnableSelfAssessment())
357  {
358  return array("./Modules/Scorm2004/templates/default/question_handling.css",
359  "Modules/TestQuestionPool/templates/default/test_javascript.css");
360  }
361  return array();
362  }
+ Here is the call graph for this function:

◆ getJavascriptFiles()

ilPCQuestion::getJavascriptFiles (   $a_mode)

Get Javascript files.

Definition at line 331 of file class.ilPCQuestion.php.

References ilPageContent\getPage(), and IL_PAGE_PREVIEW.

332  {
333  $js_files = array();
334 
335  if ($this->getPage()->getPageConfig()->getEnableSelfAssessment())
336  {
337  $js_files[] = "./Modules/Scorm2004/scripts/questions/pure.js";
338  $js_files[] = "./Modules/Scorm2004/scripts/questions/question_handling.js";
339  $js_files[] = "Modules/TestQuestionPool/js/ilMatchingQuestion.js";
340  }
341 
342  if (!$this->getPage()->getPageConfig()->getEnableSelfAssessmentScorm() && $a_mode != IL_PAGE_PREVIEW
343  && $a_mode != "offline")
344  {
345  $js_files[] = "./Services/COPage/js/ilCOPageQuestionHandler.js";
346  }
347 
348  return $js_files;
349  }
const IL_PAGE_PREVIEW
+ Here is the call graph for this function:

◆ getJSTextInitCode()

static ilPCQuestion::getJSTextInitCode (   $a_lang)
static

Get js txt init code.

Parameters

Definition at line 414 of file class.ilPCQuestion.php.

References $ilUser, and $lng.

Referenced by ilSCORM2004Asset\exportHTMLPageObjects().

415  {
416  global $lng, $ilUser;
417 
418  if ($a_lang == "")
419  {
420  $a_lang = $ilUser->getLanguage();
421  }
422 
423  return
424  '
425  ilias.questions.txt.wrong_answers = "'.$lng->txtlng("content", "cont_wrong_answers", $a_lang).'";
426  ilias.questions.txt.wrong_answers_single = "'.$lng->txtlng("content", "cont_wrong_answers_single", $a_lang).'";
427  ilias.questions.txt.tries_remaining = "'.$lng->txtlng("content", "cont_tries_remaining", $a_lang).'";
428  ilias.questions.txt.please_try_again = "'.$lng->txtlng("content", "cont_please_try_again", $a_lang).'";
429  ilias.questions.txt.all_answers_correct = "'.$lng->txtlng("content", "cont_all_answers_correct", $a_lang).'";
430  ilias.questions.txt.enough_answers_correct = "'.$lng->txtlng("content", "cont_enough_answers_correct", $a_lang).'";
431  ilias.questions.txt.nr_of_tries_exceeded = "'.$lng->txtlng("content", "cont_nr_of_tries_exceeded", $a_lang).'";
432  ilias.questions.txt.correct_answers_shown = "'.$lng->txtlng("content", "cont_correct_answers_shown", $a_lang).'";
433  ilias.questions.txt.correct_answers_also = "'.$lng->txtlng("content", "cont_correct_answers_also", $a_lang).'";
434  ilias.questions.txt.correct_answer_also = "'.$lng->txtlng("content", "cont_correct_answer_also", $a_lang).'";
435  ilias.questions.txt.ov_all_correct = "'.$lng->txtlng("content", "cont_ov_all_correct", $a_lang).'";
436  ilias.questions.txt.ov_some_correct = "'.$lng->txtlng("content", "cont_ov_some_correct", $a_lang).'";
437  ilias.questions.txt.ov_wrong_answered = "'.$lng->txtlng("content", "cont_ov_wrong_answered", $a_lang).'";
438  ilias.questions.txt.please_select = "'.$lng->txtlng("content", "cont_please_select", $a_lang).'";
439  ilias.questions.txt.ov_preview = "'.$lng->txtlng("content", "cont_ov_preview", $a_lang).'";
440  ilias.questions.refresh_lang();
441  ';
442 
443  }
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ getLangVars()

static ilPCQuestion::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

Definition at line 155 of file class.ilPCQuestion.php.

156  {
157  return array("ed_insert_pcqst", "empty_question", "pc_qst");
158  }

◆ getOnloadCode()

ilPCQuestion::getOnloadCode (   $a_mode)

Get on load code.

Definition at line 367 of file class.ilPCQuestion.php.

References $code, $ilCtrl, $ilUser, $url, ilPageQuestionProcessor\getAnswerStatus(), ilPageContent\getPage(), and IL_PAGE_PREVIEW.

368  {
369  global $ilCtrl, $ilUser;
370 
371  $code = array();
372 
373  if ($this->getPage()->getPageConfig()->getEnableSelfAssessment())
374  {
375  if (!$this->getPage()->getPageConfig()->getEnableSelfAssessmentScorm() && $a_mode != IL_PAGE_PREVIEW
376  && $a_mode != "offline")
377  {
378  $ilCtrl->setParameterByClass(strtolower(get_class($this->getPage()))."gui", "page_id", $this->getPage()->getId());
379  $url = $ilCtrl->getLinkTargetByClass(strtolower(get_class($this->getPage()))."gui", "processAnswer", "", true, false);
380  $code[] = "ilCOPageQuestionHandler.initCallback('".$url."');";
381  }
382 
383  if ($this->getPage()->getPageConfig()->getDisableDefaultQuestionFeedback())
384  {
385  $code[] = "ilias.questions.default_feedback = false;";
386  }
387 
388  $code[] = self::getJSTextInitCode($this->getPage()->getPageConfig()->getLocalizationLanguage()).' il.COPagePres.updateQuestionOverviews();';
389  }
390 
391  $get_stored_tries = $this->getPage()->getPageConfig()->getUseStoredQuestionTries();
392  if ($get_stored_tries)
393  {
394  $q_ids = $this->getPage()->getQuestionIds();
395  if (count($q_ids) > 0)
396  {
397  foreach ($q_ids as $q_id)
398  {
399  include_once("./Services/COPage/classes/class.ilPageQuestionProcessor.php");
400  $as = ilPageQuestionProcessor::getAnswerStatus($q_id, $ilUser->getId());
401  $code[] = "ilias.questions.initAnswer(".$q_id.", ".(int) $as["try"].", ".($as["passed"] ? "true" : "null").");";
402  }
403  }
404  }
405  return $code;
406  }
const IL_PAGE_PREVIEW
$code
Definition: example_050.php:99
$url
Definition: shib_logout.php:72
global $ilCtrl
Definition: ilias.php:18
static getAnswerStatus($a_q_id, $a_user_id=0)
Get statistics for question.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ getQuestionJsOfPage()

ilPCQuestion::getQuestionJsOfPage (   $a_no_interaction,
  $a_mode 
)

Get question js.

Definition at line 448 of file class.ilPCQuestion.php.

References $js, and ilPageContent\getPage().

Referenced by modifyPageContentPostXsl().

449  {
450  require_once './Modules/Scorm2004/classes/class.ilQuestionExporter.php';
451  $q_ids = $this->getPage()->getQuestionIds();
452  $js = array();
453  if (count($q_ids) > 0)
454  {
455  foreach ($q_ids as $q_id)
456  {
457  $q_exporter = new ilQuestionExporter($a_no_interaction);
458  $image_path = null;
459  if ($a_mode == "offline")
460  {
461  if ($this->getPage()->getParentType() == "sahs")
462  {
463  $image_path = "./objects/";
464  }
465  if ($this->getPage()->getParentType() == "lm")
466  {
467  $image_path = "./assessment/0/".$q_id."/images/";
468  }
469  }
470 
471  $js[$q_id] = $q_exporter->exportQuestion($q_id, $image_path, $a_mode);
472  }
473  }
474  return $js;
475  }
Scorm 2004 Question Exporter.
$js
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionReference()

ilPCQuestion::getQuestionReference ( )

Get Question Reference.

Returns
string Question Reference

Definition at line 60 of file class.ilPCQuestion.php.

61  {
62  if (is_object($this->q_node))
63  {
64  return $this->q_node->get_attribute("QRef", $a_questionreference);
65  }
66  return false;
67  }

◆ init()

ilPCQuestion::init ( )

Init page content component.

Definition at line 28 of file class.ilPCQuestion.php.

References ilPageContent\setType().

29  {
30  $this->setType("pcqst");
31  }
setType($a_type)
Set Type.
+ Here is the call graph for this function:

◆ modifyPageContentPostXsl()

ilPCQuestion::modifyPageContentPostXsl (   $a_output,
  $a_mode 
)

Modify page content after xsl.

Parameters
string$a_output
Returns
string

Definition at line 268 of file class.ilPCQuestion.php.

References $h, $lng, assQuestionGUI\_getQuestionGUI(), ilPageContent\getPage(), and getQuestionJsOfPage().

269  {
270  global $lng;
271 
272  if ($this->getPage()->getPageConfig()->getEnableSelfAssessment())
273  {
274  // #14154
275  $q_ids = $this->getPage()->getQuestionIds();
276  if(sizeof($q_ids))
277  {
278  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
279  foreach($q_ids as $q_id)
280  {
281  $q_gui = assQuestionGUI::_getQuestionGUI("", $q_id);
282  // object check due to #16557
283  if(is_object($q_gui->object) && !$q_gui->object->isComplete())
284  {
285  $a_output = str_replace("{{{{{Question;il__qst_".$q_id."}}}}}",
286  "<i>".$lng->txt("cont_empty_question")."</i>",
287  $a_output);
288  }
289  }
290 
291  // this exports the questions which is needed below
292  $qhtml = $this->getQuestionJsOfPage(($a_mode == "edit") ? true : false, $a_mode);
293 
294  require_once './Modules/Scorm2004/classes/class.ilQuestionExporter.php';
295  $a_output = "<script>".ilQuestionExporter::questionsJS($q_ids)."</script>".$a_output;
296  if(!self::$initial_done)
297  {
298  $a_output = "<script>var ScormApi=null; var questions = new Array();</script>".$a_output;
299  self::$initial_done = true;
300  }
301  }
302  }
303  else
304  {
305  // set by T&A components
306  $qhtml = $this->getPage()->getPageConfig()->getQuestionHTML();
307  }
308 
309  if (is_array($qhtml))
310  {
311  foreach ($qhtml as $k => $h)
312  {
313  $a_output = str_replace("{{{{{Question;il__qst_$k"."}}}}}", " ".$h, $a_output);
314  }
315  }
316 
317  return $a_output;
318  }
getQuestionJsOfPage($a_no_interaction, $a_mode)
Get question js.
$h
& _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ resetInitialState()

static ilPCQuestion::resetInitialState ( )
static

Reset initial state (for exports)

Definition at line 323 of file class.ilPCQuestion.php.

Referenced by ilObjContentObject\exportPageHTML().

324  {
325  self::$initial_done = false;
326  }
+ Here is the caller graph for this function:

◆ setNode()

ilPCQuestion::setNode ( $a_node)

Set node.

Definition at line 36 of file class.ilPCQuestion.php.

37  {
38  parent::setNode($a_node); // this is the PageContent node
39  $this->q_node =& $a_node->first_child(); //... and this the Question
40  }

◆ setQuestionReference()

ilPCQuestion::setQuestionReference (   $a_questionreference)

Set Question Reference.

Parameters
string$a_questionreferenceQuestion Reference

Definition at line 47 of file class.ilPCQuestion.php.

48  {
49  if (is_object($this->q_node))
50  {
51  $this->q_node->set_attribute("QRef", $a_questionreference);
52  }
53  }

Field Documentation

◆ $dom

ilPCQuestion::$dom

Definition at line 20 of file class.ilPCQuestion.php.

◆ $initial_done

ilPCQuestion::$initial_done
staticprotected

Definition at line 23 of file class.ilPCQuestion.php.

◆ $q_node

ilPCQuestion::$q_node

Definition at line 21 of file class.ilPCQuestion.php.


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