ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
ilCourseLP Class Reference
+ Inheritance diagram for ilCourseLP:
+ Collaboration diagram for ilCourseLP:

Public Member Functions

 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 getSettingsInfo ()
 
 getMembers ($a_search=true)
 
 getMailTemplateId ()
 
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 
 isAnonymized ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 isActive ()
 
 getModeText ($a_mode)
 
 getModeInfoText ($a_mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers ($a_search=true)
 
 resetLPDataForCompleteObject ($a_recursive=true)
 
 resetLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 

Protected Member Functions

 checkObjectives ()
 
- Protected Member Functions inherited from ilObjectLP
 __construct ($a_obj_id)
 
 resetCustomLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 

Static Protected Member Functions

static isLPMember (array &$a_res, $a_usr_id, array $a_obj_ids)
 
- Static Protected Member Functions inherited from ilObjectLP
static getTypeClass ($a_type)
 
static isLPMember (array &$a_res, $a_usr_id, $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$a_res, $a_usr_id, $a_parent_ref_id, array $a_obj_ids, $a_mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectLP
static getInstance ($a_obj_id)
 
static isSupportedObjectType ($a_type)
 
static handleMove ($a_source_ref_id)
 
static getLPMemberships ($a_usr_id, array $a_obj_ids, $a_parent_ref_id=null, $a_mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds ($a_obj_type)
 
static supportsMark ($a_obj_type)
 
static supportsMatrixView ($a_obj_type)
 
- Protected Attributes inherited from ilObjectLP
 $obj_id
 
 $collection_instance
 
 $mode
 

Detailed Description

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

Member Function Documentation

◆ checkObjectives()

ilCourseLP::checkObjectives ( )
protected

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

References ilObjCourse\_lookupViewMode(), and IL_CRS_VIEW_OBJECTIVE.

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

48  {
49  include_once "Modules/Course/classes/class.ilObjCourse.php";
51  {
52  return true;
53  }
54  return false;
55  }
const IL_CRS_VIEW_OBJECTIVE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentMode()

ilCourseLP::getCurrentMode ( )

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

References checkObjectives(), and ilLPObjSettings\LP_MODE_OBJECTIVES.

39  {
40  if($this->checkObjectives())
41  {
43  }
44  return parent::getCurrentMode();
45  }
+ Here is the call graph for this function:

◆ getDefaultMode()

ilCourseLP::getDefaultMode ( )

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

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

17  {
18  if($this->checkObjectives())
19  {
21  }
23  }
+ Here is the call graph for this function:

◆ getMailTemplateId()

ilCourseLP::getMailTemplateId ( )

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

References ilCourseMailTemplateTutorContext\ID.

108  {
109  include_once './Modules/Course/classes/class.ilCourseMailTemplateTutorContext.php';
111  }

◆ getMembers()

ilCourseLP::getMembers (   $a_search = true)

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

References ilCourseParticipants\_getInstanceByObjId().

71  {
72  include_once "Modules/Course/classes/class.ilCourseParticipants.php";
73  $member_obj = ilCourseParticipants::_getInstanceByObjId($this->obj_id);
74  return $member_obj->getMembers();
75  }
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
+ Here is the call graph for this function:

◆ getSettingsInfo()

ilCourseLP::getSettingsInfo ( )

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

References $lng, and ilObjCourse\STATUS_DETERMINATION_LP.

58  {
59  global $lng;
60 
61  // #9004
62  include_once("./Modules/Course/classes/class.ilObjCourse.php");
63  $crs = new ilObjCourse($this->obj_id, false);
64  if($crs->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP)
65  {
66  return $lng->txt("crs_status_determination_lp_info");
67  }
68  }
const STATUS_DETERMINATION_LP
Class ilObjCourse.
global $lng
Definition: privfeed.php:40

◆ getValidModes()

◆ isLPMember()

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

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

References $ilDB, $query, and $row.

78  {
79  global $ilDB;
80 
81  // will only find objects with roles for user!
82  // see ilParticipants::_getMembershipByType()
83  $query = " SELECT DISTINCT obd.obj_id, obd.type, obd2.title".
84  " FROM rbac_ua ua".
85  " JOIN rbac_fa fa ON (ua.rol_id = fa.rol_id)".
86  " JOIN object_reference obr ON (fa.parent = obr.ref_id)".
87  " JOIN object_data obd ON (obr.obj_id = obd.obj_id)".
88  " JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id)".
89  " WHERE obd.type = ".$ilDB->quote("crs", "text").
90  " AND fa.assign = ".$ilDB->quote("y", "text").
91  " AND ua.usr_id = ".$ilDB->quote($a_usr_id, "integer").
92  " AND ".$ilDB->in("obd.obj_id", $a_obj_ids, "", "integer");
93  $set = $ilDB->query($query);
94  while($row = $ilDB->fetchAssoc($set))
95  {
96  $role = $row["title"];
97  if(!stristr($role, "il_".$row["type"]."_admin_") &&
98  !stristr($role, "il_".$row["type"]."_tutor_"))
99  {
100  $a_res[$row["obj_id"]] = true;
101  }
102  }
103 
104  return true;
105  }
global $ilDB

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