ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSCORM2004Sco Class Reference

Class ilSCORM2004Sco. More...

+ Inheritance diagram for ilSCORM2004Sco:
+ Collaboration diagram for ilSCORM2004Sco:

Public Member Functions

 __construct ($a_slm_object, $a_id=0)
 Constructor. More...
 
 setHideObjectivePage ($a_val)
 Set hide objective page. More...
 
 getHideObjectivePage ()
 Get hide objective page. More...
 
 create ($a_upload=false, $a_template=false)
 Create sco. More...
 
 read ()
 Read data from database. More...
 
 update ()
 Update. More...
 
 delete ()
 Delete. More...
 
 copy ($a_target_slm)
 Copy sco. More...
 
 getMainObjectiveText ()
 Get main objective. More...
 
- Public Member Functions inherited from ilSCORM2004Asset
 __construct ($a_slm_object, $a_id=0)
 Constructor. More...
 
 delete ($a_delete_meta_data=true)
 Delete a SCO. More...
 
 create ($a_upload=false, $a_template=false)
 Create asset. More...
 
 copy ($a_target_slm)
 Copy sco. More...
 
 exportScorm ($a_inst, $a_target_dir, $ver, &$expLog)
 
 exportHTML ($a_inst, $a_target_dir, &$expLog, $a_asset_type="sco", $a_one_file="")
 
 exportHTML4PDF ($a_inst, $a_target_dir, &$expLog)
 
 exportPDF ($a_inst, $a_target_dir, &$expLog)
 
 exportPDFPrepareXmlNFiles ($a_inst, $a_target_dir, &$expLog, &$a_xml_writer)
 
 exportHTMLPageObjects ($a_inst, $a_target_dir, &$expLog, $mode, $a_asset_type="sco", $a_one_file="", $a_sco_tpl=null)
 Export HTML pages of SCO. More...
 
 exportXMLPageObjects ($a_target_dir, &$a_xml_writer, $a_inst, &$expLog)
 
 exportXMLMediaObjects (&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
 
 exportFileItems ($a_target_dir, &$expLog)
 export files of file itmes More...
 
 exportXMLMetaData (&$a_xml_writer)
 
 getExportFiles ()
 
 getGlossaryTermIds ()
 Get glossary term ids in sco. More...
 
- Public Member Functions inherited from ilSCORM2004Node
 ilSCORM2004Node ($a_slm_object, $a_id=0)
 
 setTitle ($a_title)
 Set title. More...
 
 getTitle ()
 Get title. More...
 
 setDescription ($a_description)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setType ($a_type)
 Set type. More...
 
 getType ()
 Get type. More...
 
 setSLMId ($a_slm_id)
 Set ID of parent Scorm Learning Module Object. More...
 
 getSLMId ()
 Get ID of parent Scorm Learning Module Object. More...
 
 setSLMObject ($a_slm_obj)
 Set Scorm Learning Module Object. More...
 
 getSLMObject ()
 Get scorm learning module object. More...
 
 getContentObject ()
 Get Scorm Learning Module Object. More...
 
 setId ($a_id)
 Set Node ID. More...
 
 getId ()
 Get Node ID. More...
 
 getImportId ()
 Set Import ID. More...
 
 setImportId ($a_id)
 Get Import ID. More...
 
 read ()
 Read Data of Node. More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 setDataRecord ($a_record)
 this method should only be called by class ilSCORM2004NodeFactory More...
 
 create ($a_upload=false)
 Create Node. More...
 
 update ()
 Update Node. More...
 
 delete ()
 Delete Node. More...
 
 _getIdForImportId ($a_import_id)
 Get Node ID for import ID (static) More...
 
 _exists ($a_id)
 Checks wether a node exists. More...
 
 _deleteAllSLMNodes ($a_slm_object)
 Delete all nodes of Scorm Learning Module. More...
 
 _lookupSLMID ($a_id)
 Lookup Scorm Learning Module ID for node id. More...
 
 clipboardCut ($a_slm_obj_id, $a_ids)
 Cut and copy a set of chapters/pages into the clipboard. More...
 
 insertChapterClip ($a_slm_obj, $a_as_sub=false)
 Insert Chapter from clipboard. More...
 
 getObjectives ()
 
 deleteSeqInfo ()
 
 parentHasSeqTemplate ()
 
 exportAsScorm12 ()
 
 exportAsScorm13 ()
 

Protected Attributes

 $hide_obj_page = false
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSCORM2004Asset
static renderNavigation ($a_tpl, $a_spacer_img="", $a_lang="")
 Render navigation. More...
 
static renderMetaPage ($a_tpl, $a_sco, $a_asset_type="", $mode="")
 Render meta page (description/objectives at beginning) More...
 
static convertLists ($a_text)
 Convert * and # to lists. More...
 
- Static Public Member Functions inherited from ilSCORM2004Node
static _lookupTitle ($a_obj_id)
 Lookup Title. More...
 
static _lookupType ($a_obj_id)
 Lookup Type. More...
 
static _writeTitle ($a_obj_id, $a_title)
 Write Title. More...
 
static _writeImportId ($a_id, $a_import_id)
 Write import ID. More...
 
static putInTree ($a_obj, $a_parent_id="", $a_target_node_id="")
 put this object into content object tree More...
 
static getTree ($a_slm_obj_id)
 Get scorm module editing tree. More...
 
static clipboardCopy ($a_slm_obj_id, $a_ids)
 Copy a set of chapters/pages/scos into the clipboard. More...
 
static uniqueTypesCheck ($a_items)
 Check for unique types (all pages or all chapters or all scos) More...
 
static insertPageClip ($a_slm_obj)
 Insert pages from clipboard. More...
 
static insertAssetClip ($a_slm_obj, $a_type="ass")
 Insert assets from clipboard. More...
 
static insertScoClip ($a_slm_obj)
 Insert scos from clipboard. More...
 
static pasteTree ($a_target_slm, $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_from_clipboard=true, $a_source_parent_type="")
 Paste item (tree) from clipboard or other learning module to target scorm learning module. More...
 
- Data Fields inherited from ilSCORM2004Asset
 $q_media = null
 
- Data Fields inherited from ilSCORM2004Node
 $slm_id
 
 $type
 
 $id
 
 $slm_object
 

Detailed Description

Class ilSCORM2004Sco.

SCO class for SCORM 2004 Editing

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

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

Constructor & Destructor Documentation

◆ __construct()

ilSCORM2004Sco::__construct (   $a_slm_object,
  $a_id = 0 
)

Constructor.

Parameters
objectSCORM LM object

Reimplemented from ilSCORM2004Asset.

Definition at line 26 of file class.ilSCORM2004Sco.php.

27 {
28 parent::__construct($a_slm_object, $a_id);
29 $this->setType("sco");
30 }
setType($a_type)
Set type.

References ilSCORM2004Node\setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ copy()

ilSCORM2004Sco::copy (   $a_target_slm)

Copy sco.

Reimplemented from ilSCORM2004Asset.

Definition at line 115 of file class.ilSCORM2004Sco.php.

116 {
117 $sco = new ilSCORM2004Sco($a_target_slm);
118 $sco->setTitle($this->getTitle());
119 $sco->setHideObjectivePage($this->getHideObjectivePage());
120 if ($this->getSLMId() != $a_target_slm->getId())
121 {
122 $sco->setImportId("il__sco_".$this->getId());
123 }
124 $sco->setSLMId($a_target_slm->getId());
125 $sco->setType($this->getType());
126 $sco->setDescription($this->getDescription());
127 $sco->create(true);
128 $a_copied_nodes[$this->getId()] = $sco->getId();
129
130 // copy meta data
131 include_once("Services/MetaData/classes/class.ilMD.php");
132 $md = new ilMD($this->getSLMId(), $this->getId(), $this->getType());
133 $new_md =& $md->cloneMD($a_target_slm->getId(), $sco->getId(), $this->getType());
134
135 return $sco;
136 }
getSLMId()
Get ID of parent Scorm Learning Module Object.
getDescription()
Get description.
Class ilSCORM2004Sco.
getHideObjectivePage()
Get hide objective page.

References ilSCORM2004Node\getDescription(), getHideObjectivePage(), ilSCORM2004Node\getId(), ilSCORM2004Node\getSLMId(), ilSCORM2004Node\getTitle(), and ilSCORM2004Node\getType().

+ Here is the call graph for this function:

◆ create()

ilSCORM2004Sco::create (   $a_upload = false,
  $a_template = false 
)

Create sco.

Reimplemented from ilSCORM2004Asset.

Definition at line 51 of file class.ilSCORM2004Sco.php.

52 {
53 global $ilDB;
54
55 parent::create($a_upload, $a_template);
56 if (!$a_template)
57 {
58 $obj = new ilSCORM2004Objective($this->getId());
59// $obj->setObjectiveID("Objective SCO ".$this->getId());
60 $obj->setId("local_obj_".$this->getID()."_0");
61 $obj->update();
62 }
63 $ilDB->manipulate("INSERT INTO sahs_sc13_sco ".
64 "(id, hide_obj_page) VALUES (".
65 $ilDB->quote($this->getId(), "integer").",".
66 $ilDB->quote($this->getHideObjectivePage(), "integer").
67 ")");
68 }
Class ilSCORM2004Objective.
global $ilDB

References $ilDB, and ilSCORM2004Node\getId().

+ Here is the call graph for this function:

◆ delete()

ilSCORM2004Sco::delete ( )

Delete.

Reimplemented from ilSCORM2004Node.

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

103 {
104 global $ilDB;
105
106 parent::delete();
107 $ilDB->manipulate("DELETE FROM sahs_sc13_sco WHERE "
108 . " id = " . $ilDB->quote($this->getId(), "integer")
109 );
110 }

References $ilDB.

◆ getHideObjectivePage()

ilSCORM2004Sco::getHideObjectivePage ( )

Get hide objective page.

Definition at line 43 of file class.ilSCORM2004Sco.php.

References $hide_obj_page.

Referenced by copy().

+ Here is the caller graph for this function:

◆ getMainObjectiveText()

ilSCORM2004Sco::getMainObjectiveText ( )

Get main objective.

Todo:
: This should be saved in a better way in the future

Definition at line 143 of file class.ilSCORM2004Sco.php.

144 {
145 $objectives = $this->getObjectives();
146
147 foreach ($objectives as $ob)
148 {
149 // map info
150 $mappings = $ob->getMappings();
151 $mapinfo = null;
152 foreach($mappings as $map)
153 {
154 $mapinfo .= $map->getTargetObjectiveID();
155 }
156
157 if ($mapinfo == null)
158 {
159 $mapinfo = "local";
160 }
161 else
162 {
163 $mapinfo = "global to ".$mapinfo;
164 }
165
166 if ($mapinfo == "local")
167 {
168 return $ob->getObjectiveID();
169 }
170 }
171 }

References ilSCORM2004Node\getObjectives().

+ Here is the call graph for this function:

◆ read()

ilSCORM2004Sco::read ( )

Read data from database.

Reimplemented from ilSCORM2004Node.

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

74 {
75 global $ilDB;
76
77 parent::read();
78 $set = $ilDB->query("SELECT * FROM sahs_sc13_sco WHERE ".
79 " id = ".$ilDB->quote($this->getId(), "integer")
80 );
81 $rec = $ilDB->fetchAssoc($set);
82 $this->setHideObjectivePage($rec["hide_obj_page"]);
83 }
setHideObjectivePage($a_val)
Set hide objective page.

References $ilDB, and setHideObjectivePage().

+ Here is the call graph for this function:

◆ setHideObjectivePage()

ilSCORM2004Sco::setHideObjectivePage (   $a_val)

Set hide objective page.

Definition at line 35 of file class.ilSCORM2004Sco.php.

36 {
37 $this->hide_obj_page = $a_val;
38 }

Referenced by read().

+ Here is the caller graph for this function:

◆ update()

ilSCORM2004Sco::update ( )

Update.

Reimplemented from ilSCORM2004Node.

Definition at line 88 of file class.ilSCORM2004Sco.php.

89 {
90 global $ilDB;
91
92 parent::update();
93 $ilDB->manipulate("UPDATE sahs_sc13_sco SET ".
94 " hide_obj_page = ".$ilDB->quote($this->getHideObjectivePage(), "integer").
95 " WHERE id = ".$ilDB->quote($this->getId(), "integer")
96 );
97 }

References $ilDB.

Field Documentation

◆ $hide_obj_page

ilSCORM2004Sco::$hide_obj_page = false
protected

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

Referenced by getHideObjectivePage().


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