ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSCORM2004Condition.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  //db fields
40  private $id = null;
41  private $seqNodeId = null;
42  private $referencedObjective = null;
43  private $condition = null;
44  private $measureThreshold = 0.0;
45  private $operator = null;
46 
52  {
54  $this->setNodeName("condition");
55  }
56 
57 
58  // **********************
59  // GETTER METHODS
60  // **********************
61 
62  public function getSeqNodeId()
63  {
64  return $this->seqNodeId;
65  }
66 
67  public function getId()
68  {
69  return $this->id;
70  }
71 
72 
73  public function getReferencedObjective()
74  {
76  }
77 
78  public function getCondition()
79  {
80  return $this->condition;
81  }
82 
83  public function getMeasureThreshold()
84  {
86  }
87 
88  public function getOperator()
89  {
90  return $this->operator;
91  }
92 
93  // **********************
94  // Setter METHODS
95  // **********************
96 
97  public function setSeqNodeId($a_seqnodeid)
98  {
99  $this->seqNodeId = $a_seqnodeid;
100  }
101 
102  public function setId($a_id)
103  {
104  $this->id = $a_id;
105  }
106 
107  public function setReferencedObjective($a_objective)
108  {
109  $this->referencedObjective = $a_objective;
110  }
111 
112  public function setCondition($a_condition)
113  {
114  $this->condition = $a_condition;
115  }
116 
117  public function setMeasureThreshold($a_measure)
118  {
119  $this->measureThreshold = $a_measure;
120  }
121 
122  public function setOperator($a_operator)
123  {
124  $this->operator = $a_operator;
125  }
126 
127  // **********************
128  // Standard DB Operations for Object
129  // **********************
130 
131  public function insert($a_insert_node = false)
132  {
133  if ($a_insert_node==true) {$this->setSeqNodeId(parent::insert());}
134  $sql = "INSERT INTO sahs_sc13_seq_cond (seqnodeid,referencedobjective,cond,measurethreshold,operator)".
135  " values(".
136  $this->db->quote($this->seqNodeId, "integer").",".
137  $this->db->quote($this->referencedObjective, "text").",".
138  $this->db->quote($this->condition, "text").",".
139  $this->db->quote($this->measureThreshold, "text").",".
140  $this->db->quote($this->operator, "text").");";
141  $result = $this->db->manipulate($sql);
142  return true;
143  }
144 
145 
146 }
147 ?>