ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSCORMResources Class Reference

SCORM Resources Element. More...

+ Inheritance diagram for ilSCORMResources:
+ Collaboration diagram for ilSCORMResources:

Public Member Functions

 __construct ($a_id=0)
 Constructor. More...
 
 getXmlBase ()
 
 setXmlBase ($a_xml_base)
 
 read ()
 
 create ()
 
 update ()
 
 delete ()
 
- Public Member Functions inherited from ilSCORMObject
 __construct ($a_id=0)
 Constructor. More...
 
 getId ()
 
 setId ($a_id)
 
 getType ()
 
 setType ($a_type)
 
 getTitle ()
 
 setTitle ($a_title)
 
 getSLMId ()
 
 setSLMId ($a_slm_id)
 
 read ()
 
 create ()
 Create database record for SCORM object. More...
 
 update ()
 Updates database record for SCORM object. More...
 
 delete ()
 

Data Fields

 $xml_base
 
- Data Fields inherited from ilSCORMObject
 $id
 
 $title
 
 $type
 
 $slm_id
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSCORMObject
static _lookupPresentableItems ($a_slm_id)
 Count number of presentable SCOs/Assets of SCORM learning module. More...
 
static & _getInstance ($a_id, $a_slm_id)
 get instance of specialized GUI class More...
 

Detailed Description

SCORM Resources Element.

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

Definition at line 34 of file class.ilSCORMResources.php.

Constructor & Destructor Documentation

◆ __construct()

ilSCORMResources::__construct (   $a_id = 0)

Constructor.

Parameters
int$a_idObject ID public

Definition at line 45 of file class.ilSCORMResources.php.

References $DIC, $lng, ilSCORMObject\setTitle(), and ilSCORMObject\setType().

46  {
47  global $DIC;
48  $lng = $DIC['lng'];
49 
50  parent::__construct($a_id);
51  $this->setType('srs');
52 
53  $this->setTitle($lng->txt('cont_resources'));
54  }
global $DIC
Definition: saml.php:7
$lng
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilSCORMResources::create ( )

Definition at line 82 of file class.ilSCORMResources.php.

References $DIC, $ilDB, ilSCORMObject\getId(), and getXmlBase().

83  {
84  global $DIC;
85  $ilDB = $DIC['ilDB'];
86 
87  parent::create();
88 
89  $ilDB->manipulateF(
90  'INSERT INTO sc_resources (obj_id, xml_base) VALUES (%s, %s)',
91  array('integer', 'text'),
92  array($this->getId(), $this->getXmlBase())
93  );
94  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ delete()

ilSCORMResources::delete ( )

Definition at line 111 of file class.ilSCORMResources.php.

References $DIC, $ilDB, and ilSCORMObject\getId().

112  {
113  global $DIC;
114  $ilDB = $DIC['ilDB'];
115 
116  parent::delete();
117 
118  $ilDB->manipulateF(
119  'DELETE FROM sc_resources WHERE obj_id = %s',
120  array('integer'),
121  array($this->getId())
122  );
123  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ getXmlBase()

ilSCORMResources::getXmlBase ( )

Definition at line 56 of file class.ilSCORMResources.php.

References $xml_base.

Referenced by create(), and update().

57  {
58  return $this->xml_base;
59  }
+ Here is the caller graph for this function:

◆ read()

ilSCORMResources::read ( )

Definition at line 66 of file class.ilSCORMResources.php.

References $DIC, $ilDB, ilSCORMObject\getId(), and setXmlBase().

67  {
68  global $DIC;
69  $ilDB = $DIC['ilDB'];
70 
71  parent::read();
72 
73  $obj_set = $ilDB->queryF(
74  'SELECT xml_base FROM sc_resources WHERE obj_id = %s',
75  array('integer'),
76  array($this->getId())
77  );
78  $obj_rec = $ilDB->fetchAssoc($obj_set);
79  $this->setXmlBase($obj_rec['xml_base']);
80  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ setXmlBase()

ilSCORMResources::setXmlBase (   $a_xml_base)

Definition at line 61 of file class.ilSCORMResources.php.

Referenced by read().

62  {
63  $this->xml_base = $a_xml_base;
64  }
+ Here is the caller graph for this function:

◆ update()

ilSCORMResources::update ( )

Definition at line 96 of file class.ilSCORMResources.php.

References $DIC, $ilDB, ilSCORMObject\getId(), getXmlBase(), and League\Flysystem\Adapter\Polyfill\update().

97  {
98  global $DIC;
99  $ilDB = $DIC['ilDB'];
100 
101  parent::update();
102 
103  $ilDB->manipulateF(
104  '
105  UPDATE sc_resources SET xml_base = %s WHERE obj_id = %s',
106  array('text', 'integer'),
107  array($this->getXmlBase() ,$this->getId())
108  );
109  }
global $DIC
Definition: saml.php:7
update($pash, $contents, Config $config)
global $ilDB
+ Here is the call graph for this function:

Field Documentation

◆ $xml_base

ilSCORMResources::$xml_base

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

Referenced by getXmlBase().


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