gradebooktable.class.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. <?php
  2. /* For licensing terms, see license.txt */
  3. /**
  4. * Script
  5. * @package chamilo.gradebook
  6. */
  7. /**
  8. * Init
  9. */
  10. require_once dirname(__FILE__).'/../../../inc/global.inc.php';
  11. require_once dirname(__FILE__).'/../be.inc.php';
  12. /**
  13. * Table to display categories, evaluations and links
  14. * @author Stijn Konings
  15. * @author Bert Steppé (refactored, optimised)
  16. * @package chamilo.gradebook
  17. */
  18. class GradebookTable extends SortableTable {
  19. private $currentcat;
  20. private $datagen;
  21. private $evals_links;
  22. public $cats;
  23. /**
  24. * Constructor
  25. */
  26. function GradebookTable ($currentcat, $cats = array(), $evals = array(), $links = array(), $addparams = null) {
  27. //$status = CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
  28. parent :: __construct ('gradebooklist', null, null, (api_is_allowed_to_edit()?1:0));
  29. $this->evals_links = array_merge($evals, $links);
  30. $this->currentcat = $currentcat;
  31. $this->cats = $cats;
  32. $this->datagen = new GradebookDataGenerator($cats, $evals, $links);
  33. if (isset($addparams)) {
  34. $this->set_additional_parameters($addparams);
  35. }
  36. $column= 0;
  37. if (api_is_allowed_to_edit(null, true)) {
  38. $this->set_header($column++,'','','width="25px"');
  39. }
  40. $this->set_header($column++, get_lang('Type'),'','width="35px"');
  41. $this->set_header($column++, get_lang('Name'), false);
  42. $this->set_header($column++, get_lang('Description'), false);
  43. if (api_is_allowed_to_edit(null, true)) {
  44. $this->set_header($column++, get_lang('Weight'),'','width="100px"');
  45. } else {
  46. $this->set_header($column++, get_lang('Weight'), false);
  47. $this->set_header($column++, get_lang('Result'), false);
  48. if (!empty($cats)) {
  49. $this->set_header($column++, get_lang('Actions'), false);
  50. }
  51. }
  52. //Desactivates the odd/even alt rows in order that the +/- buttons work see #4047
  53. $this->odd_even_rows_enabled = false;
  54. /*if (api_is_allowed_to_edit(null, true)) {
  55. //$this->set_header($column++, get_lang('CreationDate'),true, 'width="100px"');
  56. } elseif (($status<>1) && !api_is_allowed_to_edit() && (!isset($_GET['selectcat']) || $_GET['selectcat']==0)) {
  57. //$this->set_header($column++, get_lang('Date'),true, 'width="100px"');
  58. }*/
  59. //admins get an edit column
  60. if (api_is_allowed_to_edit(null, true)) {
  61. $this->set_header($column++, get_lang('Modify'), false, 'width="195px"');
  62. //actions on multiple selected documents
  63. $this->set_form_actions(array (
  64. 'setvisible' => get_lang('SetVisible'),
  65. 'setinvisible' => get_lang('SetInvisible'),
  66. 'deleted' => get_lang('DeleteSelected')
  67. ));
  68. } else {
  69. if (empty($_GET['selectcat']) && !api_is_allowed_to_edit()) {
  70. $this->set_header($column++, get_lang('Certificates'),false);
  71. } else {
  72. //$evals_links = array_merge($evals, $links);
  73. //if (count($evals_links)>0) {
  74. //$this->set_header($column++, get_lang('Results'), false);
  75. //}
  76. }
  77. }
  78. }
  79. function get_data() {
  80. return $this->datagen;
  81. }
  82. /**
  83. * Function used by SortableTable to get total number of items in the table
  84. */
  85. function get_total_number_of_items() {
  86. return $this->datagen->get_total_items_count();
  87. }
  88. /**
  89. * Function used by SortableTable to generate the data to display
  90. */
  91. function get_table_data($from = 1, $per_page = null, $column = null, $direction = null, $sort = null) {
  92. //variables load in index.php
  93. global $my_score_in_gradebook, $certificate_min_score;
  94. $scoretotal = 0;
  95. // determine sorting type
  96. $col_adjust = (api_is_allowed_to_edit() ? 1 : 0);
  97. // By id
  98. $this->column = 5;
  99. switch ($this->column) {
  100. // Type
  101. case (0 + $col_adjust) :
  102. $sorting = GradebookDataGenerator :: GDG_SORT_TYPE;
  103. break;
  104. case (1 + $col_adjust) :
  105. $sorting = GradebookDataGenerator :: GDG_SORT_NAME;
  106. break;
  107. case (2 + $col_adjust) :
  108. $sorting = GradebookDataGenerator :: GDG_SORT_DESCRIPTION;
  109. break;
  110. case (3 + $col_adjust) :
  111. $sorting = GradebookDataGenerator :: GDG_SORT_WEIGHT;
  112. break;
  113. case (4 + $col_adjust) :
  114. $sorting = GradebookDataGenerator :: GDG_SORT_DATE;
  115. case (5 + $col_adjust) :
  116. $sorting = GradebookDataGenerator :: GDG_SORT_ID;
  117. break;
  118. }
  119. if ($this->direction == 'DESC') {
  120. $sorting |= GradebookDataGenerator :: GDG_SORT_DESC;
  121. } else {
  122. $sorting |= GradebookDataGenerator :: GDG_SORT_ASC;
  123. }
  124. //status of user in course
  125. $user_id = api_get_user_id();
  126. $course_code = api_get_course_id();
  127. $courseId = api_get_course_int_id();
  128. $session_id = api_get_session_id();
  129. $status_user = api_get_status_of_user_in_course($user_id, $courseId);
  130. $data_array = $this->datagen->get_data($sorting, $from, $this->per_page);
  131. // generate the data to display
  132. $sortable_data = array();
  133. $weight_total_links = 0;
  134. $main_categories = array();
  135. $main_cat = Category :: load(null, null, $course_code, null, null, $session_id, false);
  136. $total_categories_weight = 0;
  137. $scoredisplay = ScoreDisplay :: instance();
  138. //Categories
  139. foreach ($data_array as $data) {
  140. // list of items inside the gradebook (exercises, lps, forums, etc)
  141. $row = array();
  142. $item = $item_category = $data[0];
  143. $id = $item->get_id();
  144. //if the item is invisible, wrap it in a span with class invisible
  145. $invisibility_span_open = (api_is_allowed_to_edit() && $item->is_visible() == '0') ? '<span class="invisible">' : '';
  146. $invisibility_span_close = (api_is_allowed_to_edit() && $item->is_visible() == '0') ? '</span>' : '';
  147. if (api_is_allowed_to_edit(null, true)) {
  148. //id
  149. $row[] = $this->build_id_column($item);
  150. }
  151. //Type
  152. $row[] = $this->build_type_column($item);
  153. //Name
  154. if (get_class($item) == 'Category') {
  155. $row[] = $invisibility_span_open.'<h3>'.$item->get_name().'</h3>'.$invisibility_span_close;
  156. $main_categories[$item->get_id()]['name'] = $item->get_name();
  157. } else {
  158. $row[] = $invisibility_span_open.$this->build_name_link($item) . $invisibility_span_close;
  159. $main_categories[$item->get_id()]['name'] = $this->build_name_link($item);
  160. }
  161. $main_categories[$item->get_id()]['weight']= $item->get_weight();
  162. $total_categories_weight += $item->get_weight();
  163. //Description
  164. $row[] = $invisibility_span_open.$data[2].$invisibility_span_close;
  165. //Weight
  166. //$row[] = $invisibility_span_open .Display::tag('h4', $data['3'] .' / '.$this->currentcat->get_weight()).$invisibility_span_close;
  167. //$average = $data['3']/$this->currentcat->get_weight()*100;
  168. $average = $scoredisplay->display_score(array($data['3'], $this->currentcat->get_weight()), SCORE_SIMPLE, SCORE_BOTH, true);
  169. if (api_is_allowed_to_edit(null, true)) {
  170. $row[] = $invisibility_span_open .Display::tag('h4', $average).$invisibility_span_close;
  171. } else {
  172. $row[] = $invisibility_span_open .$average.$invisibility_span_close;
  173. }
  174. $category_weight = $item->get_weight();
  175. if (api_is_allowed_to_edit(null, true)) {
  176. $weight_total_links += $data[3];
  177. } else {
  178. $cattotal = Category :: load($_GET['selectcat']);
  179. $scoretotal = $cattotal[0]->calc_score(api_get_user_id());
  180. $item_value = $scoredisplay->display_score($scoretotal, SCORE_SIMPLE);
  181. }
  182. //Date
  183. //$row[] = $invisibility_span_open.$data[4].$invisibility_span_close;
  184. //Edit (for admins)
  185. if (api_is_allowed_to_edit(null, true)) {
  186. $cat = new Category();
  187. $show_message = $cat->show_message_resource_delete($item->get_course_code());
  188. if ($show_message === false) {
  189. $row[] = $this->build_edit_column($item);
  190. }
  191. } else {
  192. //students get the results and certificates columns
  193. if (count($this->evals_links) > 0 && $status_user != 1) {
  194. $value_data = isset($data[4]) ? $data[4] : null;
  195. if (!is_null($value_data)) {
  196. $row[] = Display::tag('h4', $value_data);
  197. } else {
  198. $row[] = $this->build_edit_column($item);
  199. }
  200. } else {
  201. $score = $item->calc_score(api_get_user_id());
  202. if (!empty($score[1])) {
  203. $complete_score = $scoredisplay->display_score($score, SCORE_DIV_PERCENT);
  204. $score = $score[0]/$score[1]*$item->get_weight();
  205. $score = $scoredisplay->display_score(array($score, null), SCORE_SIMPLE);
  206. $row[] = Display::tip($score, $complete_score);
  207. } else {
  208. $row[] = '-';
  209. }
  210. if (!empty($this->cats)) {
  211. $row[] = $this->build_edit_column($item);
  212. }
  213. }
  214. }
  215. //Category added
  216. $sortable_data[] = $row;
  217. // Loading childrens
  218. if (get_class($item) == 'Category') {
  219. $stud_id = api_get_user_id();
  220. $course_code = api_get_course_id();
  221. $session_id = api_get_session_id();
  222. $parent_id = $item->get_id();
  223. $cats = Category :: load ($parent_id, null, null, null, null, null);
  224. $allcat = $cats[0]->get_subcategories($stud_id, $course_code, $session_id);
  225. $alleval = $cats[0]->get_evaluations($stud_id);
  226. $alllink = $cats[0]->get_links($stud_id);
  227. $sub_cat_info = new GradebookDataGenerator($allcat, $alleval, $alllink);
  228. $data_array = $sub_cat_info->get_data($sorting, $from, $this->per_page);
  229. $total_weight = 0;
  230. //Links
  231. foreach ($data_array as $data) {
  232. $row = array();
  233. $item = $data[0];
  234. $id = $item->get_id();
  235. //if the item is invisible, wrap it in a span with class invisible
  236. $invisibility_span_open = (api_is_allowed_to_edit() && $item->is_visible() == '0') ? '<span class="invisible">' : '';
  237. $invisibility_span_close = (api_is_allowed_to_edit() && $item->is_visible() == '0') ? '</span>' : '';
  238. $main_categories[$parent_id]['children'][$item->get_id()]['name'] = $item->get_name();
  239. $main_categories[$parent_id]['children'][$item->get_id()]['weight'] = $item->get_weight();
  240. if (api_is_allowed_to_edit(null, true)) {
  241. $row[] = $this->build_id_column($item);
  242. }
  243. $row[] = $this->build_type_column($item, array('style' => 'padding-left:5px'));
  244. //Name
  245. $row[] = $invisibility_span_open."&nbsp;&nbsp;&nbsp; ".$this->build_name_link($item) . $invisibility_span_close;
  246. //Description
  247. $row[] = $invisibility_span_open.$data[2].$invisibility_span_close;
  248. //Weight
  249. //$weight = $data[3]/$category_weight*$main_cat[0]->get_weight();
  250. /*$weight = $category_weight * $data[3] / $main_cat[0]->get_weight();
  251. $weight = $main_cat[0]->get_weight()*$weight/$category_weight;*/
  252. $weight = $data[3];
  253. //$extra = " - $data[3] $category_weight -".$main_cat[0]->get_weight();
  254. $total_weight += $weight;
  255. $row[] = $invisibility_span_open.$weight.$extra.$invisibility_span_close;
  256. if (api_is_allowed_to_edit(null, true)) {
  257. //$weight_total_links += intval($data[3]);
  258. } else {
  259. $cattotal = Category :: load($_GET['selectcat']);
  260. $scoretotal = $cattotal[0]->calc_score(api_get_user_id());
  261. $item_value = $scoretotal[0];
  262. }
  263. //Date
  264. //$row[] = $invisibility_span_open.$data[4].$invisibility_span_close;
  265. //Admins get an edit column
  266. if (api_is_allowed_to_edit(null, true)) {
  267. $cat = new Category();
  268. $show_message = $cat->show_message_resource_delete($item->get_course_code());
  269. if ($show_message === false) {
  270. $row[] = $this->build_edit_column($item);
  271. }
  272. } else {
  273. //students get the results and certificates columns
  274. $eval_n_links = array_merge($alleval, $alllink);
  275. if (count($eval_n_links)> 0 && $status_user!=1 ) {
  276. $value_data = isset($data[4]) ? $data[4] : null;
  277. if (!is_null($value_data)) {
  278. $score = $item->calc_score(api_get_user_id());
  279. $new_score = $data[3]* $score[0] / $score[1];
  280. $row[] = Display::tip($new_score, $data[4]);
  281. }
  282. }
  283. if (!empty($cats)) {
  284. $row[] = null;
  285. }
  286. }
  287. $row['child_of'] = $parent_id;
  288. $sortable_data[] = $row;
  289. }
  290. //"Warning row"
  291. if (!empty($data_array)) {
  292. if (api_is_allowed_to_edit()) {
  293. // Compare the category weight to the sum of all weights inside the category
  294. if (intval($total_weight) == $category_weight) {
  295. $label = null;
  296. $total = score_badges(array($total_weight.' / '.$category_weight, '100'));
  297. } else {
  298. $label = Display::return_icon('warning.png', sprintf(get_lang('TotalWeightMustBeX'), $category_weight) );
  299. $total = Display::badge($total_weight.' / '.$category_weight, 'warning');
  300. }
  301. $row = array(null, null, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<h5>".get_lang('SubTotal').'</h5>',null, $total.' '.$label, 'child_of' =>$parent_id);
  302. $sortable_data[] = $row;
  303. }
  304. }
  305. }
  306. } //end looping categories
  307. if (api_is_allowed_to_edit()) {
  308. if (count($main_cat) > 1) {
  309. $main_weight = intval($main_cat[0]->get_weight());
  310. if (intval($total_categories_weight) == $main_weight) {
  311. $total = score_badges(array($total_categories_weight.' / '.$main_weight, '100'));
  312. } else {
  313. $total = Display::badge($total_categories_weight.' / '.$main_weight, 'warning');
  314. }
  315. $row = array(null, null, '<h3>'.get_lang('Total').'</h3>', null, $total);
  316. $sortable_data[] = $row;
  317. }
  318. }
  319. // warning messages
  320. $view = isset($_GET['view']) ? $_GET['view']: null;
  321. if (api_is_allowed_to_edit()) {
  322. if (isset($_GET['selectcat']) && $_GET['selectcat'] > 0 && $view <> 'presence') {
  323. $id_cat = intval($_GET['selectcat']);
  324. $category = Category :: load($id_cat);
  325. //$weight_category = intval($this->build_weight($category[0]));
  326. $weight_category = intval($this->build_weight($category[0]));
  327. $course_code = $this->build_course_code($category[0]);
  328. $weight_total_links = round($weight_total_links);
  329. if ($weight_total_links > $weight_category || $weight_total_links < $weight_category || $weight_total_links > $weight_category) {
  330. $warning_message = sprintf(get_lang('TotalWeightMustBeX'), $weight_category);
  331. $modify_icons = '<a class="right_link" href="gradebook_edit_cat.php?editcat='.$id_cat.'&cidReq='.$course_code.'">'.Display::return_icon('edit.png', $warning_message, array(), ICON_SIZE_SMALL).'</a>';
  332. $warning_message .= $modify_icons;
  333. Display::display_warning_message($warning_message,false);
  334. }
  335. $content_html = DocumentManager::replace_user_info_into_html(api_get_user_id(), $course_code);
  336. if (!empty($content_html)) {
  337. $new_content = explode('</head>',$content_html['content']);
  338. }
  339. if (empty($new_content[0])) {
  340. $warning_message = get_lang('ThereIsNotACertificateAvailableByDefault');
  341. $cert_icon = '<a class="right_link" href="../document/document.php?curdirpath=/certificates&'.$course_code.'&origin=gradebook&selectcat=' . $id_cat . '">'.Display::return_icon('certificate.png', get_lang('AttachCertificate'), array(), ICON_SIZE_SMALL).'</a>';
  342. Display::display_warning_message($warning_message.$cert_icon,false);
  343. }
  344. }
  345. if (empty($_GET['selectcat'])) {
  346. $categories = Category :: load();
  347. $weight_categories = $certificate_min_scores = $course_codes = array();
  348. foreach ($categories as $category) {
  349. $course_code_category = $this->build_course_code($category);
  350. if (!empty($course_code)) {
  351. if ($course_code_category == $course_code) {
  352. $weight_categories[] = intval($this->build_weight($category));
  353. $certificate_min_scores[] = intval($this->build_certificate_min_score($category));
  354. $course_codes[] = $course_code;
  355. break;
  356. }
  357. } else {
  358. $weight_categories[] = intval($this->build_weight($category));
  359. $certificate_min_scores[] = intval($this->build_certificate_min_score($category));
  360. $course_codes[] = $course_code_category;
  361. }
  362. }
  363. if (is_array($weight_categories) && is_array($certificate_min_scores) && is_array($course_codes)) {
  364. $warning_message = '';
  365. for ($x = 0; $x<count($weight_categories);$x++) {
  366. $weight_category = intval($weight_categories[$x]);
  367. $certificate_min_score = intval($certificate_min_scores[$x]);
  368. $course_code = $course_codes[$x];
  369. if (empty($certificate_min_score) || ($certificate_min_score > $weight_category)) {
  370. $warning_message .= $course_code .'&nbsp;-&nbsp;'.get_lang('CertificateMinimunScoreIsRequiredAndMustNotBeMoreThan').'&nbsp;'.$weight_category.'<br />';
  371. }
  372. }
  373. if (!empty($warning_message)) {
  374. Display::display_warning_message($warning_message,false);
  375. }
  376. }
  377. }
  378. }
  379. return $sortable_data;
  380. }
  381. // Other functions
  382. private function build_certificate_min_score ($item) {
  383. return $item->get_certificate_min_score();
  384. }
  385. private function build_weight ($item) {
  386. return $item->get_weight();
  387. }
  388. private function build_course_code ($item) {
  389. return $item->get_course_code();
  390. }
  391. private function build_id_column ($item) {
  392. switch ($item->get_item_type()) {
  393. // category
  394. case 'C' :
  395. return 'CATE' . $item->get_id();
  396. // evaluation
  397. case 'E' :
  398. return 'EVAL' . $item->get_id();
  399. // link
  400. case 'L' :
  401. return 'LINK' . $item->get_id();
  402. }
  403. }
  404. private function build_type_column ($item, $attributes = array()) {
  405. return build_type_icon_tag($item->get_icon_name(), $attributes);
  406. }
  407. /**
  408. *
  409. * Generate name column
  410. * @param unknown_type $item
  411. * @return string
  412. */
  413. private function build_name_link ($item) {
  414. //$session_id = api_get_session_id();
  415. switch ($item->get_item_type()) {
  416. // category
  417. case 'C' :
  418. $prms_uri='?selectcat=' . $item->get_id() . '&amp;view='.Security::remove_XSS($_GET['view']);
  419. if (isset($_GET['isStudentView'])) {
  420. if ( isset($is_student) || ( isset($_SESSION['studentview']) && $_SESSION['studentview']=='studentview') ) {
  421. $prms_uri=$prms_uri.'&amp;isStudentView='.Security::remove_XSS($_GET['isStudentView']);
  422. }
  423. }
  424. $cat = new Category();
  425. $show_message=$cat->show_message_resource_delete($item->get_course_code());
  426. return '&nbsp;<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).$prms_uri.'">'
  427. . $item->get_name()
  428. . '</a>'
  429. . ($item->is_course() ? ' &nbsp;[' . $item->get_course_code() . ']'.$show_message : '');
  430. // evaluation
  431. case 'E' :
  432. $cat = new Category();
  433. $course_id = CourseManager::get_course_by_category($_GET['selectcat']);
  434. $show_message = $cat->show_message_resource_delete($course_id);
  435. // course/platform admin can go to the view_results page
  436. if (api_is_allowed_to_edit() && $show_message===false) {
  437. if ($item->get_type() == 'presence') {
  438. return '&nbsp;'
  439. . '<a href="gradebook_view_result.php?cidReq='.$course_id.'&amp;selecteval=' . $item->get_id() . '">'
  440. . $item->get_name()
  441. . '</a>';
  442. } else {
  443. return '&nbsp;'
  444. . '<a href="gradebook_view_result.php?cidReq='.$course_id.'&amp;selecteval=' . $item->get_id() . '">'
  445. . $item->get_name()
  446. . '</a>&nbsp;'.Display::label(get_lang('Evaluation'));
  447. }
  448. } elseif (ScoreDisplay :: instance()->is_custom() && $show_message===false) {
  449. // students can go to the statistics page (if custom display enabled)
  450. return '&nbsp;'
  451. . '<a href="gradebook_statistics.php?selecteval=' . $item->get_id() . '">'
  452. . $item->get_name()
  453. . '</a>';
  454. } elseif ($show_message===false && !api_is_allowed_to_edit() && !(ScoreDisplay :: instance()->is_custom())) {
  455. return '&nbsp;'
  456. . '<a href="gradebook_statistics.php?selecteval=' . $item->get_id() . '">'
  457. . $item->get_name()
  458. . '</a>';
  459. } else {
  460. return '['.get_lang('Evaluation').']&nbsp;&nbsp;'.$item->get_name().$show_message;
  461. }
  462. // link
  463. case 'L' :
  464. $cat = new Category();
  465. $course_id = CourseManager::get_course_by_category($_GET['selectcat']);
  466. $show_message = $cat->show_message_resource_delete($course_id);
  467. $url = $item->get_link();
  468. if (isset($url) && $show_message===false) {
  469. $text = '&nbsp;<a href="' . $item->get_link() . '">'
  470. . $item->get_name()
  471. . '</a>';
  472. } else {
  473. $text = $item->get_name();
  474. }
  475. $text .= "&nbsp;".Display::label($item->get_type_name(), 'info').$show_message;
  476. $cc = $this->currentcat->get_course_code();
  477. if (empty($cc)) {
  478. $text .= '&nbsp;[<a href="'.api_get_path(REL_COURSE_PATH).$item->get_course_code().'/">'.$item->get_course_code().'</a>]';
  479. }
  480. return $text;
  481. }
  482. }
  483. private function build_edit_column($item) {
  484. switch ($item->get_item_type()) {
  485. // category
  486. case 'C' :
  487. return build_edit_icons_cat($item, $this->currentcat);
  488. // evaluation
  489. case 'E' :
  490. return build_edit_icons_eval($item, $this->currentcat->get_id());
  491. // link
  492. case 'L' :
  493. return build_edit_icons_link($item, $this->currentcat->get_id());
  494. }
  495. }
  496. }