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] =
66 array(
"version" => $version,
"id" => $id,
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);
74 $active = $rec[
"active"];
75 $needs_update =
false;
76 $activation_possible = !$active;
77 $inactive_reason =
"";
85 $inactive_reason = $lng->txt(
"cmps_needs_newer_ilias_version");
89 $inactive_reason =
"Plugin needs a newer version of ILIAS.";
91 $activation_possible =
false;
98 $inactive_reason = $lng->txt(
"cmps_needs_newer_plugin_version");
102 $inactive_reason =
"Plugin does not support current version of ILIAS. Newer version of plugin needed.";
104 $activation_possible =
false;
106 else if ($rec[
"last_update_version"] ==
"")
111 $inactive_reason = $lng->txt(
"cmps_needs_update");
115 $inactive_reason =
"Update needed.";
117 $needs_update =
true;
118 $activation_possible =
false;
125 $inactive_reason = $lng->txt(
"cmps_needs_upgrade");
129 $inactive_reason =
"Upgrade needed.";
131 $activation_possible =
false;
133 else if ($rec[
"last_update_version"] != $version)
138 $inactive_reason = $lng->txt(
"cmps_needs_update");
142 $inactive_reason =
"Update needed.";
144 $needs_update =
true;
145 $activation_possible =
false;
148 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"] = $active;
149 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"inactive_reason"] = $inactive_reason;
150 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"] = $needs_update;
151 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"activation_possible"] = $activation_possible;
153 $this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
true;
165 function getVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
167 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
168 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"version"];
181 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
182 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_min_version"];
195 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
196 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_max_version"];
207 function getId($a_ctype, $a_cname, $a_slot_id, $a_pname)
209 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
210 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"id"];
221 function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
225 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
231 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"];
242 function exists($a_ctype, $a_cname, $a_slot_id, $a_pname)
244 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
245 return isset($this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]);
258 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
259 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"];
270 function getAllData($a_ctype, $a_cname, $a_slot_id, $a_pname)
272 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
273 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname];
282 if (!isset(self::$active_plugins[$a_ctype][$a_cname][$a_slot_id]))
284 include_once
"./Services/Component/classes/class.ilPlugin.php";
286 self::$active_plugins[$a_ctype][$a_cname][$a_slot_id] =
289 return self::$active_plugins[$a_ctype][$a_cname][$a_slot_id];
304 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
306 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
309 return self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
325 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
327 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
330 $pl = self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
331 $pl->includeClass($a_class_file_name);
344 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
345 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"learning_progress"];