ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 setHideObjectivePage ($a_val)
 Set hide objective page.
 getHideObjectivePage ()
 Get hide objective page.
 create ($a_upload=false, $a_template=false)
 Create sco.
 read ()
 Read data from database.
 update ()
 Update.
 delete ()
 Delete.
 copy ($a_target_slm)
 Copy sco.
 getMainObjectiveText ()
 Get main objective.
- Public Member Functions inherited from ilSCORM2004Asset
 delete ($a_delete_meta_data=true)
 Delete a SCO.
 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.
 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
 exportXMLMetaData (&$a_xml_writer)
 getExportFiles ()
 getGlossaryTermIds ()
 Get glossary term ids in sco.
- Public Member Functions inherited from ilSCORM2004Node
 ilSCORM2004Node ($a_slm_object, $a_id=0)
 setTitle ($a_title)
 Set title.
 getTitle ()
 Get title.
 setDescription ($a_description)
 Set description.
 getDescription ()
 Get description.
 setType ($a_type)
 Set type.
 getType ()
 Get type.
 setSLMId ($a_slm_id)
 Set ID of parent Scorm Learning Module Object.
 getSLMId ()
 Get ID of parent Scorm Learning Module Object.
 setSLMObject ($a_slm_obj)
 Set Scorm Learning Module Object.
 getSLMObject ()
 Get scorm learning module object.
 getContentObject ()
 Get Scorm Learning Module Object.
 setId ($a_id)
 Set Node ID.
 getId ()
 Get Node ID.
 getImportId ()
 Set Import ID.
 setImportId ($a_id)
 Get Import ID.
 MDUpdateListener ($a_element)
 Meta data update listener.
 createMetaData ()
 create meta data entry
 updateMetaData ()
 update meta data entry
 deleteMetaData ()
 delete meta data entry
 setDataRecord ($a_record)
 this method should only be called by class ilSCORM2004NodeFactory
 create ($a_upload=false)
 Create Node.
 _getIdForImportId ($a_import_id)
 Get Node ID for import ID (static)
 _exists ($a_id)
 Checks wether a node exists.
 _deleteAllSLMNodes ($a_slm_object)
 Delete all nodes of Scorm Learning Module.
 _lookupSLMID ($a_id)
 Lookup Scorm Learning Module ID for node id.
 clipboardCut ($a_slm_obj_id, $a_ids)
 Cut and copy a set of chapters/pages into the clipboard.
 insertChapterClip ($a_slm_obj, $a_as_sub=false)
 Insert Chapter from clipboard.
 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.
static renderMetaPage ($a_tpl, $a_sco, $a_asset_type="", $mode="")
 Render meta page (description/objectives at beginning)
static convertLists ($a_text)
 Convert * and # to lists.
- Data Fields inherited from ilSCORM2004Asset
 $q_media = null

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

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.

References ilSCORM2004Node\setType().

{
parent::__construct($a_slm_object, $a_id);
$this->setType("sco");
}

+ Here is the call graph for this function:

Member Function Documentation

ilSCORM2004Sco::copy (   $a_target_slm)

Copy sco.

Reimplemented from ilSCORM2004Asset.

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

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

{
$sco = new ilSCORM2004Sco($a_target_slm);
$sco->setTitle($this->getTitle());
if ($this->getSLMId() != $a_target_slm->getId())
{
$sco->setImportId("il__sco_".$this->getId());
}
$sco->setSLMId($a_target_slm->getId());
$sco->setType($this->getType());
$sco->setDescription($this->getDescription());
$sco->create(true);
$a_copied_nodes[$this->getId()] = $sco->getId();
// copy meta data
include_once("Services/MetaData/classes/class.ilMD.php");
$md = new ilMD($this->getSLMId(), $this->getId(), $this->getType());
$new_md =& $md->cloneMD($a_target_slm->getId(), $sco->getId(), $this->getType());
return $sco;
}

+ Here is the call graph for this function:

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

Create sco.

Reimplemented from ilSCORM2004Asset.

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

References ilSCORM2004Node\getId().

{
global $ilDB;
parent::create($a_upload, $a_template);
if (!$a_template)
{
$obj = new ilSCORM2004Objective($this->getId());
// $obj->setObjectiveID("Objective SCO ".$this->getId());
$obj->setId("local_obj_".$this->getID()."_0");
$obj->update();
}
$ilDB->manipulate("INSERT INTO sahs_sc13_sco ".
"(id, hide_obj_page) VALUES (".
$ilDB->quote($this->getId(), "integer").",".
$ilDB->quote($this->getHideObjectivePage(), "integer").
")");
}

+ Here is the call graph for this function:

ilSCORM2004Sco::delete ( )

Delete.

Reimplemented from ilSCORM2004Node.

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

{
global $ilDB;
$ilDB->manipulate("DELETE FROM sahs_sc13_sco WHERE "
. " id = " . $ilDB->quote($this->getId(), "integer")
);
}
ilSCORM2004Sco::getHideObjectivePage ( )

Get hide objective page.

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

References $hide_obj_page.

{
}
ilSCORM2004Sco::getMainObjectiveText ( )

Get main objective.

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

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

References ilSCORM2004Node\getObjectives().

{
$objectives = $this->getObjectives();
foreach ($objectives as $ob)
{
// map info
$mappings = $ob->getMappings();
$mapinfo = null;
foreach($mappings as $map)
{
$mapinfo .= $map->getTargetObjectiveID();
}
if ($mapinfo == null)
{
$mapinfo = "local";
}
else
{
$mapinfo = "global to ".$mapinfo;
}
if ($mapinfo == "local")
{
return $ob->getObjectiveID();
}
}
}

+ Here is the call graph for this function:

ilSCORM2004Sco::read ( )

Read data from database.

Reimplemented from ilSCORM2004Node.

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

References setHideObjectivePage().

{
global $ilDB;
$set = $ilDB->query("SELECT * FROM sahs_sc13_sco WHERE ".
" id = ".$ilDB->quote($this->getId(), "integer")
);
$rec = $ilDB->fetchAssoc($set);
$this->setHideObjectivePage($rec["hide_obj_page"]);
}

+ Here is the call graph for this function:

ilSCORM2004Sco::setHideObjectivePage (   $a_val)

Set hide objective page.

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

Referenced by read().

{
$this->hide_obj_page = $a_val;
}

+ Here is the caller graph for this function:

ilSCORM2004Sco::update ( )

Update.

Reimplemented from ilSCORM2004Node.

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

{
global $ilDB;
$ilDB->manipulate("UPDATE sahs_sc13_sco SET ".
" hide_obj_page = ".$ilDB->quote($this->getHideObjectivePage(), "integer").
" WHERE id = ".$ilDB->quote($this->getId(), "integer")
);
}

Field Documentation

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: