25 include_once(
"./Services/Component/classes/class.ilComponent.php");
52 private final function getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname)
56 if (!$this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname])
58 include_once
"./Services/Component/classes/class.ilPluginSlot.php";
61 $plugin_php_file =
"./Customizing/global/plugins/".$a_ctype.
"/".
62 $a_cname.
"/".$slot_name.
"/".$a_pname.
"/plugin.php";
66 if (is_file($plugin_php_file))
68 include_once($plugin_php_file);
69 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
70 array(
"version" => $version,
"id" => $id,
71 "ilias_min_version" => $ilias_min_version,
72 "ilias_max_version" => $ilias_max_version,
73 "responsible" => $responsible,
74 "responsible_mail" => $responsible_mail);
77 $active = $rec[
"active"];
78 $needs_update =
false;
79 $activation_possible = !$active;
87 $inactive_reason = $lng->txt(
"cmps_needs_newer_ilias_version");
91 $inactive_reason =
"Plugin needs a newer version of ILIAS.";
93 $activation_possible =
false;
100 $inactive_reason = $lng->txt(
"cmps_needs_newer_plugin_version");
104 $inactive_reason =
"Plugin does not support current version of ILIAS. Newer version of plugin needed.";
106 $activation_possible =
false;
108 else if ($rec[
"last_update_version"] ==
"")
113 $inactive_reason = $lng->txt(
"cmps_needs_update");
117 $inactive_reason =
"Update needed.";
119 $needs_update =
true;
120 $activation_possible =
false;
127 $inactive_reason = $lng->txt(
"cmps_needs_upgrade");
131 $inactive_reason =
"Upgrade needed.";
133 $activation_possible =
false;
135 else if ($rec[
"last_update_version"] != $version)
140 $inactive_reason = $lng->txt(
"cmps_needs_update");
144 $inactive_reason =
"Update needed.";
146 $needs_update =
true;
147 $activation_possible =
false;
150 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"] = $active;
151 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"inactive_reason"] = $inactive_reason;
152 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"] = $needs_update;
153 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"activation_possible"] = $activation_possible;
155 $this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
true;
167 function getVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
169 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
170 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"version"];
183 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
184 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_min_version"];
197 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
198 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_max_version"];
209 function getId($a_ctype, $a_cname, $a_slot_id, $a_pname)
211 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
212 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"id"];
223 function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
225 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
226 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"];
237 function exists($a_ctype, $a_cname, $a_slot_id, $a_pname)
239 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
240 return isset($this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]);
253 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
254 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"];
265 function getAllData($a_ctype, $a_cname, $a_slot_id, $a_pname)
267 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
268 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname];
276 include_once
"./Services/Component/classes/class.ilPlugin.php";