ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSCORMResources Class Reference

SCORM Resources Element. More...

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

Public Member Functions

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

Data Fields

string $xml_base = null
 
- Data Fields inherited from ilSCORMObject
int $id
 
string $title = ""
 
string $type = null
 
int $slm_id
 

Additional Inherited Members

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

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 28 of file class.ilSCORMResources.php.

Constructor & Destructor Documentation

◆ __construct()

ilSCORMResources::__construct ( int  $a_id = 0)

Constructor.

Parameters
int$a_idObject ID

Reimplemented from ilSCORMObject.

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

37 {
38 global $DIC;
39 $lng = $DIC->language();
40
42 $this->setType('srs');
43
44 $this->setTitle($lng->txt('cont_resources'));
45 }
setTitle(string $a_title)
setType(?string $a_type)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26

References $DIC, $lng, ILIAS\GlobalScreen\Provider\__construct(), ilSCORMObject\setTitle(), and ilSCORMObject\setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilSCORMResources::create ( )

Create database record for SCORM object.

Reimplemented from ilSCORMObject.

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

73 : void
74 {
75 global $DIC;
76 $ilDB = $DIC->database();
77
78 parent::create();
79
80 $ilDB->manipulateF(
81 'INSERT INTO sc_resources (obj_id, xml_base) VALUES (%s, %s)',
82 array('integer', 'text'),
83 array($this->getId(), $this->getXmlBase())
84 );
85 }

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

+ Here is the call graph for this function:

◆ delete()

ilSCORMResources::delete ( )

Reimplemented from ilSCORMObject.

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

102 : void
103 {
104 global $DIC;
105 $ilDB = $DIC->database();
106
107 parent::delete();
108
109 $ilDB->manipulateF(
110 'DELETE FROM sc_resources WHERE obj_id = %s',
111 array('integer'),
112 array($this->getId())
113 );
114 }

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

+ Here is the call graph for this function:

◆ getXmlBase()

ilSCORMResources::getXmlBase ( )

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

47 : ?string
48 {
49 return $this->xml_base;
50 }

References $xml_base.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ read()

ilSCORMResources::read ( )
Returns
void

Reimplemented from ilSCORMObject.

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

57 : void
58 {
59 global $DIC;
60 $ilDB = $DIC->database();
61
62 parent::read();
63
64 $obj_set = $ilDB->queryF(
65 'SELECT xml_base FROM sc_resources WHERE obj_id = %s',
66 array('integer'),
67 array($this->getId())
68 );
69 $obj_rec = $ilDB->fetchAssoc($obj_set);
70 $this->setXmlBase($obj_rec['xml_base']);
71 }
setXmlBase(?string $a_xml_base)

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

+ Here is the call graph for this function:

◆ setXmlBase()

ilSCORMResources::setXmlBase ( ?string  $a_xml_base)

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

52 : void
53 {
54 $this->xml_base = $a_xml_base;
55 }

Referenced by read().

+ Here is the caller graph for this function:

◆ update()

ilSCORMResources::update ( )

Updates database record for SCORM object.

Reimplemented from ilSCORMObject.

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

87 : void
88 {
89 global $DIC;
90 $ilDB = $DIC->database();
91
92 parent::update();
93
94 $ilDB->manipulateF(
95 '
96 UPDATE sc_resources SET xml_base = %s WHERE obj_id = %s',
97 array('text', 'integer'),
98 array($this->getXmlBase() ,$this->getId())
99 );
100 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $xml_base

string ilSCORMResources::$xml_base = null

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

Referenced by getXmlBase().


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