ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilPCQuestionOverview Class Reference

Question overview page content element. More...

+ Inheritance diagram for ilPCQuestionOverview:
+ Collaboration diagram for ilPCQuestionOverview:

Public Member Functions

 init ()
 Init page content component. More...
 
 setNode ($a_node)
 Set node. More...
 
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create question overview node in xml. More...
 
 setShortMessage ($a_val)
 Set short message. More...
 
 getShortMessage ()
 Get short message. More...
 
 setListWrongQuestions ($a_val)
 Set list wrong questions. More...
 
 getListWrongQuestions ()
 Get list wrong questions. 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 ($a_mode)
 Get Javascript files. More...
 
 getCssFiles ($a_mode)
 Get css files. More...
 
 getOnloadCode ($a_mode)
 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...
 
 setFileDownloadLink ($a_download_link)
 Set file download link. More...
 
 getFileDownloadLink ()
 Get file download link. More...
 
 setFullscreenLink ($a_fullscreen_link)
 Set fullscreen link. More...
 
 getFullscreenLink ()
 Get fullscreen link. More...
 
 setSourcecodeDownloadScript ($script_name)
 Set sourcecode download script. More...
 
 getSourcecodeDownloadScript ()
 Get sourcecode download script. More...
 
 readPCId ()
 Read PC Id. More...
 
 writePCId ($a_pc_id)
 Write pc id. 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...
 

Data Fields

 $dom
 
 $qover_node
 
- Data Fields inherited from ilPageContent
 $hier_id
 
 $node
 
 $dom
 
 $page_lang
 

Additional Inherited Members

- 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 isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b. 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...
 
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 
- Protected Attributes inherited from ilPageContent
 $file_download_link
 
 $fullscreen_link
 
 $sourcecode_download_script
 
 $log
 

Detailed Description

Question overview page content element.

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

Definition at line 15 of file class.ilPCQuestionOverview.php.

Member Function Documentation

◆ create()

ilPCQuestionOverview::create ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create question overview node in xml.

Parameters
object$a_pg_objPage Object
string$a_hier_idHierarchical ID

Definition at line 43 of file class.ilPCQuestionOverview.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

44  {
45  $this->node = $this->createPageContentNode();
46  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
47  $this->qover_node = $this->dom->create_element("QuestionOverview");
48  $this->qover_node = $this->node->append_child($this->qover_node);
49  $this->qover_node->set_attribute("ShortMessage", "y");
50  }
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:

◆ getListWrongQuestions()

ilPCQuestionOverview::getListWrongQuestions ( )

Get list wrong questions.

Returns
boolean

Definition at line 114 of file class.ilPCQuestionOverview.php.

115  {
116  if (is_object($this->qover_node))
117  {
118  if ($this->qover_node->get_attribute("ListWrongQuestions") == "y")
119  {
120  return true;
121  }
122  }
123  return false;
124  }

◆ getShortMessage()

ilPCQuestionOverview::getShortMessage ( )

Get short message.

Returns
boolean

Definition at line 77 of file class.ilPCQuestionOverview.php.

78  {
79  if (is_object($this->qover_node))
80  {
81  if ($this->qover_node->get_attribute("ShortMessage") == "y")
82  {
83  return true;
84  }
85  }
86  return false;
87  }

◆ init()

ilPCQuestionOverview::init ( )

Init page content component.

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

References ilPageContent\setType().

24  {
25  $this->setType("qover");
26  }
setType($a_type)
Set Type.
+ Here is the call graph for this function:

◆ setListWrongQuestions()

ilPCQuestionOverview::setListWrongQuestions (   $a_val)

Set list wrong questions.

Parameters
boolean$a_valt/f

Definition at line 94 of file class.ilPCQuestionOverview.php.

95  {
96  if ($a_val)
97  {
98  $this->qover_node->set_attribute("ListWrongQuestions", "y");
99  }
100  else
101  {
102  if ($this->qover_node->has_attribute("ListWrongQuestions"))
103  {
104  $this->qover_node->remove_attribute("ListWrongQuestions");
105  }
106  }
107  }

◆ setNode()

ilPCQuestionOverview::setNode (   $a_node)

Set node.

Definition at line 31 of file class.ilPCQuestionOverview.php.

32  {
33  parent::setNode($a_node); // this is the PageContent node
34  $this->qover_node = $a_node->first_child(); // this is the question overview node
35  }

◆ setShortMessage()

ilPCQuestionOverview::setShortMessage (   $a_val)

Set short message.

Parameters
boolean$a_valt/f

Definition at line 57 of file class.ilPCQuestionOverview.php.

58  {
59  if ($a_val)
60  {
61  $this->qover_node->set_attribute("ShortMessage", "y");
62  }
63  else
64  {
65  if ($this->qover_node->has_attribute("ShortMessage"))
66  {
67  $this->qover_node->remove_attribute("ShortMessage");
68  }
69  }
70  }

Field Documentation

◆ $dom

ilPCQuestionOverview::$dom

Definition at line 17 of file class.ilPCQuestionOverview.php.

◆ $qover_node

ilPCQuestionOverview::$qover_node

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


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