ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 Post vars for input groups is taken from array keys. More...
 
 shouldFetchIndividualModeFromFormSubmission ()
 
 fetchIndividualModeFromFormSubmission (string $selected_group, array $group_data)
 
 appendModeConfiguration (int $mode)
 
 saveModeConfiguration (string $selected_group, array $group_data, bool &$modeChanged)
 

Static Public Member Functions

static getDefaultModes (bool $a_lp_active)
 Get available type-specific default modes (no administration needed) More...
 
- 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)
 Find (lp-relevant) members for given object ids. More...
 
- 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.

70 : bool
71 {
73 }
static _lookupViewMode(int $a_id)

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

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

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

◆ getCurrentMode()

ilCourseLP::getCurrentMode ( )

Reimplemented from ilObjectLP.

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

62 : int
63 {
64 if ($this->checkObjectives()) {
66 }
67 return parent::getCurrentMode();
68 }

References checkObjectives(), and ilLPObjSettings\LP_MODE_OBJECTIVES.

+ Here is the call graph for this function:

◆ getDefaultMode()

ilCourseLP::getDefaultMode ( )

Reimplemented from ilObjectLP.

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

42 : int
43 {
44 if ($this->checkObjectives()) {
46 }
48 }

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

+ Here is the call graph for this function:

◆ getDefaultModes()

static ilCourseLP::getDefaultModes ( bool  $lp_active)
static

Get available type-specific default modes (no administration needed)

Returns
int[]

Reimplemented from ilObjectLP.

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

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

References ilLPObjSettings\LP_MODE_DEACTIVATED, and ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR.

◆ getMailTemplateId()

ilCourseLP::getMailTemplateId ( )

Reimplemented from ilObjectLP.

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

References ilCourseMailTemplateTutorContext\ID.

◆ getMembers()

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

Reimplemented from ilObjectLP.

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

92 : array
93 {
94 $member_obj = ilCourseParticipants::_getInstanceByObjId($this->obj_id);
95 return $member_obj->getMembers();
96 }
static _getInstanceByObjId(int $a_obj_id)

References ilCourseParticipants\_getInstanceByObjId().

+ Here is the call graph for this function:

◆ getSettingsInfo()

ilCourseLP::getSettingsInfo ( )

Reimplemented from ilObjectLP.

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

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 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const int STATUS_DETERMINATION_LP
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26

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

◆ getValidModes()

ilCourseLP::getValidModes ( )

◆ isLPMember()

static ilCourseLP::isLPMember ( array &  $res,
int  $usr_id,
array  $obj_ids 
)
staticprotected

Find (lp-relevant) members for given object ids.

Reimplemented from ilObjectLP.

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

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 }

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

+ Here is the call graph for this function:

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