ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSkillProfile Class Reference

Skill profile. More...

+ Inheritance diagram for ilSkillProfile:
+ Collaboration diagram for ilSkillProfile:

Public Member Functions

 __construct ($a_id=0)
 Constructor. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setTitle ($a_val)
 Set title. More...
 
 getTitle ()
 Get title. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 addSkillLevel ($a_base_skill_id, $a_tref_id, $a_level_id)
 Add skill level. More...
 
 removeSkillLevel ($a_base_skill_id, $a_tref_id, $a_level_id)
 Remove skill level. More...
 
 getSkillLevels ()
 Get skill levels. More...
 
 read ()
 Read skill profile from db. More...
 
 create ()
 Create skill profile. More...
 
 update ()
 Update skill profile. More...
 
 delete ()
 Delete skill profile. More...
 
 getAssignments ()
 Get all assignments (users and roles) More...
 
 getAssignedUsers ()
 Get assigned users. More...
 
 addUserToProfile ($a_user_id)
 Add user to profile. More...
 
 removeUserFromProfile ($a_user_id)
 Remove user from profile. More...
 
 getAssignedRoles ()
 Get assigned roles. More...
 
 addRoleToProfile (int $a_role_id)
 Add role to profile. More...
 
 removeRoleFromProfile (int $a_role_id)
 Remove role from profile. More...
 

Static Public Member Functions

static getProfiles ()
 Get profiles. More...
 
static lookupTitle ($a_id)
 Lookup title. More...
 
static removeUserFromAllProfiles ($a_user_id)
 Remove user from all profiles. More...
 
static getProfilesOfUser ($a_user_id)
 Get profiles of a user. More...
 
static countUsers ($a_profile_id)
 Get assigned users. More...
 
static removeRoleFromAllProfiles (int $a_role_id)
 Remove role from all profiles. More...
 
static getProfilesOfRole (int $a_role_id)
 Get profiles of a role. More...
 
static countRoles (int $a_profile_id)
 Count assigned roles of a profile. More...
 
static getUsageInfo ($a_cskill_ids, &$a_usages)
 Get usage info. More...
 

Static Protected Member Functions

static lookup ($a_id, $a_field)
 Lookup. More...
 

Protected Attributes

 $db
 
 $lng
 
 $review
 
 $id
 
 $title
 
 $description
 
 $skill_level = array()
 

Detailed Description

Skill profile.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ /

Definition at line 14 of file class.ilSkillProfile.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillProfile::__construct (   $a_id = 0)

Constructor.

Parameters
int$a_idprofile id

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

References $DIC, read(), and setId().

42  {
43  global $DIC;
44 
45  $this->db = $DIC->database();
46  $this->lng = $DIC->language();
47  $this->review = $DIC->rbac()->review();
48  if ($a_id > 0) {
49  $this->setId($a_id);
50  $this->read();
51  }
52  }
setId($a_val)
Set id.
read()
Read skill profile from db.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ addRoleToProfile()

ilSkillProfile::addRoleToProfile ( int  $a_role_id)

Add role to profile.

Parameters
int$a_role_idrole id

Definition at line 549 of file class.ilSkillProfile.php.

References $db, $ilDB, and getId().

550  {
551  $ilDB = $this->db;
552 
553  $ilDB->replace(
554  "skl_profile_role",
555  array("profile_id" => array("integer", $this->getId()),
556  "role_id" => array("integer", (int) $a_role_id),
557  ),
558  array()
559  );
560  }
global $ilDB
+ Here is the call graph for this function:

◆ addSkillLevel()

ilSkillProfile::addSkillLevel (   $a_base_skill_id,
  $a_tref_id,
  $a_level_id 
)

Add skill level.

Parameters

Definition at line 120 of file class.ilSkillProfile.php.

Referenced by read().

121  {
122  //echo "-".$a_base_skill_id."-";
123  $this->skill_level[] = array(
124  "base_skill_id" => $a_base_skill_id,
125  "tref_id" => $a_tref_id,
126  "level_id" => $a_level_id
127  );
128  }
+ Here is the caller graph for this function:

◆ addUserToProfile()

ilSkillProfile::addUserToProfile (   $a_user_id)

