ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilCourseObjective Class Reference

class ilcourseobjective More...

+ Inheritance diagram for ilCourseObjective:
+ Collaboration diagram for ilCourseObjective:

Public Member Functions

 ilCourseObjective (&$course_obj, $a_objective_id=0)
 
 ilClone ($a_target_id, $a_copy_id)
 clone objectives More...
 
 setActive ($a_stat)
 
 isActive ()
 
 setPasses ($a_passes)
 
 getPasses ()
 
 arePassesLimited ()
 
 setTitle ($a_title)
 
 getTitle ()
 
 setDescription ($a_description)
 
 getDescription ()
 
 setObjectiveId ($a_objective_id)
 
 getObjectiveId ()
 
 add ()
 
 update ()
 
 writePosition ($a_position)
 write position More...
 
 validate ()
 validate More...
 
 delete ()
 
 moveUp ()
 
 moveDown ()
 
 __setPosition ($a_position)
 
 __getPosition ()
 
 __setCreated ($a_created)
 
 __getCreated ()
 
 __read ()
 
 __getOrderColumn ()
 
 __updateTop ()
 
 __getLastPosition ()
 
 _deleteAll ($course_id)
 

Static Public Member Functions

static _lookupContainerIdByObjectiveId ($a_objective_id)
 Get container of object. More...
 
static _getCountObjectives ($a_obj_id, $a_activated_only=false)
 get count objectives More...
 
static lookupMaxPasses ($a_objective_id)
 
static lookupObjectiveTitle ($a_objective_id)
 
static _getObjectiveIds ($course_id, $a_activated_only=false)
 

Data Fields

 $db = null
 
 $course_obj = null
 
 $objective_id = null
 

Protected Attributes

 $active = true
 
 $passes = 0
 

Detailed Description

class ilcourseobjective

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 13 of file class.ilCourseObjective.php.

Member Function Documentation

◆ __getCreated()

ilCourseObjective::__getCreated ( )

Definition at line 387 of file class.ilCourseObjective.php.

388 {
389 return $this->created;
390 }

◆ __getLastPosition()

ilCourseObjective::__getLastPosition ( )

Definition at line 451 of file class.ilCourseObjective.php.

