ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
ilAICCUnit Class Reference
+ Inheritance diagram for ilAICCUnit:
+ Collaboration diagram for ilAICCUnit:

Public Member Functions

 ilAICCUnit ($a_id=0)
 Constructor. More...
 
 getAUType ()
 
 setAUType ($a_au_type)
 
 getCommand_line ()
 
 setCommand_line ($a_command_line)
 
 getMaxTimeAllowed ()
 
 setMaxTimeAllowed ($a_max_time_allowed)
 
 getTimeLimitAction ()
 
 setTimeLimitAction ($a_time_limit_action)
 
 getMaxScore ()
 
 setMaxScore ($a_max_score)
 
 getCoreVendor ()
 
 setCoreVendor ($a_core_vendor)
 
 getSystemVendor ()
 
 setSystemVendor ($a_system_vendor)
 
 getFilename ()
 
 setFilename ($a_file_name)
 
 getMasteryScore ()
 
 setMasteryScore ($a_mastery_score)
 
 getWebLaunch ()
 
 setWebLaunch ($a_web_launch)
 
 getAUPassword ()
 
 setAUPassword ($a_au_password)
 
 read ()
 
 create ()
 
 update ()
 
 delete ()
 
 getTrackingDataOfUser ($a_user_id=0)
 get tracking data of specified or current user More...
 
 insertTrackData ($a_lval, $a_rval, $a_obj_id)
 
- Public Member Functions inherited from ilAICCObject
 ilAICCObject ($a_id=0)
 Constructor. More...
 
 getId ()
 
 setId ($a_id)
 
 getType ()
 
 setType ($a_objType)
 
 getTitle ()
 
 setTitle ($a_title)
 
 getDescription ()
 
 setDescription ($a_description)
 
 getDeveloperId ()
 
 setDeveloperId ($a_developer_id)
 
 getSystemId ()
 
 setSystemId ($a_system_id)
 
 getALMId ()
 
 setALMId ($a_alm_id)
 
 prepForStore ($string)
 
 read ()
 
 create ()
 
 update ()
 
 delete ()
 
_getInstance ($a_id, $a_slm_id)
 get instance of specialized GUI class More...
 

Data Fields

 $au_type
 AICC Item. More...
 
 $command_line
 
 $max_time_allowed
 
 $time_limit_action
 
 $max_score
 
 $core_vendor
 
 $system_vendor
 
 $file_name
 
 $mastery_score
 
 $web_launch
 
 $au_password
 
- Data Fields inherited from ilAICCObject
 $id
 
 $title
 
 $objType
 
 $alm_id
 
 $description
 
 $developer_id
 
 $system_id
 

Detailed Description

Definition at line 7 of file class.ilAICCUnit.php.

Member Function Documentation

◆ create()

ilAICCUnit::create ( )

Definition at line 178 of file class.ilAICCUnit.php.

References $ilDB, getAUPassword(), getAUType(), getCommand_line(), getCoreVendor(), getFilename(), ilAICCObject\getId(), getMasteryScore(), getMaxScore(), getMaxTimeAllowed(), getSystemVendor(), getTimeLimitAction(), getWebLaunch(), and setMasteryScore().

179  {
180  global $ilDB;
181 
182  parent::create();
183 
184  if($this->getMasteryScore() == NULL) $this->setMasteryScore(0);
185 
186  $ilDB->manipulateF('
187  INSERT INTO aicc_units
188  ( obj_id,
189  c_type,
190  command_line,
191  max_time_allowed,
192  time_limit_action,
193  max_score,
194  core_vendor,
195  system_vendor,
196  file_name,
197  mastery_score,
198  web_launch,
199  au_password
200  )
201  VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)',
202  array('integer','text','text','time','text','float','text','text','text','integer','text','text'),
203  array( $this->getId(),
204  $this->getAUType(),
205  $this->getCommand_line(),
206  $this->getMaxTimeAllowed(),
207  $this->getTimeLimitAction(),
208  $this->getMaxScore(),
209  $this->getCoreVendor(),
210  $this->getSystemVendor(),
211  $this->getFilename(),
212  $this->getMasteryScore(),
213  $this->getWebLaunch(),
214  $this->getAUPassword())
215  );
216  }
global $ilDB
setMasteryScore($a_mastery_score)
+ Here is the call graph for this function:

◆ delete()

ilAICCUnit::delete ( )

Definition at line 256 of file class.ilAICCUnit.php.

References $ilDB, $ilLog, ilLPStatusWrapper\_refreshStatus(), ilAICCObject\getALMId(), and ilAICCObject\getId().

