ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPCVerification Class Reference

Class ilPCVerification. More...

+ Inheritance diagram for ilPCVerification:
+ Collaboration diagram for ilPCVerification:

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 verification node in xml. More...
 
 setData ($a_type, $a_id)
 Set verification data. More...
 
 getData ()
 Get verification data. 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 isInPortfolioPage (ilPortfolioPage $a_page, $a_type, $a_id)
 
- 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
 
- Data Fields inherited from ilPageContent
 $hier_id
 
 $node
 
 $dom
 

Additional Inherited Members

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

Detailed Description

Class ilPCVerification.

Verification content object (see ILIAS DTD)

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id
class.ilPCListItem.php 22210 2009-10-26 09:46:06Z akill

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

Member Function Documentation

◆ create()

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

Create verification node in xml.

Parameters
object$a_pg_objPage Object
string$a_hier_idHierarchical ID

Definition at line 44 of file class.ilPCVerification.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

45  {
46  $this->node = $this->createPageContentNode();
47  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
48  $this->vrfc_node = $this->dom->create_element("Verification");
49  $this->vrfc_node = $this->node->append_child($this->vrfc_node);
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:

◆ getData()

ilPCVerification::getData ( )

Get verification data.

Returns
array

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

73  {
74  if (is_object($this->vrfc_node))
75  {
76  return array("id"=>$this->vrfc_node->get_attribute("Id"),
77  "type"=>$this->vrfc_node->get_attribute("Type"),
78  "user"=>$this->vrfc_node->get_attribute("User"));
79  }
80  }

◆ getLangVars()

static ilPCVerification::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

Definition at line 86 of file class.ilPCVerification.php.

87  {
88  return array("pc_vrfc",
89  "ed_insert_verification");
90  }

◆ init()

ilPCVerification::init ( )

Init page content component.

Definition at line 24 of file class.ilPCVerification.php.

References ilPageContent\setType().

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

◆ isInPortfolioPage()

static ilPCVerification::isInPortfolioPage ( ilPortfolioPage  $a_page,
  $a_type,
  $a_id 
)
static

Definition at line 92 of file class.ilPCVerification.php.

References ilPageContent\$node, ilPageObject\buildDom(), and ilPageObject\getDom().

Referenced by ilObjTestVerificationGUI\downloadFromPortfolioPage(), ilObjExerciseVerificationGUI\downloadFromPortfolioPage(), ilObjCourseVerificationGUI\downloadFromPortfolioPage(), and ilObjSCORMVerificationGUI\downloadFromPortfolioPage().

93  {
94  // try to find verification in portfolio page
95  $a_page->buildDom();
96  $dom = $a_page->getDom();
97  if($dom instanceof php4DOMDocument)
98  {
99  $dom = $dom->myDOMDocument;
100  }
101  $xpath_temp = new DOMXPath($dom);
102  $nodes = $xpath_temp->query("//PageContent/Verification");
103  foreach($nodes as $node)
104  {
105  if($node->getAttribute("Type") == $a_type &&
106  $node->getAttribute("Id") == $a_id)
107  {
108  return true;
109  }
110  }
111 
112  return false;
113  }
buildDom($a_force=false)
getDom()
Deprecated php4DomDocument.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setData()

ilPCVerification::setData (   $a_type,
  $a_id 
)

Set verification data.

Parameters
string$a_type
int$a_id

Definition at line 58 of file class.ilPCVerification.php.

References $ilUser.

59  {
60  global $ilUser;
61 
62  $this->vrfc_node->set_attribute("Type", $a_type);
63  $this->vrfc_node->set_attribute("Id", $a_id);
64  $this->vrfc_node->set_attribute("User", $ilUser->getId());
65  }
global $ilUser
Definition: imgupload.php:15

◆ setNode()

ilPCVerification::setNode ( $a_node)

Set node.

Definition at line 32 of file class.ilPCVerification.php.

33  {
34  parent::setNode($a_node); // this is the PageContent node
35  $this->vrfc_node =& $a_node->first_child(); // this is the verification node
36  }

Field Documentation

◆ $dom

ilPCVerification::$dom

Definition at line 19 of file class.ilPCVerification.php.


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