452 {
453 global $ilDB;
454
455 $query = "SELECT MAX(position) pos FROM crs_objectives ".
456 "WHERE crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ";
457
458 $res = $this->db->query($query);
459 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
460 {
461 return $row->pos;
462 }
463 return 0;
464 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by add(), and moveDown().

+ Here is the caller graph for this function:

◆ __getOrderColumn()

ilCourseObjective::__getOrderColumn ( )

Definition at line 422 of file class.ilCourseObjective.php.

423 {
424 switch($this->course_obj->getOrderType())
425 {
427 return 'ORDER BY position';
428
430 return 'ORDER BY title';
431
433 return 'ORDER BY create';
434 }
435 return false;
436 }

References ilContainer\SORT_ACTIVATION, ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

◆ __getPosition()

ilCourseObjective::__getPosition ( )

Definition at line 379 of file class.ilCourseObjective.php.

380 {
381 return $this->position;
382 }

Referenced by __updateTop(), moveDown(), and moveUp().

+ Here is the caller graph for this function:

◆ __read()

ilCourseObjective::__read ( )

Definition at line 393 of file class.ilCourseObjective.php.

394 {
395 global $ilDB;
396
397 if($this->getObjectiveId())
398 {
399 $query = "SELECT * FROM crs_objectives ".
400 "WHERE crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ".
401 "AND objective_id = ".$ilDB->quote($this->getObjectiveId() ,'integer')." ";
402
403
404 $res = $this->db->query($query);
405 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
406 {
407 // begin-patch lok
408 $this->setActive($row->active);
409 $this->setPasses($row->passes);
410 // end-patch lok
411 $this->setObjectiveId($row->objective_id);
412 $this->setTitle($row->title);
413 $this->setDescription($row->description);
414 $this->__setPosition($row->position);
415 $this->__setCreated($row->created);
416 }
417 return true;
418 }
419 return false;
420 }
setDescription($a_description)
setObjectiveId($a_objective_id)

References $ilDB, $query, $res, $row, __setCreated(), __setPosition(), DB_FETCHMODE_OBJECT, getObjectiveId(), setActive(), setDescription(), setObjectiveId(), setPasses(), and setTitle().

Referenced by ilCourseObjective(), moveDown(), and moveUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __setCreated()

ilCourseObjective::__setCreated (   $a_created)

Definition at line 383 of file class.ilCourseObjective.php.

384 {
385 $this->created = $a_created;
386 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ __setPosition()

ilCourseObjective::__setPosition (   $a_position)

Definition at line 375 of file class.ilCourseObjective.php.

376 {
377 $this->position = $a_position;
378 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ __updateTop()

ilCourseObjective::__updateTop ( )

Definition at line 438 of file class.ilCourseObjective.php.

439 {
440 global $ilDB;
441
442 $query = "UPDATE crs_objectives ".
443 "SET position = position - 1 ".
444 "WHERE position > ".$ilDB->quote($this->__getPosition() ,'integer')." ".
445 "AND crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ";
446 $res = $ilDB->manipulate($query);
447
448 return true;
449 }

References $ilDB, $query, $res, and __getPosition().

+ Here is the call graph for this function:

◆ _deleteAll()

ilCourseObjective::_deleteAll (   $course_id)

Definition at line 496 of file class.ilCourseObjective.php.

497 {
498 global $ilDB;
499
500 // begin-patch lok
501 $ids = ilCourseObjective::_getObjectiveIds($course_id,false);
502 // end-patch lok
503 if(!count($ids))
504 {
505 return true;
506 }
507
508 $in = $ilDB->in('objective_id',$ids,false,'integer');
509
510
511 $query = "DELETE FROM crs_objective_lm WHERE ".$in;
512 $res = $ilDB->manipulate($query);
513
514 $query = "DELETE FROM crs_objective_tst WHERE ".$in;
515 $res = $ilDB->manipulate($query);
516
517 $query = "DELETE FROM crs_objective_qst WHERE ".$in;
518 $res = $ilDB->manipulate($query);
519
520 $query = "DELETE FROM crs_objectives WHERE crs_id = ".$ilDB->quote($course_id ,'integer');
521 $res = $ilDB->manipulate($query);
522
523 // refresh learning progress status after deleting objectives
524 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
526
527 return true;
528 }
static _getObjectiveIds($course_id, $a_activated_only=false)
_refreshStatus($a_obj_id, $a_users=null)
Set dirty.

References $ilDB, $in, $query, $res, _getObjectiveIds(), and ilLPStatusWrapper\_refreshStatus().

Referenced by ilObjCourse\delete().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getCountObjectives()

static ilCourseObjective::_getCountObjectives (   $a_obj_id,
  $a_activated_only = false 
)
static

get count objectives

@access public

Parameters
intobj_id
Returns

Definition at line 70 of file class.ilCourseObjective.php.

71 {
72 return count(ilCourseObjective::_getObjectiveIds($a_obj_id,$a_activated_only));
73 }

References _getObjectiveIds().

Referenced by ilLOEditorStatus\getObjectivesStatus(), and ilObjCourseGUI\getTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getObjectiveIds()

static ilCourseObjective::_getObjectiveIds (   $course_id,
  $a_activated_only = false 
)
static

Definition at line 468 of file class.ilCourseObjective.php.

469 {
470 global $ilDB;
471
472 if($a_activated_only)
473 {
474 $query = "SELECT objective_id FROM crs_objectives ".
475 "WHERE crs_id = ".$ilDB->quote($course_id ,'integer')." ".
476 'AND active = '.$ilDB->quote(1,'integer').' '.
477 "ORDER BY position";
478 }
479 else
480 {
481 $query = "SELECT objective_id FROM crs_objectives ".
482 "WHERE crs_id = ".$ilDB->quote($course_id ,'integer')." ".
483 "ORDER BY position";
484 }
485
486 $res = $ilDB->query($query);
487 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
488 {
489 $ids[] = $row->objective_id;
490 }
491
492 return $ids ? $ids : array();
493 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLOEditorStatus\__construct(), _deleteAll(), ilCourseObjectiveResult\_getAccomplished(), _getCountObjectives(), ilLPStatusObjectives\_getStatusInfo(), ilCourseObjectiveResult\_getSuggested(), ilLOEditorGUI\activateObjectives(), ilContainerObjectiveGUI\buildObjectiveMap(), ilLOEditorGUI\deactivateObjectives(), ilLPStatusObjectives\determineStatus(), ilLOEditorStatus\getObjectivesStatus(), ilCourseObjectiveResult\getStatus(), ilTrQuery\getUserObjectiveMatrix(), ilCourseObjectivesGUI\listObjectives(), ilLOEditorGUI\listObjectives(), ilCourseObjectivesGUI\questionOverview(), ilLPCollectionOfObjectives\read(), ilCourseObjectiveResult\readStatus(), ilObjCourseGUI\redirectLocToTestObject(), ilCourseObjectiveResult\reset(), and ilContainerObjectiveGUI\showObjectives().

+ Here is the caller graph for this function:

◆ _lookupContainerIdByObjectiveId()

static ilCourseObjective::_lookupContainerIdByObjectiveId (   $a_objective_id)
static

Get container of object.

@access public

Parameters
intobjective id

Definition at line 47 of file class.ilCourseObjective.php.

48 {
49 global $ilDB;
50
51 $query = "SELECT crs_id FROM crs_objectives ".
52 "WHERE objective_id = ".$ilDB->quote($a_objective_id ,'integer');
53 $res = $ilDB->query($query);
54 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
55 {
56 return $row->crs_id;
57 }
58 return false;
59 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilCourseObjectiveMaterials\__read(), ilCourseObjectiveQuestion\__read(), and ilWebAccessChecker\checkAccessLearningObjectivePage().

+ Here is the caller graph for this function:

◆ add()

ilCourseObjective::add ( )

Definition at line 211 of file class.ilCourseObjective.php.

212 {
213 global $ilDB;
214
215 // begin-patch lok
216 $next_id = $ilDB->nextId('crs_objectives');
217 $query = "INSERT INTO crs_objectives (crs_id,objective_id,active,title,description,position,created,passes) ".
218 "VALUES( ".
219 $ilDB->quote($this->course_obj->getId() ,'integer').", ".
220 $ilDB->quote($next_id,'integer').", ".
221 $ilDB->quote($this->isActive(),'integer').', '.
222 $ilDB->quote($this->getTitle() ,'text').", ".
223 $ilDB->quote($this->getDescription() ,'text').", ".
224 $ilDB->quote($this->__getLastPosition() + 1 ,'integer').", ".
225 $ilDB->quote(time() ,'integer').", ".
226 $ilDB->quote($this->getPasses(),'integer').' '.
227 ")";
228 $res = $ilDB->manipulate($query);
229 // end-patch lok
230
231 // refresh learning progress status after adding new objective
232 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
233 ilLPStatusWrapper::_refreshStatus($this->course_obj->getId());
234
235 return $this->objective_id = $next_id;
236 }

References $ilDB, $query, $res, __getLastPosition(), ilLPStatusWrapper\_refreshStatus(), getDescription(), getPasses(), getTitle(), and isActive().

+ Here is the call graph for this function:

◆ arePassesLimited()

ilCourseObjective::arePassesLimited ( )

Definition at line 180 of file class.ilCourseObjective.php.

181 {
182 return $this->passes > 0;
183 }

◆ delete()

ilCourseObjective::delete ( )

Definition at line 285 of file class.ilCourseObjective.php.

286 {
287 global $ilDB;
288
289 include_once './Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
290
291 $tmp_obj_qst =& new ilCourseObjectiveQuestion($this->getObjectiveId());
292 $tmp_obj_qst->deleteAll();
293
294 include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
295
296 $tmp_obj_lm =& new ilCourseObjectiveMaterials($this->getObjectiveId());
297 $tmp_obj_lm->deleteAll();
298
299
300 $query = "DELETE FROM crs_objectives ".
301 "WHERE crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ".
302 "AND objective_id = ".$ilDB->quote($this->getObjectiveId() ,'integer')." ";
303 $res = $ilDB->manipulate($query);
304
305 // refresh learning progress status after deleting objective
306 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
307 ilLPStatusWrapper::_refreshStatus($this->course_obj->getId());
308
309 return true;
310 }
class ilCourseObjectiveMaterials
class ilcourseobjectiveQuestion

References $ilDB, $query, $res, ilLPStatusWrapper\_refreshStatus(), and getObjectiveId().

+ Here is the call graph for this function:

◆ getDescription()

ilCourseObjective::getDescription ( )

Definition at line 198 of file class.ilCourseObjective.php.

199 {
200 return $this->description;
201 }

Referenced by add(), ilContainerObjectiveGUI\buildAccordionTitle(), and update().

+ Here is the caller graph for this function:

◆ getObjectiveId()

ilCourseObjective::getObjectiveId ( )

Definition at line 206 of file class.ilCourseObjective.php.

References $objective_id.

Referenced by __read(), ilContainerObjectiveGUI\buildAccordionTitle(), delete(), moveDown(), moveUp(), update(), and writePosition().

+ Here is the caller graph for this function:

◆ getPasses()

ilCourseObjective::getPasses ( )

Definition at line 175 of file class.ilCourseObjective.php.

176 {
177 return $this->passes;
178 }

References $passes.

Referenced by add(), and update().

+ Here is the caller graph for this function:

◆ getTitle()

ilCourseObjective::getTitle ( )

Definition at line 190 of file class.ilCourseObjective.php.

191 {
192 return $this->title;
193 }

Referenced by add(), ilContainerObjectiveGUI\buildAccordionTitle(), update(), and validate().

+ Here is the caller graph for this function:

◆ ilClone()

ilCourseObjective::ilClone (   $a_target_id,
  $a_copy_id 
)

clone objectives

@access public

Parameters
inttarget id
intcopy id

Definition at line 113 of file class.ilCourseObjective.php.

114 {
115 global $ilLog;
116
117 $ilLog->write(__METHOD__.': Start cloning learning objectives...');
118
119 $query = "SELECT * FROM crs_objectives ".
120 "WHERE crs_id = ".$this->db->quote($this->course_obj->getId() ,'integer').' '.
121 "ORDER BY position ";
122 $res = $this->db->query($query);
123 if(!$res->numRows())
124 {
125 $ilLog->write(__METHOD__.': ... no objectives found.');
126 return true;
127 }
128
129 if(!is_object($new_course = ilObjectFactory::getInstanceByRefId($a_target_id,false)))
130 {
131 $ilLog->write(__METHOD__.': Cannot init new course object.');
132 return true;
133 }
134 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
135 {
136 $new_objective = new ilCourseObjective($new_course);
137 $new_objective->setTitle($row->title);
138 $new_objective->setDescription($row->description);
139 $new_objective->setActive($row->active);
140 $objective_id = $new_objective->add();
141 $ilLog->write(__METHOD__.': Added new objective nr: '.$objective_id);
142
143 // Clone crs_objective_tst entries
144 include_once('Modules/Course/classes/class.ilCourseObjectiveQuestion.php');
145 $objective_qst = new ilCourseObjectiveQuestion($row->objective_id);
146 $objective_qst->cloneDependencies($objective_id,$a_copy_id);
147
148
149 $ilLog->write(__METHOD__.': Finished objective question dependencies: '.$objective_id);
150
151 // Clone crs_objective_lm entries (assigned course materials)
152 include_once('Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
153 $objective_material = new ilCourseObjectiveMaterials($row->objective_id);
154 $objective_material->cloneDependencies($objective_id,$a_copy_id);
155 }
156 $ilLog->write(__METHOD__.': Finished cloning objectives.');
157 }
ilCourseObjective(&$course_obj, $a_objective_id=0)
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References $ilLog, $objective_id, $query, $res, $row, DB_FETCHMODE_OBJECT, ilObjectFactory\getInstanceByRefId(), and ilCourseObjective().

+ Here is the call graph for this function:

◆ ilCourseObjective()

ilCourseObjective::ilCourseObjective ( $course_obj,
  $a_objective_id = 0 
)

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

26 {
27 global $ilDB;
28
29 $this->db =& $ilDB;
30 $this->course_obj =& $course_obj;
31
32 $this->objective_id = $a_objective_id;
33 if($this->objective_id)
34 {
35 $this->__read();
36 }
37 }

References $course_obj, $ilDB, and __read().

Referenced by ilClone().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActive()

ilCourseObjective::isActive ( )

Definition at line 165 of file class.ilCourseObjective.php.

166 {
167 return $this->active;
168 }

References $active.

Referenced by add(), and update().

+ Here is the caller graph for this function:

◆ lookupMaxPasses()

static ilCourseObjective::lookupMaxPasses (   $a_objective_id)
static

Definition at line 75 of file class.ilCourseObjective.php.

76 {
77 global $ilDB;
78
79 $query = 'SELECT passes from crs_objectives '.
80 'WHERE objective_id = '.$ilDB->quote($a_objective_id,'integer');
81 $res = $ilDB->query($query);
82 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
83 {
84 return (int) $row->passes;
85 }
86 return 0;
87 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilContainerObjectiveGUI\addItemDetails(), ilLOEditorStatus\checkNumberOfTries(), and ilLOUtils\lookupMaxAttempts().

+ Here is the caller graph for this function:

◆ lookupObjectiveTitle()

static ilCourseObjective::lookupObjectiveTitle (   $a_objective_id)
static

Definition at line 89 of file class.ilCourseObjective.php.

90 {
91 global $ilDB;
92
93 $query = 'SELECT title from crs_objectives '.
94 'WHERE objective_id = '.$ilDB->quote($a_objective_id,'integer');
95 $res = $ilDB->query($query);
96 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
97 {
98 return $row->title;
99 }
100 return "";
101
102 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLOEditorGUI\executeCommand(), ilPortfolioPageGUI\getCoursesOfUser(), ilTrMatrixTableGUI\getItems(), and ilContainerObjectiveGUI\renderTest().

+ Here is the caller graph for this function:

◆ moveDown()

ilCourseObjective::moveDown ( )

Definition at line 343 of file class.ilCourseObjective.php.

344 {
345 global $ilDB;
346
347 if(!$this->getObjectiveId())
348 {
349 return false;
350 }
351 // Stop if position is last
352 if($this->__getPosition() == $this->__getLastPosition())
353 {
354 return false;
355 }
356
357 $query = "UPDATE crs_objectives ".
358 "SET position = position - 1 ".
359 "WHERE position = ".$ilDB->quote($this->__getPosition() + 1 ,'integer')." ".
360 "AND crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ";
361 $res = $ilDB->manipulate($query);
362
363 $query = "UPDATE crs_objectives ".
364 "SET position = position + 1 ".
365 "WHERE objective_id = ".$ilDB->quote($this->getObjectiveId() ,'integer')." ".
366 "AND crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ";
367 $res = $ilDB->manipulate($query);
368
369 $this->__read();
370
371 return true;
372 }

References $ilDB, $query, $res, __getLastPosition(), __getPosition(), __read(), and getObjectiveId().

+ Here is the call graph for this function:

◆ moveUp()

ilCourseObjective::moveUp ( )

Definition at line 312 of file class.ilCourseObjective.php.

313 {
314 global $ilDB;
315
316 if(!$this->getObjectiveId())
317 {
318 return false;
319 }
320 // Stop if position is first
321 if($this->__getPosition() == 1)
322 {
323 return false;
324 }
325
326 $query = "UPDATE crs_objectives ".
327 "SET position = position + 1 ".
328 "WHERE position = ".$ilDB->quote($this->__getPosition() - 1 ,'integer')." ".
329 "AND crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ";
330 $res = $ilDB->manipulate($query);
331
332 $query = "UPDATE crs_objectives ".
333 "SET position = position - 1 ".
334 "WHERE objective_id = ".$ilDB->quote($this->getObjectiveId() ,'integer')." ".
335 "AND crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ";
336 $res = $ilDB->manipulate($query);
337
338 $this->__read();
339
340 return true;
341 }

References $ilDB, $query, $res, __getPosition(), __read(), and getObjectiveId().

+ Here is the call graph for this function:

◆ setActive()

ilCourseObjective::setActive (   $a_stat)

Definition at line 160 of file class.ilCourseObjective.php.

161 {
162 $this->active = $a_stat;
163 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setDescription()

ilCourseObjective::setDescription (   $a_description)

Definition at line 194 of file class.ilCourseObjective.php.

195 {
196 $this->description = $a_description;
197 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setObjectiveId()

ilCourseObjective::setObjectiveId (   $a_objective_id)

Definition at line 202 of file class.ilCourseObjective.php.

203 {
204 $this->objective_id = $a_objective_id;
205 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setPasses()

ilCourseObjective::setPasses (   $a_passes)

Definition at line 170 of file class.ilCourseObjective.php.

171 {
172 $this->passes = $a_passes;
173 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setTitle()

ilCourseObjective::setTitle (   $a_title)

Definition at line 186 of file class.ilCourseObjective.php.

187 {
188 $this->title = $a_title;
189 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ update()

ilCourseObjective::update ( )

Definition at line 238 of file class.ilCourseObjective.php.

239 {
240 global $ilDB;
241
242 // begin-patch lok
243 $query = "UPDATE crs_objectives ".
244 "SET title = ".$ilDB->quote($this->getTitle() ,'text').", ".
245 'active = '.$ilDB->quote($this->isActive(),'integer').', '.
246 "description = ".$ilDB->quote($this->getDescription() ,'text').", ".
247 'passes = '.$ilDB->quote($this->getPasses(),'integer').' '.
248 "WHERE objective_id = ".$ilDB->quote($this->getObjectiveId() ,'integer')." ".
249 "AND crs_id = ".$ilDB->quote($this->course_obj->getId() ,'integer')." ";
250 $res = $ilDB->manipulate($query);
251 // end-patch lok
252
253 return true;
254 }

References $ilDB, $query, $res, getDescription(), getObjectiveId(), getPasses(), getTitle(), and isActive().

+ Here is the call graph for this function:

◆ validate()

ilCourseObjective::validate ( )

validate

@access public

Parameters

return

Definition at line 280 of file class.ilCourseObjective.php.

281 {
282 return (bool) strlen($this->getTitle());
283 }

References getTitle().

+ Here is the call graph for this function:

◆ writePosition()

ilCourseObjective::writePosition (   $a_position)

write position

@access public

Parameters
intnew position
Returns

Definition at line 263 of file class.ilCourseObjective.php.

264 {
265 global $ilDB;
266
267 $query = "UPDATE crs_objectives ".
268 "SET position = ".$this->db->quote((string) $a_position ,'integer')." ".
269 "WHERE objective_id = ".$this->db->quote($this->getObjectiveId() ,'integer')." ";
270 $res = $ilDB->manipulate($query);
271 }

References $ilDB, $query, $res, and getObjectiveId().

+ Here is the call graph for this function:

Field Documentation

◆ $active

ilCourseObjective::$active = true
protected

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

Referenced by isActive().

◆ $course_obj

ilCourseObjective::$course_obj = null

Definition at line 17 of file class.ilCourseObjective.php.

Referenced by ilCourseObjective().

◆ $db

ilCourseObjective::$db = null

Definition at line 15 of file class.ilCourseObjective.php.

◆ $objective_id

ilCourseObjective::$objective_id = null

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

Referenced by getObjectiveId(), and ilClone().

◆ $passes

ilCourseObjective::$passes = 0
protected

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

Referenced by getPasses().


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