ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ($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...
 

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 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...
 

Data Fields

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

Additional Inherited Members

- 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

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.

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)

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

+ 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

Reimplemented from ilPageContent.

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.

Reimplemented from ilPageContent.

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

25 {
26 $this->setType("vrfc");
27 }
setType($a_type)
Set Type.

References ilPageContent\setType().

+ 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.

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.
$a_type
Definition: workflow.php:93

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

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

+ 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.

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 }
$ilUser
Definition: imgupload.php:18

References $a_type, and $ilUser.

◆ setNode()

ilPCVerification::setNode (   $a_node)

Set node.

Reimplemented from ilPageContent.

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.

Referenced by isInPortfolioPage().


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