ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSCORM2004Rule.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2008 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 
36 {
37 
38 
39 
40  //db fields
41  private $id = null;
42  private $seqNodeId = null;
43  private $type = null;
44  private $action = true;
49  function ilSCORM2004Rule()
50  {
52  $this->setNodeName("rule");
53  }
54 
55 
56  // **********************
57  // GETTER METHODS
58  // **********************
59 
60  public function getSeqNodeId()
61  {
62  return $this->seqNodeId;
63  }
64 
65  public function getId()
66  {
67  return $this->id;
68  }
69 
70  public function getType()
71  {
72  return $this->type;
73  }
74 
75  public function getAction()
76  {
77  return $this->action;
78  }
79 
80  // **********************
81  // Setter METHODS
82  // **********************
83 
84  public function setSeqNodeId($a_seqnodeid)
85  {
86  $this->seqNodeId = $a_seqnodeid;
87  }
88 
89  public function setId($a_id)
90  {
91  $this->id = $a_id;
92  }
93 
94  public function setType($a_type)
95  {
96  $this->type = $a_type;
97  }
98 
99  public function setAction($a_action)
100  {
101  $this->action = $a_action;
102  }
103 
104 
105  // **********************
106  // Standard DB Operations for Object
107  // **********************
108 
109  public function insert($a_insert_node = false)
110  {
111  if ($a_insert_node==true) {$this->setSeqNodeId(parent::insert());}
112  $sql = "INSERT INTO sahs_sc13_seq_rule (seqnodeid,type,action)".
113  " values(".
114  $this->db->quote($this->seqNodeId, "integer").",".
115  $this->db->quote($this->type, "text").",".
116  $this->db->quote($this->action, "text").");";
117  $result = $this->db->manipulate($sql);
118  return true;
119  }
120 
121 
122 }
123 ?>