ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContainerLocalProfiles Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilContainerLocalProfiles:

Public Member Functions

 __construct (int $a_obj_id)
 
 getProfiles ()
 

Protected Member Functions

 setObjId (int $a_obj_id)
 
 getObjId ()
 
 setMemberRoleId ()
 
 getMemberRoleId ()
 
 read ()
 

Protected Attributes

ilDBInterface $db
 
array $profiles = []
 
int $obj_id = 0
 
int $mem_rol_id = 0
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Local competence profiles of a container

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

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

Constructor & Destructor Documentation

◆ __construct()

ilContainerLocalProfiles::__construct ( int  $a_obj_id)

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

References $DIC, getObjId(), read(), setMemberRoleId(), and setObjId().

33  {
34  global $DIC;
35 
36  $this->db = $DIC->database();
37  $this->setObjId($a_obj_id);
38 
39  if ($this->getObjId() > 0) {
40  $this->setMemberRoleId();
41  $this->read();
42  }
43  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getMemberRoleId()

ilContainerLocalProfiles::getMemberRoleId ( )
protected

Definition at line 62 of file class.ilContainerLocalProfiles.php.

References $mem_rol_id.

62  : int
63  {
64  return $this->mem_rol_id;
65  }

◆ getObjId()

ilContainerLocalProfiles::getObjId ( )
protected

Definition at line 50 of file class.ilContainerLocalProfiles.php.

References $obj_id.

Referenced by __construct(), and setMemberRoleId().

50  : int
51  {
52  return $this->obj_id;
53  }
+ Here is the caller graph for this function:

◆ getProfiles()

ilContainerLocalProfiles::getProfiles ( )

Definition at line 67 of file class.ilContainerLocalProfiles.php.

References $profiles.

Referenced by ilPersonalSkillsGUI\setObjectSkillProfiles().

67  : array
68  {
69  return $this->profiles;
70  }
+ Here is the caller graph for this function:

◆ read()

ilContainerLocalProfiles::read ( )
protected

Definition at line 72 of file class.ilContainerLocalProfiles.php.

References $db, ilDBInterface\fetchAssoc(), ilDBInterface\query(), and ilDBInterface\quote().

Referenced by __construct().

72  : void
73  {
74  $db = $this->db;
75 
76  $this->profiles = [];
77  $set = $db->query(
78  "SELECT spr.profile_id, spr.role_id, sp.title, sp.skill_tree_id " .
79  " FROM skl_profile_role spr INNER JOIN skl_profile sp ON spr.profile_id = sp.id " .
80  " WHERE sp.ref_id <> 0 " .
81  " AND role_id = " . $db->quote($this->getMemberRoleId(), "integer")
82  );
83  while ($rec = $db->fetchAssoc($set)) {
84  $this->profiles[$rec["profile_id"]] = $rec;
85  }
86  }
fetchAssoc(ilDBStatement $statement)
quote($value, string $type)
query(string $query)
Run a (read-only) Query on the database.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMemberRoleId()

ilContainerLocalProfiles::setMemberRoleId ( )
protected

Definition at line 55 of file class.ilContainerLocalProfiles.php.

References $ref_id, ilObject\_getAllReferences(), ilParticipants\getDefaultMemberRole(), and getObjId().

Referenced by __construct().

55  : void
56  {
57  $refs = ilObject::_getAllReferences($this->getObjId());
58  $ref_id = end($refs);
59  $this->mem_rol_id = ilParticipants::getDefaultMemberRole($ref_id);
60  }
static _getAllReferences(int $id)
get all reference ids for object ID
static getDefaultMemberRole(int $a_ref_id)
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setObjId()

ilContainerLocalProfiles::setObjId ( int  $a_obj_id)
protected

Definition at line 45 of file class.ilContainerLocalProfiles.php.

Referenced by __construct().

45  : void
46  {
47  $this->obj_id = $a_obj_id;
48  }
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilDBInterface ilContainerLocalProfiles::$db
protected

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

Referenced by read().

◆ $mem_rol_id

int ilContainerLocalProfiles::$mem_rol_id = 0
protected

Definition at line 30 of file class.ilContainerLocalProfiles.php.

Referenced by getMemberRoleId().

◆ $obj_id

int ilContainerLocalProfiles::$obj_id = 0
protected

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

Referenced by getObjId().

◆ $profiles

array ilContainerLocalProfiles::$profiles = []
protected

Definition at line 28 of file class.ilContainerLocalProfiles.php.

Referenced by getProfiles().


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