ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCourseLP Class Reference
+ Inheritance diagram for ilCourseLP:
+ Collaboration diagram for ilCourseLP:

Public Member Functions

 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 getSettingsInfo ()
 
 getMembers (bool $a_search=true)
 
 getMailTemplateId ()
 
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 
 isAnonymized ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 isActive ()
 
 getModeText (int $mode)
 
 getModeInfoText (int $mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers (bool $search=true)
 
 resetLPDataForCompleteObject (bool $recursive=true)
 
 resetLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 
 hasIndividualModeOptions ()
 
 initInvidualModeOptions (ilRadioGroupInputGUI $modeRadio)
 
 shouldFetchIndividualModeFromFormSubmission ()
 
 fetchIndividualModeFromFormSubmission (ilPropertyFormGUI $form)
 
 appendModeConfiguration (int $mode, ilRadioOption $modeElement)
 
 saveModeConfiguration (ilPropertyFormGUI $form, bool &$modeChanged)
 

Static Public Member Functions

static getDefaultModes (bool $a_lp_active)
 
- Static Public Member Functions inherited from ilObjectLP
static getInstance (int $obj_id)
 
static getTypeClass (string $type)
 
static getSupportedObjectTypes ()
 
static isSupportedObjectType (string $type)
 
static handleMove (int $source_ref_id)
 
static getLPMemberships (int $usr_id, array $obj_ids, ?int $parent_ref_id=null, bool $mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds (string $obj_type)
 
static supportsMark (string $obj_type)
 
static supportsMatrixView (string $obj_type)
 
static getDefaultModes (bool $lp_active)
 Get available type-specific default modes (no administration needed) More...
 
static saveTypeDefaults (array $data)
 
static getTypeDefault (string $type)
 

Protected Member Functions

 checkObjectives ()
 
- Protected Member Functions inherited from ilObjectLP
 __construct (int $obj_id)
 
 resetCustomLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 

Static Protected Member Functions

static isLPMember (array &$a_res, int $a_usr_id, array $a_obj_ids)
 
- Static Protected Member Functions inherited from ilObjectLP
static isLPMember (array &$res, int $usr_id, array $obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$res, int $usr_id, int $parent_ref_id, array $obj_ids, bool $mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 
static getTypeDefaultFromDB (string $type)
 

Additional Inherited Members

- Protected Attributes inherited from ilObjectLP
ilTree $tree
 
ilDBInterface $db
 
ilObjectDefinition $objectDefinition
 
int $obj_id
 
ilLPCollection $collection_instance = null
 
int $mode = null
 
- Static Protected Attributes inherited from ilObjectLP
static array $type_defaults = null
 

Detailed Description

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

Member Function Documentation

◆ checkObjectives()

ilCourseLP::checkObjectives ( )
protected

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

References ilObjCourse\_lookupViewMode(), and ilCourseConstants\IL_CRS_VIEW_OBJECTIVE.

Referenced by getCurrentMode(), getDefaultMode(), and getValidModes().

70  : bool
71  {
73  }
static _lookupViewMode(int $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentMode()

ilCourseLP::getCurrentMode ( )

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

References checkObjectives(), and ilLPObjSettings\LP_MODE_OBJECTIVES.

62  : int
63  {
64  if ($this->checkObjectives()) {
66  }
67  return parent::getCurrentMode();
68  }
+ Here is the call graph for this function:

◆ getDefaultMode()

ilCourseLP::getDefaultMode ( )

Definition at line 42 of file class.ilCourseLP.php.

References checkObjectives(), ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR, and ilLPObjSettings\LP_MODE_OBJECTIVES.

42  : int
43  {
44  if ($this->checkObjectives()) {
46  }
48  }
+ Here is the call graph for this function:

◆ getDefaultModes()

static ilCourseLP::getDefaultModes ( bool  $a_lp_active)
static

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

References ilLPObjSettings\LP_MODE_DEACTIVATED, and ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR.

28  : array
29  {
30  if (!$a_lp_active) {
31  return array(
33  );
34  } else {
35  return array(
38  );
39  }
40  }

◆ getMailTemplateId()

ilCourseLP::getMailTemplateId ( )

◆ getMembers()

ilCourseLP::getMembers ( bool  $a_search = true)
Returns
int[]

Definition at line 92 of file class.ilCourseLP.php.

References ilCourseParticipants\_getInstanceByObjId().

92  : array
93  {
94  $member_obj = ilCourseParticipants::_getInstanceByObjId($this->obj_id);
95  return $member_obj->getMembers();
96  }
static _getInstanceByObjId(int $a_obj_id)
+ Here is the call graph for this function:

◆ getSettingsInfo()

ilCourseLP::getSettingsInfo ( )

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

References $DIC, $lng, and ilObjCourse\STATUS_DETERMINATION_LP.

75  : string
76  {
77  global $DIC;
78 
79  $lng = $DIC['lng'];
80 
81  // #9004
82  $crs = new ilObjCourse($this->obj_id, false);
83  if ($crs->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP) {
84  return $lng->txt("crs_status_determination_lp_info");
85  }
86  return '';
87  }
$lng
const STATUS_DETERMINATION_LP
global $DIC
Definition: feed.php:28

◆ getValidModes()

ilCourseLP::getValidModes ( )

◆ isLPMember()

static ilCourseLP::isLPMember ( array &  $a_res,
int  $a_usr_id,
array  $a_obj_ids 
)
staticprotected

Definition at line 98 of file class.ilCourseLP.php.

References $DIC, $ilDB, $query, and ILIAS\Repository\int().

98  : bool
99  {
100  global $DIC;
101 
102  $ilDB = $DIC->database();
103 
104  // will only find objects with roles for user!
105  // see ilParticipants::_getMembershipByType()
106  $query = " SELECT DISTINCT obd.obj_id, obd.type, obd2.title" .
107  " FROM rbac_ua ua" .
108  " JOIN rbac_fa fa ON (ua.rol_id = fa.rol_id)" .
109  " JOIN object_reference obr ON (fa.parent = obr.ref_id)" .
110  " JOIN object_data obd ON (obr.obj_id = obd.obj_id)" .
111  " JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id)" .
112  " WHERE obd.type = " . $ilDB->quote("crs", "text") .
113  " AND fa.assign = " . $ilDB->quote("y", "text") .
114  " AND ua.usr_id = " . $ilDB->quote($a_usr_id, "integer") .
115  " AND " . $ilDB->in("obd.obj_id", $a_obj_ids, false, "integer");
116  $set = $ilDB->query($query);
117  while ($row = $ilDB->fetchAssoc($set)) {
118  $role = $row["title"];
119  if (!stristr($role, "il_" . $row["type"] . "_admin_") &&
120  !stristr($role, "il_" . $row["type"] . "_tutor_")) {
121  $a_res[(int) $row["obj_id"]] = true;
122  }
123  }
124  return true;
125  }
global $DIC
Definition: feed.php:28
$query
+ Here is the call graph for this function:

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