Add user to profile.

Parameters
int$a_user_iduser id

Definition at line 396 of file class.ilSkillProfile.php.

References $db, $ilDB, and getId().

397  {
398  $ilDB = $this->db;
399 
400  $ilDB->replace(
401  "skl_profile_user",
402  array("profile_id" => array("integer", $this->getId()),
403  "user_id" => array("integer", (int) $a_user_id),
404  ),
405  array()
406  );
407  }
global $ilDB
+ Here is the call graph for this function:

◆ countRoles()

static ilSkillProfile::countRoles ( int  $a_profile_id)
static

Count assigned roles of a profile.

Parameters
int$a_profile_id
Returns
int

Definition at line 625 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

Referenced by ilSkillProfileTableGUI\fillRow().

626  {
627  global $DIC;
628 
629  $ilDB = $DIC->database();
630 
631  $set = $ilDB->query(
632  "SELECT count(*) rcnt FROM skl_profile_role " .
633  " WHERE profile_id = " . $ilDB->quote($a_profile_id, "integer")
634  );
635  $rec = $ilDB->fetchAssoc($set);
636  return (int) $rec["rcnt"];
637  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ countUsers()

static ilSkillProfile::countUsers (   $a_profile_id)
static

Get assigned users.

Definition at line 493 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

Referenced by ilSkillProfileTableGUI\fillRow().

494  {
495  global $DIC;
496 
497  $ilDB = $DIC->database();
498 
499  $set = $ilDB->query(
500  "SELECT count(*) ucnt FROM skl_profile_user " .
501  " WHERE profile_id = " . $ilDB->quote($a_profile_id, "integer")
502  );
503  $rec = $ilDB->fetchAssoc($set);
504  return (int) $rec["ucnt"];
505  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ create()

ilSkillProfile::create ( )

Create skill profile.

Definition at line 192 of file class.ilSkillProfile.php.

References $db, $ilDB, getId(), and setId().

193  {
194  $ilDB = $this->db;
195 
196  // profile
197  $this->setId($ilDB->nextId("skl_profile"));
198  $ilDB->manipulate("INSERT INTO skl_profile " .
199  "(id, title, description) VALUES (" .
200  $ilDB->quote($this->getId(), "integer") . "," .
201  $ilDB->quote($this->getTitle(), "text") . "," .
202  $ilDB->quote($this->getDescription(), "text") .
203  ")");
204 
205  // profile levels
206  foreach ($this->skill_level as $level) {
207  $ilDB->replace(
208  "skl_profile_level",
209  array("profile_id" => array("integer", $this->getId()),
210  "tref_id" => array("integer", (int) $level["tref_id"]),
211  "base_skill_id" => array("integer", (int) $level["base_skill_id"])
212  ),
213  array("level_id" => array("integer", (int) $level["level_id"]))
214  );
215  }
216  }
setId($a_val)
Set id.
global $ilDB
+ Here is the call graph for this function:

◆ delete()

ilSkillProfile::delete ( )

Delete skill profile.

Definition at line 261 of file class.ilSkillProfile.php.

References $db, and $ilDB.

262  {
263  $ilDB = $this->db;
264 
265  // TODO: Split the deletions when refactoring to repository pattern
266 
267  // profile levels
268  $ilDB->manipulate(
269  "DELETE FROM skl_profile_level WHERE " .
270  " profile_id = " . $ilDB->quote($this->getId(), "integer")
271  );
272 
273  // profile users
274  $ilDB->manipulate(
275  "DELETE FROM skl_profile_user WHERE " .
276  " profile_id = " . $ilDB->quote($this->getId(), "integer")
277  );
278 
279  // profile roles
280  $ilDB->manipulate(
281  "DELETE FROM skl_profile_role WHERE " .
282  " profile_id = " . $ilDB->quote($this->getId(), "integer")
283  );
284 
285  // profile
286  $ilDB->manipulate(
287  "DELETE FROM skl_profile WHERE " .
288  " id = " . $ilDB->quote($this->getId(), "integer")
289  );
290  }
global $ilDB

◆ getAssignedRoles()

ilSkillProfile::getAssignedRoles ( )

Get assigned roles.

Returns
array

Definition at line 512 of file class.ilSkillProfile.php.

References $db, $ilDB, $lng, $name, $review, $type, ilObjRole\_getTranslation(), ilObject\_lookupObjectId(), ilObject\_lookupTitle(), and ilObject\_lookupType().

Referenced by getAssignments().

513  {
514  $ilDB = $this->db;
515  $lng = $this->lng;
517 
518  $set = $ilDB->query(
519  "SELECT * FROM skl_profile_role " .
520  " WHERE profile_id = " . $ilDB->quote($this->getId(), "integer")
521  );
522  $roles = array();
523  while ($rec = $ilDB->fetchAssoc($set)) {
525  $type = $lng->txt("role");
526  // get object of role
527  $obj = ilObject::_lookupObjectId($review->getObjectReferenceOfRole($rec["role_id"]));
528  // get title of object if course or group
529  if (ilObject::_lookupType($obj) == "crs" || ilObject::_lookupType($obj) == "grp") {
530  $obj_title = ilObject::_lookupTitle($obj);
531  }
532 
533  $roles[$rec["role_id"]] = array(
534  "type" => $type,
535  "name" => $name,
536  "id" => $rec["role_id"],
537  "object" => $obj_title
538  );
539  }
540 
541  return $roles;
542  }
$type
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
if($format !==null) $name
Definition: metadata.php:230
static _getTranslation($a_role_title)
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignedUsers()

ilSkillProfile::getAssignedUsers ( )

Get assigned users.

Definition at line 369 of file class.ilSkillProfile.php.

References $db, $ilDB, $lng, $name, $type, and ilUserUtil\getNamePresentation().

Referenced by getAssignments().

370  {
371  $ilDB = $this->db;
372  $lng = $this->lng;
373 
374  $set = $ilDB->query(
375  "SELECT * FROM skl_profile_user " .
376  " WHERE profile_id = " . $ilDB->quote($this->getId(), "integer")
377  );
378  $users = array();
379  while ($rec = $ilDB->fetchAssoc($set)) {
380  $name = ilUserUtil::getNamePresentation($rec["user_id"]);
381  $type = $lng->txt("user");
382  $users[$rec["user_id"]] = array(
383  "type" => $type,
384  "name" => $name,
385  "id" => $rec["user_id"]
386  );
387  }
388  return $users;
389  }
$type
if($format !==null) $name
Definition: metadata.php:230
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignments()

ilSkillProfile::getAssignments ( )

Get all assignments (users and roles)

Definition at line 354 of file class.ilSkillProfile.php.

References getAssignedRoles(), and getAssignedUsers().

355  {
356  $assignments = array();
357 
358  $users = $this->getAssignedUsers();
359  $roles = $this->getAssignedRoles();
360  $assignments = $users + $roles;
361  ksort($assignments);
362 
363  return $assignments;
364  }
getAssignedRoles()
Get assigned roles.
getAssignedUsers()
Get assigned users.
+ Here is the call graph for this function:

◆ getDescription()

ilSkillProfile::getDescription ( )

Get description.

Returns
string description

Definition at line 109 of file class.ilSkillProfile.php.

References $description.

110  {
111  return $this->description;
112  }

◆ getId()

ilSkillProfile::getId ( )

Get id.

Returns
int id

Definition at line 69 of file class.ilSkillProfile.php.

References $id.

Referenced by addRoleToProfile(), addUserToProfile(), create(), and update().

70  {
71  return $this->id;
72  }
+ Here is the caller graph for this function:

◆ getProfiles()

static ilSkillProfile::getProfiles ( )
static

Get profiles.

Parameters

Definition at line 298 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

Referenced by ilSkillProfileTableGUI\getProfiles().

299  {
300  global $DIC;
301 
302  $ilDB = $DIC->database();
303 
304  $set = $ilDB->query(
305  "SELECT * FROM skl_profile " .
306  " ORDER BY title "
307  );
308  $profiles = array();
309  while ($rec = $ilDB->fetchAssoc($set)) {
310  $profiles[$rec["id"]] = $rec;
311  }
312 
313  return $profiles;
314  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ getProfilesOfRole()

static ilSkillProfile::getProfilesOfRole ( int  $a_role_id)
static

Get profiles of a role.

Parameters
int$a_role_idrole id
Returns
array

Definition at line 600 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

601  {
602  global $DIC;
603 
604  $ilDB = $DIC->database();
605 
606  $profiles = array();
607  $set = $ilDB->query(
608  "SELECT p.id, p.title FROM skl_profile_role r JOIN skl_profile p " .
609  " ON (r.profile_id = p.id) " .
610  " WHERE role_id = " . $ilDB->quote($a_role_id, "integer") .
611  " ORDER BY p.title ASC"
612  );
613  while ($rec = $ilDB->fetchAssoc($set)) {
614  $profiles[] = $rec;
615  }
616  return $profiles;
617  }
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ getProfilesOfUser()

static ilSkillProfile::getProfilesOfUser (   $a_user_id)
static

Get profiles of a user.

Parameters
int$a_user_iduser id

Definition at line 447 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

Referenced by ilPersonalSkillsGUI\__construct(), ilSurveyEvaluationGUI\competenceEval(), and ilTestSkillEvaluation\getAssignedSkillMatchingSkillProfiles().

448  {
449  global $DIC;
450 
451  $ilDB = $DIC->database();
452  $rbacreview = $DIC->rbac()->review();
453 
454  $all_profiles = array();
455 
456  // competence profiles coming from user assignments
457  $user_profiles = array();
458  $set = $ilDB->query(
459  "SELECT p.id, p.title FROM skl_profile_user u JOIN skl_profile p " .
460  " ON (u.profile_id = p.id) " .
461  " WHERE user_id = " . $ilDB->quote($a_user_id, "integer") .
462  " ORDER BY p.title ASC"
463  );
464  while ($rec = $ilDB->fetchAssoc($set)) {
465  $user_profiles[] = $rec;
466  }
467 
468  // competence profiles coming from role assignments
469  $role_profiles = array();
470  $user_roles = $rbacreview->assignedRoles($a_user_id);
471  foreach ($user_roles as $role) {
472  $profiles = self::getProfilesOfRole($role);
473  foreach ($profiles as $profile) {
474  $role_profiles[] = $profile;
475  }
476  }
477 
478  // merge competence profiles and remove multiple occurrences
479  $all_profiles = array_merge($user_profiles, $role_profiles);
480  $temp_profiles = array();
481  foreach ($all_profiles as &$v) {
482  if (!isset($temp_profiles[$v["id"]])) {
483  $temp_profiles[$v["id"]] = &$v;
484  }
485  }
486  $all_profiles = array_values($temp_profiles);
487  return $all_profiles;
488  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ getSkillLevels()

ilSkillProfile::getSkillLevels ( )

Get skill levels.

Parameters

Definition at line 153 of file class.ilSkillProfile.php.

References $skill_level.

154  {
155  return $this->skill_level;
156  }

◆ getTitle()

ilSkillProfile::getTitle ( )

Get title.

Returns
string title

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

References $title.

90  {
91  return $this->title;
92  }

◆ getUsageInfo()

static ilSkillProfile::getUsageInfo (   $a_cskill_ids,
$a_usages 
)
static

Get usage info.

Parameters

Implements ilSkillUsageInfo.

Definition at line 645 of file class.ilSkillProfile.php.

References $DIC, $ilDB, ilSkillUsage\getUsageInfoGeneric(), and ilSkillUsage\PROFILE.

646  {
647  global $DIC;
648 
649  $ilDB = $DIC->database();
650 
651  include_once("./Services/Skill/classes/class.ilSkillUsage.php");
653  $a_cskill_ids,
654  $a_usages,
656  "skl_profile_level",
657  "profile_id",
658  "base_skill_id"
659  );
660  }
static getUsageInfoGeneric( $a_cskill_ids, &$a_usages, $a_usage_type, $a_table, $a_key_field, $a_skill_field="skill_id", $a_tref_field="tref_id")
Get standard usage query.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ lookup()

static ilSkillProfile::lookup (   $a_id,
  $a_field 
)
staticprotected

Lookup.

Parameters

Definition at line 322 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

323  {
324  global $DIC;
325 
326  $ilDB = $DIC->database();
327 
328  $set = $ilDB->query(
329  "SELECT " . $a_field . " FROM skl_profile " .
330  " WHERE id = " . $ilDB->quote($a_id, "integer")
331  );
332  $rec = $ilDB->fetchAssoc($set);
333  return $rec[$a_field];
334  }
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ lookupTitle()

static ilSkillProfile::lookupTitle (   $a_id)
static

Lookup title.

Parameters

Definition at line 342 of file class.ilSkillProfile.php.

Referenced by ilSkillProfileGUI\confirmDeleteProfiles().

343  {
344  return self::lookup($a_id, "title");
345  }
+ Here is the caller graph for this function:

◆ read()

ilSkillProfile::read ( )

Read skill profile from db.

Parameters

Definition at line 164 of file class.ilSkillProfile.php.

References $db, $ilDB, addSkillLevel(), setDescription(), and setTitle().

Referenced by __construct().

165  {
166  $ilDB = $this->db;
167 
168  $set = $ilDB->query(
169  "SELECT * FROM skl_profile " .
170  " WHERE id = " . $ilDB->quote($this->getId(), "integer")
171  );
172  $rec = $ilDB->fetchAssoc($set);
173  $this->setTitle($rec["title"]);
174  $this->setDescription($rec["description"]);
175 
176  $set = $ilDB->query(
177  "SELECT * FROM skl_profile_level " .
178  " WHERE profile_id = " . $ilDB->quote($this->getId(), "integer")
179  );
180  while ($rec = $ilDB->fetchAssoc($set)) {
181  $this->addSkillLevel(
182  (int) $rec["base_skill_id"],
183  (int) $rec["tref_id"],
184  (int) $rec["level_id"]
185  );
186  }
187  }
setTitle($a_val)
Set title.
setDescription($a_val)
Set description.
global $ilDB
addSkillLevel($a_base_skill_id, $a_tref_id, $a_level_id)
Add skill level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeRoleFromAllProfiles()

static ilSkillProfile::removeRoleFromAllProfiles ( int  $a_role_id)
static

Remove role from all profiles.

Parameters
int$a_role_id

Definition at line 583 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

Referenced by ilSkillObjDeletionHandler\processDeletion().

584  {
585  global $DIC;
586  $ilDB = $DIC->database();
587 
588  $ilDB->manipulate(
589  "DELETE FROM skl_profile_role WHERE " .
590  " role_id = " . $ilDB->quote($a_role_id, "integer")
591  );
592  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ removeRoleFromProfile()

ilSkillProfile::removeRoleFromProfile ( int  $a_role_id)

Remove role from profile.

Parameters
int$a_role_idrole id

Definition at line 567 of file class.ilSkillProfile.php.

References $db, and $ilDB.

568  {
569  $ilDB = $this->db;
570 
571  $ilDB->manipulate(
572  "DELETE FROM skl_profile_role WHERE " .
573  " profile_id = " . $ilDB->quote($this->getId(), "integer") .
574  " AND role_id = " . $ilDB->quote($a_role_id, "integer")
575  );
576  }
global $ilDB

◆ removeSkillLevel()

ilSkillProfile::removeSkillLevel (   $a_base_skill_id,
  $a_tref_id,
  $a_level_id 
)

Remove skill level.

Parameters

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

137  {
138  foreach ($this->skill_level as $k => $sl) {
139  if ((int) $sl["base_skill_id"] == (int) $a_base_skill_id &&
140  (int) $sl["tref_id"] == (int) $a_tref_id &&
141  (int) $sl["level_id"] == (int) $a_level_id) {
142  unset($this->skill_level[$k]);
143  }
144  }
145  }

◆ removeUserFromAllProfiles()

static ilSkillProfile::removeUserFromAllProfiles (   $a_user_id)
static

Remove user from all profiles.

Parameters
int$a_user_id

Definition at line 430 of file class.ilSkillProfile.php.

References $DIC, and $ilDB.

Referenced by ilSkillObjDeletionHandler\processDeletion().

431  {
432  global $DIC;
433  $ilDB = $DIC->database();
434 
435  $ilDB->manipulate(
436  "DELETE FROM skl_profile_user WHERE " .
437  " user_id = " . $ilDB->quote($a_user_id, "integer")
438  );
439  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ removeUserFromProfile()

ilSkillProfile::removeUserFromProfile (   $a_user_id)

Remove user from profile.

Parameters
int$a_user_iduser id

Definition at line 414 of file class.ilSkillProfile.php.

References $db, and $ilDB.

415  {
416  $ilDB = $this->db;
417 
418  $ilDB->manipulate(
419  "DELETE FROM skl_profile_user WHERE " .
420  " profile_id = " . $ilDB->quote($this->getId(), "integer") .
421  " AND user_id = " . $ilDB->quote($a_user_id, "integer")
422  );
423  }
global $ilDB

◆ setDescription()

ilSkillProfile::setDescription (   $a_val)

Set description.

Parameters
string$a_valdescription

Definition at line 99 of file class.ilSkillProfile.php.

Referenced by read().

100  {
101  $this->description = $a_val;
102  }
+ Here is the caller graph for this function:

◆ setId()

ilSkillProfile::setId (   $a_val)

Set id.

Parameters
int$a_valid

Definition at line 59 of file class.ilSkillProfile.php.

Referenced by __construct(), and create().

60  {
61  $this->id = $a_val;
62  }
+ Here is the caller graph for this function:

◆ setTitle()

ilSkillProfile::setTitle (   $a_val)

Set title.

Parameters
string$a_valtitle

Definition at line 79 of file class.ilSkillProfile.php.

Referenced by read().

80  {
81  $this->title = $a_val;
82  }
+ Here is the caller graph for this function:

◆ update()

ilSkillProfile::update ( )

Update skill profile.

Definition at line 221 of file class.ilSkillProfile.php.

References $db, $ilDB, and getId().

222  {
223  $ilDB = $this->db;
224 
225  // profile
226  $ilDB->manipulate(
227  "UPDATE skl_profile SET " .
228  " title = " . $ilDB->quote($this->getTitle(), "text") . "," .
229  " description = " . $ilDB->quote($this->getDescription(), "text") .
230  " WHERE id = " . $ilDB->quote($this->getId(), "integer")
231  );
232 
233  // profile levels
234  $ilDB->manipulate(
235  "DELETE FROM skl_profile_level WHERE " .
236  " profile_id = " . $ilDB->quote($this->getId(), "integer")
237  );
238  foreach ($this->skill_level as $level) {
239  $ilDB->replace(
240  "skl_profile_level",
241  array("profile_id" => array("integer", $this->getId()),
242  "tref_id" => array("integer", (int) $level["tref_id"]),
243  "base_skill_id" => array("integer", (int) $level["base_skill_id"])
244  ),
245  array("level_id" => array("integer", (int) $level["level_id"]))
246  );
247 
248  /*$ilDB->manipulate("INSERT INTO skl_profile_level ".
249  "(profile_id, base_skill_id, tref_id, level_id) VALUES (".
250  $ilDB->quote($this->getId(), "integer").",".
251  $ilDB->quote((int) $level["base_skill_id"], "integer").",".
252  $ilDB->quote((int) $level["tref_id"], "integer").",".
253  $ilDB->quote((int) $level["level_id"], "integer").
254  ")");*/
255  }
256  }
global $ilDB
+ Here is the call graph for this function:

Field Documentation

◆ $db

◆ $description

ilSkillProfile::$description
protected

Definition at line 33 of file class.ilSkillProfile.php.

Referenced by getDescription().

◆ $id

ilSkillProfile::$id
protected

Definition at line 31 of file class.ilSkillProfile.php.

Referenced by getId().

◆ $lng

ilSkillProfile::$lng
protected

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

Referenced by getAssignedRoles(), and getAssignedUsers().

◆ $review

ilSkillProfile::$review
protected

Definition at line 29 of file class.ilSkillProfile.php.

Referenced by getAssignedRoles().

◆ $skill_level

ilSkillProfile::$skill_level = array()
protected

Definition at line 34 of file class.ilSkillProfile.php.

Referenced by getSkillLevels().

◆ $title

ilSkillProfile::$title
protected

Definition at line 32 of file class.ilSkillProfile.php.

Referenced by getTitle().


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