ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
 

Protected Attributes

 $user
 
- Protected Attributes inherited from ilPageContent
 $file_download_link
 
 $fullscreen_link
 
 $sourcecode_download_script
 
 $log
 

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 52 of file class.ilPCVerification.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

53  {
54  $this->node = $this->createPageContentNode();
55  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
56  $this->vrfc_node = $this->dom->create_element("Verification");
57  $this->vrfc_node = $this->node->append_child($this->vrfc_node);
58  }
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 80 of file class.ilPCVerification.php.

References array.

81  {
82  if (is_object($this->vrfc_node)) {
83  return array("id"=>$this->vrfc_node->get_attribute("Id"),
84  "type"=>$this->vrfc_node->get_attribute("Type"),
85  "user"=>$this->vrfc_node->get_attribute("User"));
86  }
87  }
Create styles array
The data for the language used.

◆ getLangVars()

static ilPCVerification::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

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

References array.

94  {
95  return array("pc_vrfc",
96  "ed_insert_verification");
97  }
Create styles array
The data for the language used.

◆ init()

ilPCVerification::init ( )

Init page content component.

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

References $DIC, ilPageContent\setType(), and user().

30  {
31  global $DIC;
32 
33  $this->user = $DIC->user();
34  $this->setType("vrfc");
35  }
global $DIC
Definition: saml.php:7
setType($a_type)
Set Type.
user()
Definition: user.php:4
+ Here is the call graph for this function:

◆ isInPortfolioPage()

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

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

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

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

100  {
101  // try to find verification in portfolio page
102  $a_page->buildDom();
103  $dom = $a_page->getDom();
104  if ($dom instanceof php4DOMDocument) {
105  $dom = $dom->myDOMDocument;
106  }
107  $xpath_temp = new DOMXPath($dom);
108  $nodes = $xpath_temp->query("//PageContent/Verification");
109  foreach ($nodes as $node) {
110  if ($node->getAttribute("Type") == $a_type &&
111  $node->getAttribute("Id") == $a_id) {
112  return true;
113  }
114  }
115 
116  return false;
117  }
buildDom($a_force=false)
$a_type
Definition: workflow.php:92
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 66 of file class.ilPCVerification.php.

References $a_type, $ilUser, and $user.

67  {
69 
70  $this->vrfc_node->set_attribute("Type", $a_type);
71  $this->vrfc_node->set_attribute("Id", $a_id);
72  $this->vrfc_node->set_attribute("User", $ilUser->getId());
73  }
$a_type
Definition: workflow.php:92
$ilUser
Definition: imgupload.php:18

◆ setNode()

ilPCVerification::setNode (   $a_node)

Set node.

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

41  {
42  parent::setNode($a_node); // this is the PageContent node
43  $this->vrfc_node = $a_node->first_child(); // this is the verification node
44  }

Field Documentation

◆ $dom

ilPCVerification::$dom

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

Referenced by isInPortfolioPage().

◆ $user

ilPCVerification::$user
protected

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

Referenced by setData().


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