6 include_once(
"./Services/Component/classes/class.ilComponent.php");
48 private final function getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname)
52 if (!isset($this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
54 include_once
"./Services/Component/classes/class.ilPluginSlot.php";
57 $plugin_php_file =
"./Customizing/global/plugins/".$a_ctype.
"/".
58 $a_cname.
"/".$slot_name.
"/".$a_pname.
"/plugin.php";
62 if (is_file($plugin_php_file))
64 include_once($plugin_php_file);
65 $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
67 "ilias_min_version" => $ilias_min_version,
68 "ilias_max_version" => $ilias_max_version,
69 "responsible" => $responsible,
70 "responsible_mail" => $responsible_mail,
71 "learning_progress" => (
bool)$learning_progress,
72 "supports_export" => (
bool)$supports_export);
75 $active = $rec[
"active"];
76 $needs_update =
false;
77 $activation_possible = !$active;
78 $inactive_reason =
"";
86 $inactive_reason = $lng->txt(
"cmps_needs_newer_ilias_version");
90 $inactive_reason =
"Plugin needs a newer version of ILIAS.";
92 $activation_possible =
false;
99 $inactive_reason = $lng->txt(
"cmps_needs_newer_plugin_version");
103 $inactive_reason =
"Plugin does not support current version of ILIAS. Newer version of plugin needed.";
105 $activation_possible =
false;
107 else if ($rec[
"last_update_version"] ==
"")
112 $inactive_reason = $lng->txt(
"cmps_needs_update");
116 $inactive_reason =
"Update needed.";
118 $needs_update =
true;
119 $activation_possible =
false;
126 $inactive_reason = $lng->txt(
"cmps_needs_upgrade");
130 $inactive_reason =
"Upgrade needed.";
132 $activation_possible =
false;
134 else if ($rec[
"last_update_version"] !=
$version)
139 $inactive_reason = $lng->txt(
"cmps_needs_update");
143 $inactive_reason =
"Update needed.";
145 $needs_update =
true;
146 $activation_possible =
false;
149 $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"] = $active;
150 $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"inactive_reason"] = $inactive_reason;
151 $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"] = $needs_update;
152 $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"activation_possible"] = $activation_possible;
154 $this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
true;
166 function getVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
168 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
169 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"version"];
182 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
183 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_min_version"];
196 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
197 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_max_version"];
208 function getId($a_ctype, $a_cname, $a_slot_id, $a_pname)
210 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
211 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"id"];
222 function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
226 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
232 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"];
243 function exists($a_ctype, $a_cname, $a_slot_id, $a_pname)
245 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
246 return isset($this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname]);
259 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
260 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"];
271 function getAllData($a_ctype, $a_cname, $a_slot_id, $a_pname)
273 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
274 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname];
283 if (!isset(self::$active_plugins[$a_ctype][$a_cname][$a_slot_id]))
285 include_once
"./Services/Component/classes/class.ilPlugin.php";
287 self::$active_plugins[$a_ctype][$a_cname][$a_slot_id] =
290 return self::$active_plugins[$a_ctype][$a_cname][$a_slot_id];
305 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
307 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
310 return self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
326 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
328 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
331 $pl = self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
332 $pl->includeClass($a_class_file_name);
346 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
347 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"learning_progress"];
361 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
362 return $this->
data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"supports_export"];
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin object.
getVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get version of plugin.
__construct()
Constructor.
const ILIAS_VERSION_NUMERIC
static isVersionGreaterString($a_ver1, $a_ver2)
isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
Checks whether plugin is active (include version checks)
static getActivePluginsForSlot($a_ctype, $a_cname, $a_slot_id)
Get all active plugins for a slot.
getIliasMaxVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Ilias Max Version.
static getActivePluginsForSlot($a_ctype, $a_cname, $a_slot_id)
Get all active plugin names for a slot.
static lookupSlotName($a_ctype, $a_cname, $a_slot_id)
Lookup slot name for component and slot id.
needsUpdate($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get version.
exists($a_ctype, $a_cname, $a_slot_id, $a_pname)
Checks whether plugin exists.
getAllData($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get all data from file in an array.
supportsExport($a_ctype, $a_cname, $a_slot_id, $a_pname)
Checks whether plugin supports export/import.
static getPluginRecord($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get record from il_plugin table.
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get basic data of plugin from plugin.php.
static includeClass($a_ctype, $a_cname, $a_slot_id, $a_pname, $a_class_file_name)
Get Plugin Object.
Administration class for plugins.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
hasLearningProgress($a_ctype, $a_cname, $a_slot_id, $a_pname)
Checks whether plugin has active learning progress.
Create styles array
The data for the language used.
getIliasMinVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Ilias Min Version.
getId($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get ID.