257  {
258  global $ilDB, $ilLog;
259 
260  parent::delete();
261 
262  $q_log = "DELETE FROM aicc_units WHERE obj_id =".$ilDB->quote($this->getId());
263  $ilLog->write("SAHS Delete(Unit): ".$q_log);
264  $ilDB->manipulateF(
265  'DELETE FROM aicc_units WHERE obj_id = %s',
266  array('integer'),
267  array($this->getId()));
268 
269  $ilDB->manipulateF('
270  DELETE FROM scorm_tracking
271  WHERE sco_id = %s
272  AND obj_id =%s',
273  array('integer','integer'),
274  array($this->getId(),$this->getALMId())
275  );
276 
277  // update learning progress status
278  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
280 
281  }
_refreshStatus($a_obj_id, $a_users=null)
Set dirty.
global $ilDB
+ Here is the call graph for this function:

◆ getAUPassword()

ilAICCUnit::getAUPassword ( )

Definition at line 141 of file class.ilAICCUnit.php.

References $au_password.

Referenced by create(), and update().

142  {
143  return $this->au_password;
144  }
+ Here is the caller graph for this function:

◆ getAUType()

ilAICCUnit::getAUType ( )

Definition at line 41 of file class.ilAICCUnit.php.

References $au_type.

Referenced by create(), and update().

42  {
43  return $this->au_type;
44  }
$au_type
AICC Item.
+ Here is the caller graph for this function:

◆ getCommand_line()

ilAICCUnit::getCommand_line ( )

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

References $command_line.

Referenced by create(), and update().

52  {
53  return $this->command_line;
54  }
+ Here is the caller graph for this function:

◆ getCoreVendor()

ilAICCUnit::getCoreVendor ( )

Definition at line 91 of file class.ilAICCUnit.php.

References $core_vendor.

Referenced by create(), and update().

92  {
93  return $this->core_vendor;
94  }
+ Here is the caller graph for this function:

◆ getFilename()

ilAICCUnit::getFilename ( )

Definition at line 111 of file class.ilAICCUnit.php.

References $file_name.

Referenced by create(), and update().

112  {
113  return $this->file_name;
114  }
+ Here is the caller graph for this function:

◆ getMasteryScore()

ilAICCUnit::getMasteryScore ( )

Definition at line 121 of file class.ilAICCUnit.php.

References $mastery_score.

Referenced by create(), and update().

122  {
123  return $this->mastery_score;
124  }
+ Here is the caller graph for this function:

◆ getMaxScore()

ilAICCUnit::getMaxScore ( )

Definition at line 81 of file class.ilAICCUnit.php.

References $max_score.

Referenced by create(), and update().

82  {
83  return $this->max_score;
84  }
+ Here is the caller graph for this function:

◆ getMaxTimeAllowed()

ilAICCUnit::getMaxTimeAllowed ( )

Definition at line 61 of file class.ilAICCUnit.php.

References $max_time_allowed.

Referenced by create(), and update().

62  {
64  }
+ Here is the caller graph for this function:

◆ getSystemVendor()

ilAICCUnit::getSystemVendor ( )

Definition at line 101 of file class.ilAICCUnit.php.

References $system_vendor.

Referenced by create(), and update().

102  {
103  return $this->system_vendor;
104  }
+ Here is the caller graph for this function:

◆ getTimeLimitAction()

ilAICCUnit::getTimeLimitAction ( )

Definition at line 71 of file class.ilAICCUnit.php.

References $time_limit_action.

Referenced by create(), and update().

72  {
74  }
+ Here is the caller graph for this function:

◆ getTrackingDataOfUser()

ilAICCUnit::getTrackingDataOfUser (   $a_user_id = 0)

get tracking data of specified or current user

Definition at line 288 of file class.ilAICCUnit.php.

References $ilDB, $ilUser, ilAICCObject\getALMId(), and ilAICCObject\getId().

289  {
290  global $ilDB, $ilUser;
291 
292  if ($a_user_id == 0)
293  {
294  $a_user_id = $ilUser->getId();
295  }
296 
297  $track_set = $ilDB->queryF('
298  SELECT lvalue, rvalue FROM scorm_tracking
299  WHERE sco_id = %s
300  AND user_id = %s
301  AND obj_id = %s',
302  array('integer','integer','integer'),
303  array($this->getId(), $a_user_id, $this->getALMId()));
304 
305  $trdata = array();
306  while ($track_rec = $ilDB->fetchAssoc($track_set))
307  {
308  $trdata[$track_rec["lvalue"]] = $track_rec["rvalue"];
309  }
310 
311 
312  return $trdata;
313  }
global $ilUser
Definition: imgupload.php:15
global $ilDB
+ Here is the call graph for this function:

◆ getWebLaunch()

ilAICCUnit::getWebLaunch ( )

