ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilSCORM2004Rule.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
16 {
17 
18  //db fields
19  private $id = null;
20  private $seqNodeId = null;
21  private $type = null;
22  private $action = true;
27  public function __construct()
28  {
29  parent::__construct();
30  $this->setNodeName("rule");
31  }
32 
33 
34  // **********************
35  // GETTER METHODS
36  // **********************
37 
38  public function getSeqNodeId()
39  {
40  return $this->seqNodeId;
41  }
42 
43  public function getId()
44  {
45  return $this->id;
46  }
47 
48  public function getType()
49  {
50  return $this->type;
51  }
52 
53  public function getAction()
54  {
55  return $this->action;
56  }
57 
58  // **********************
59  // Setter METHODS
60  // **********************
61 
62  public function setSeqNodeId($a_seqnodeid)
63  {
64  $this->seqNodeId = $a_seqnodeid;
65  }
66 
67  public function setId($a_id)
68  {
69  $this->id = $a_id;
70  }
71 
72  public function setType($a_type)
73  {
74  $this->type = $a_type;
75  }
76 
77  public function setAction($a_action)
78  {
79  $this->action = $a_action;
80  }
81 
82 
83  // **********************
84  // Standard DB Operations for Object
85  // **********************
86 
87  public function insert($a_insert_node = false)
88  {
89  if ($a_insert_node == true) {
90  $this->setSeqNodeId(parent::insert());
91  }
92  $sql = "INSERT INTO sahs_sc13_seq_rule (seqnodeid,type,action)" .
93  " values(" .
94  $this->db->quote($this->seqNodeId, "integer") . "," .
95  $this->db->quote($this->type, "text") . "," .
96  $this->db->quote($this->action, "text") . ");";
97  $result = $this->db->manipulate($sql);
98  return true;
99  }
100 }
$result
setSeqNodeId($a_seqnodeid)
Class ilSCORM2004Rule.
insert($a_insert_node=false)
$a_type
Definition: workflow.php:92
__construct()
Constructor public.
Class ilSCORM2004Condition.