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

Public Member Functions

 getPluginInstance ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
- 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)
 

Data Fields

const INACTIVE_PLUGIN = -1
 

Protected Member Functions

 __construct ($a_obj_id)
 
 initPlugin ()
 
- 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 &$res, int $usr_id, array $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)
 

Protected Attributes

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

Additional Inherited Members

- 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)
 
- Static Protected Attributes inherited from ilObjectLP
static array $type_defaults = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilPluginLP::__construct (   $a_obj_id)
protected

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

References ILIAS\GlobalScreen\Provider\__construct(), and initPlugin().

35  {
36  parent::__construct($a_obj_id);
37 
38  $this->initPlugin();
39  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getCurrentMode()

ilPluginLP::getCurrentMode ( )

Definition at line 74 of file class.ilPluginLP.php.

References ilLPObjSettings\LP_MODE_PLUGIN, and ilLPObjSettings\LP_MODE_UNDEFINED.

74  : int
75  {
76  if ($this->status !== null) {
78  }
80  }

◆ getDefaultMode()

ilPluginLP::getDefaultMode ( )

Definition at line 61 of file class.ilPluginLP.php.

References ilLPObjSettings\LP_MODE_UNDEFINED.

61  : int
62  {
64  }

◆ getPluginInstance()

ilPluginLP::getPluginInstance ( )

Definition at line 56 of file class.ilPluginLP.php.

References $status.

57  {
58  return $this->status;
59  }

◆ getValidModes()

ilPluginLP::getValidModes ( )

Definition at line 66 of file class.ilPluginLP.php.

References ilLPObjSettings\LP_MODE_PLUGIN, and ilLPObjSettings\LP_MODE_UNDEFINED.

66  : array
67  {
68  return array(
71  );
72  }

◆ initPlugin()

ilPluginLP::initPlugin ( )
protected

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

References ilObject\_lookupType(), ilObjectFactory\getInstanceByObjId(), and ilRepositoryObjectPluginSlot\isTypePluginWithLP().

Referenced by __construct().

41  : void
42  {
43  // active plugin?
45  $obj = ilObjectFactory::getInstanceByObjId($this->obj_id, false); // #12640
46  if ($obj instanceof ilLPStatusPluginInterface) {
47  $this->status = $obj;
48  }
49  }
50  // inactive plugin?
52  $this->status = self::INACTIVE_PLUGIN;
53  }
54  }
Interface for plugin classes that want to support Learning Progress.
static isTypePluginWithLP(string $a_type, bool $a_active_status=true)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isLPMember()

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

Definition at line 82 of file class.ilPluginLP.php.

References $DIC, $location, $type, and ilObject\_lookupType().

82  : bool
83  {
84  global $DIC;
85  $objDefinition = $DIC['objDefinition'];
86 
87  $type = $obj_ids;
88  $type = array_shift($type);
90 
91  $location = $objDefinition->getLocation($type);
92  $class_name = "ilObj" . $objDefinition->getClassName($type);
93  include_once $location . "/class." . $class_name . ".php";
94 
95  // forward to plugin object
96  if (method_exists($class_name, "isLPMember")) {
97  return $class_name::isLPMember($res, $usr_id, $obj_ids);
98  }
99 
100  return false;
101  }
$res
Definition: ltiservices.php:69
$type
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: buildRTE.php:22
global $DIC
Definition: feed.php:28
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

Field Documentation

◆ $status

ilPluginLP::$status
protected

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

Referenced by getPluginInstance().

◆ INACTIVE_PLUGIN


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