25 include_once(
"./Services/Component/classes/class.ilComponent.php");
67 private final function getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname)
71 if (!isset($this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
73 include_once
"./Services/Component/classes/class.ilPluginSlot.php";
76 $plugin_php_file =
"./Customizing/global/plugins/".$a_ctype.
"/".
77 $a_cname.
"/".$slot_name.
"/".$a_pname.
"/plugin.php";
81 if (is_file($plugin_php_file))
83 include_once($plugin_php_file);
84 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
85 array(
"version" => $version,
"id" => $id,
86 "ilias_min_version" => $ilias_min_version,
87 "ilias_max_version" => $ilias_max_version,
88 "responsible" => $responsible,
89 "responsible_mail" => $responsible_mail,
90 "learning_progress" => (
bool)$learning_progress);
93 $active = $rec[
"active"];
94 $needs_update =
false;
95 $activation_possible = !$active;
96 $inactive_reason =
"";
104 $inactive_reason = $lng->txt(
"cmps_needs_newer_ilias_version");
108 $inactive_reason =
"Plugin needs a newer version of ILIAS.";
110 $activation_possible =
false;
117 $inactive_reason = $lng->txt(
"cmps_needs_newer_plugin_version");
121 $inactive_reason =
"Plugin does not support current version of ILIAS. Newer version of plugin needed.";
123 $activation_possible =
false;
125 else if ($rec[
"last_update_version"] ==
"")
130 $inactive_reason = $lng->txt(
"cmps_needs_update");
134 $inactive_reason =
"Update needed.";
136 $needs_update =
true;
137 $activation_possible =
false;
144 $inactive_reason = $lng->txt(
"cmps_needs_upgrade");
148 $inactive_reason =
"Upgrade needed.";
150 $activation_possible =
false;
152 else if ($rec[
"last_update_version"] != $version)
157 $inactive_reason = $lng->txt(
"cmps_needs_update");
161 $inactive_reason =
"Update needed.";
163 $needs_update =
true;
164 $activation_possible =
false;
167 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"] = $active;
168 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"inactive_reason"] = $inactive_reason;
169 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"] = $needs_update;
170 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"activation_possible"] = $activation_possible;
172 $this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
true;
184 function getVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
186 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
187 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"version"];
200 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
201 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_min_version"];
214 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
215 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_max_version"];
226 function getId($a_ctype, $a_cname, $a_slot_id, $a_pname)
228 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
229 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"id"];
240 function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
242 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
243 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"];
254 function exists($a_ctype, $a_cname, $a_slot_id, $a_pname)
256 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
257 return isset($this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]);
270 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
271 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"];
282 function getAllData($a_ctype, $a_cname, $a_slot_id, $a_pname)
284 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
285 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname];
294 if (!isset(self::$active_plugins[$a_ctype][$a_cname][$a_slot_id]))
296 include_once
"./Services/Component/classes/class.ilPlugin.php";
298 self::$active_plugins[$a_ctype][$a_cname][$a_slot_id] =
301 return self::$active_plugins[$a_ctype][$a_cname][$a_slot_id];
316 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
318 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
321 return self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
337 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
339 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
342 $pl = self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
343 $pl->includeClass($a_class_file_name);
356 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
357 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"learning_progress"];