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

Class ilSCORM2004NodeFactory. More...

+ Collaboration diagram for ilSCORM2004NodeFactory:

Static Public Member Functions

static getInstance ($a_slm_object, $a_id=0, $a_halt=true)
 

Detailed Description

Class ilSCORM2004NodeFactory.

Factory for SCORM Editor Tree nodes (Chapters/SCOs/Pages)

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

Definition at line 21 of file class.ilSCORM2004NodeFactory.php.

Member Function Documentation

◆ getInstance()

static ilSCORM2004NodeFactory::getInstance (   $a_slm_object,
  $a_id = 0,
  $a_halt = true 
)
static

Definition at line 23 of file class.ilSCORM2004NodeFactory.php.

24 {
25 global $ilias, $ilDB;
26
27 $query = "SELECT * FROM sahs_sc13_tree_node WHERE obj_id = ".
28 $ilDB->quote($a_id, "integer");
29 $obj_set = $ilDB->query($query);
30 $obj_rec = $ilDB->fetchAssoc($obj_set);
31 $obj = null;
32 switch($obj_rec["type"])
33 {
34 case "chap":
35 $obj =& new ilSCORM2004Chapter($a_slm_object);
36 $obj->setId($obj_rec["obj_id"]);
37 $obj->setDataRecord($obj_rec);
38 $obj->read();
39 break;
40
41 case "seqc":
42 $obj =& new ilSCORM2004SeqChapter($a_slm_object);
43 $obj->setId($obj_rec["obj_id"]);
44 $obj->setDataRecord($obj_rec);
45 $obj->read();
46 break;
47
48 case "sco":
49 $obj =& new ilSCORM2004Sco($a_slm_object);
50 $obj->setId($obj_rec["obj_id"]);
51 $obj->setDataRecord($obj_rec);
52 $obj->read();
53 break;
54
55 case "ass":
56 $obj =& new ilSCORM2004Asset($a_slm_object);
57 $obj->setId($obj_rec["obj_id"]);
58 $obj->setDataRecord($obj_rec);
59 $obj->read();
60 break;
61
62 case "page":
63 $obj =& new ilSCORM2004PageNode($a_slm_object, 0, $a_halt);
64 $obj->setId($obj_rec["obj_id"]);
65 $obj->setDataRecord($obj_rec);
66 $obj->read();
67 break;
68 }
69 return $obj;
70 }
Class ilSCORM2004Asset.
Class ilSCORM2004Chapter.
Class ilSCORM2004PageNode.
Class ilSCORM2004Sco.
Class ilSCORM2004Chapter.
global $ilDB

References $ilDB, and $query.

Referenced by ilSCORM2004Node\_deleteAllSLMNodes(), ilObjSCORM2004LearningModuleGUI\confirmedDelete(), ilSCORM2004Asset\delete_rec(), ilSCORM2004Chapter\delete_rec(), ilObjSCORM2004LearningModuleGUI\deleteNodes(), ilObjSCORM2004LearningModule\executeDragDrop(), ilObjectivesAlignmentTableGUI\fillRow(), ilSCORM2004NodeGUI\getNodeObject(), and ilObjSCORM2004LearningModuleGUI\saveAllTitles().

+ Here is the caller graph for this function:

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