Definition at line 131 of file class.ilAICCUnit.php.

References $web_launch.

Referenced by create(), and update().

132  {
133  return $this->web_launch;
134  }
+ Here is the caller graph for this function:

◆ ilAICCUnit()

ilAICCUnit::ilAICCUnit (   $a_id = 0)

Constructor.

Parameters
int$a_idObject ID public

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

References ilAICCObject\setType().

36  {
37  parent::ilAICCObject($a_id);
38  $this->setType("sau");
39  }
setType($a_objType)
+ Here is the call graph for this function:

◆ insertTrackData()

ilAICCUnit::insertTrackData (   $a_lval,
  $a_rval,
  $a_obj_id 
)

Definition at line 315 of file class.ilAICCUnit.php.

References ilObjSCORMTracking\_insertTrackData(), and ilAICCObject\getId().

316  {
317  require_once("./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
318  ilObjSCORMTracking::_insertTrackData($this->getId(), $a_lval, $a_rval, $a_obj_id);
319  }
_insertTrackData($a_sahs_id, $a_lval, $a_rval, $a_obj_id)
+ Here is the call graph for this function:

◆ read()

ilAICCUnit::read ( )

Definition at line 151 of file class.ilAICCUnit.php.

References $ilDB, ilAICCObject\getId(), setAUPassword(), setAUType(), setCommand_line(), setCoreVendor(), setFilename(), setMasteryScore(), setMaxScore(), setMaxTimeAllowed(), setSystemVendor(), setTimeLimitAction(), and setWebLaunch().

152  {
153  global $ilDB;
154 
155  parent::read();
156 
157  $obj_set = $ilDB->queryF(
158  'SELECT * FROM aicc_units WHERE obj_id = %s',
159  array('integer'),
160  array($this->getId())
161  );
162  while($obj_rec = $ilDB->fetchAssoc($obj_set))
163  {
164  $this->setAUType($obj_rec["c_type"]);
165  $this->setCommand_line($obj_rec["command_line"]);
166  $this->setMaxTimeAllowed($obj_rec["max_time_allowed"]);
167  $this->setTimeLimitAction($obj_rec["time_limit_action"]);
168  $this->setMaxScore($obj_rec["max_score"]);
169  $this->setCoreVendor($obj_rec["core_vendor"]);
170  $this->setSystemVendor($obj_rec["system_vendor"]);
171  $this->setFilename($obj_rec["file_name"]);
172  $this->setMasteryScore($obj_rec["mastery_score"]);
173  $this->setWebLaunch($obj_rec["web_launch"]);
174  $this->setAUPassword($obj_rec["au_password"]);
175  }
176  }
setCommand_line($a_command_line)
setMaxTimeAllowed($a_max_time_allowed)
setSystemVendor($a_system_vendor)
setAUType($a_au_type)
setAUPassword($a_au_password)
setFilename($a_file_name)
setMaxScore($a_max_score)
setTimeLimitAction($a_time_limit_action)
setWebLaunch($a_web_launch)
setCoreVendor($a_core_vendor)
global $ilDB
setMasteryScore($a_mastery_score)
+ Here is the call graph for this function:

◆ setAUPassword()

ilAICCUnit::setAUPassword (   $a_au_password)

Definition at line 146 of file class.ilAICCUnit.php.

Referenced by read().

147  {
148  $this->au_password = $a_au_password;
149  }
+ Here is the caller graph for this function:

◆ setAUType()

ilAICCUnit::setAUType (   $a_au_type)

Definition at line 46 of file class.ilAICCUnit.php.

Referenced by read().

47  {
48  $this->au_type = $a_au_type;
49  }
+ Here is the caller graph for this function:

◆ setCommand_line()

ilAICCUnit::setCommand_line (   $a_command_line)

Definition at line 56 of file class.ilAICCUnit.php.

Referenced by read().

57  {
58  $this->command_line = $a_command_line;
59  }
+ Here is the caller graph for this function:

◆ setCoreVendor()

ilAICCUnit::setCoreVendor (   $a_core_vendor)

Definition at line 96 of file class.ilAICCUnit.php.

Referenced by read().

97  {
98  $this->core_vendor = $a_core_vendor;
99  }
+ Here is the caller graph for this function:

◆ setFilename()

ilAICCUnit::setFilename (   $a_file_name)

Definition at line 116 of file class.ilAICCUnit.php.

Referenced by read().

117  {
118  $this->file_name = $a_file_name;
119  }
+ Here is the caller graph for this function:

◆ setMasteryScore()

ilAICCUnit::setMasteryScore (   $a_mastery_score)

Definition at line 126 of file class.ilAICCUnit.php.

Referenced by create(), read(), and update().

127  {
128  $this->mastery_score = $a_mastery_score;
129  }
+ Here is the caller graph for this function:

◆ setMaxScore()

ilAICCUnit::setMaxScore (   $a_max_score)

Definition at line 86 of file class.ilAICCUnit.php.

Referenced by read().

87  {
88  $this->max_score = $a_max_score;
89  }
+ Here is the caller graph for this function:

◆ setMaxTimeAllowed()

ilAICCUnit::setMaxTimeAllowed (   $a_max_time_allowed)

Definition at line 66 of file class.ilAICCUnit.php.

Referenced by read().

67  {
68  $this->max_time_allowed = $a_max_time_allowed;
69  }
+ Here is the caller graph for this function:

◆ setSystemVendor()

ilAICCUnit::setSystemVendor (   $a_system_vendor)

Definition at line 106 of file class.ilAICCUnit.php.

Referenced by read().

107  {
108  $this->system_vendor = $a_system_vendor;
109  }
+ Here is the caller graph for this function:

◆ setTimeLimitAction()

ilAICCUnit::setTimeLimitAction (   $a_time_limit_action)

Definition at line 76 of file class.ilAICCUnit.php.

Referenced by read().

77  {
78  $this->time_limit_action = $a_time_limit_action;
79  }
+ Here is the caller graph for this function:

◆ setWebLaunch()

ilAICCUnit::setWebLaunch (   $a_web_launch)

Definition at line 136 of file class.ilAICCUnit.php.

Referenced by read().

137  {
138  $this->web_launch = $a_web_launch;
139  }
+ Here is the caller graph for this function:

◆ update()

ilAICCUnit::update ( )

Definition at line 218 of file class.ilAICCUnit.php.

References $ilDB, getAUPassword(), getAUType(), getCommand_line(), getCoreVendor(), getFilename(), ilAICCObject\getId(), getMasteryScore(), getMaxScore(), getMaxTimeAllowed(), getSystemVendor(), getTimeLimitAction(), getWebLaunch(), and setMasteryScore().

219  {
220  global $ilDB;
221 
222  parent::update();
223 
224  if($this->getMasteryScore() == NULL) $this->setMasteryScore(0);
225 
226  $ilDB->manipulateF('
227  UPDATE aicc_units
228  SET c_type = %s,
229  command_line = %s,
230  max_time_allowed = %s,
231  time_limit_action = %s,
232  max_score = %s,
233  core_vendor = %s,
234  system_vendor = %s,
235  file_name = %s,
236  mastery_score = %s,
237  web_launch = %s,
238  au_password = %s
239  WHERE obj_id = %s',
240  array('text','text','time','text','float','text','text','text','integer','text','text','integer'),
241  array( $this->getAUType(),
242  $this->getCommand_line(),
243  $this->getMaxTimeAllowed(),
244  $this->getTimeLimitAction(),
245  $this->getMaxScore(),
246  $this->getCoreVendor(),
247  $this->getSystemVendor(),
248  $this->getFilename(),
249  $this->getMasteryScore(),
250  $this->getWebLaunch(),
251  $this->getAUPassword(),
252  $this->getId())
253  );
254  }
global $ilDB
setMasteryScore($a_mastery_score)
+ Here is the call graph for this function:

Field Documentation

◆ $au_password

ilAICCUnit::$au_password

Definition at line 27 of file class.ilAICCUnit.php.

Referenced by getAUPassword().

◆ $command_line

ilAICCUnit::$command_line

Definition at line 18 of file class.ilAICCUnit.php.

Referenced by getCommand_line().

◆ $core_vendor

ilAICCUnit::$core_vendor

Definition at line 22 of file class.ilAICCUnit.php.

Referenced by getCoreVendor().

◆ $file_name

ilAICCUnit::$file_name

Definition at line 24 of file class.ilAICCUnit.php.

Referenced by getFilename().

◆ $mastery_score

ilAICCUnit::$mastery_score

Definition at line 25 of file class.ilAICCUnit.php.

Referenced by getMasteryScore().

◆ $max_score

ilAICCUnit::$max_score

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

Referenced by getMaxScore().

◆ $max_time_allowed

ilAICCUnit::$max_time_allowed

Definition at line 19 of file class.ilAICCUnit.php.

Referenced by getMaxTimeAllowed().

◆ $system_vendor

ilAICCUnit::$system_vendor

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

Referenced by getSystemVendor().

◆ $time_limit_action

ilAICCUnit::$time_limit_action

Definition at line 20 of file class.ilAICCUnit.php.

Referenced by getTimeLimitAction().

◆ $web_launch

ilAICCUnit::$web_launch

Definition at line 26 of file class.ilAICCUnit.php.

Referenced by getWebLaunch().


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