gradebook_showlog_eval.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Script
  5. * @package chamilo.gradebook
  6. */
  7. //$cidReset = true;
  8. require_once '../inc/global.inc.php';
  9. api_block_anonymous_users();
  10. GradebookUtils::block_students();
  11. $interbreadcrumb[] = array (
  12. 'url' => $_SESSION['gradebook_dest'].'?',
  13. 'name' => get_lang('Gradebook'
  14. ));
  15. $interbreadcrumb[] = array (
  16. 'url' => $_SESSION['gradebook_dest'].'?selectcat='.Security::remove_XSS($_GET['selectcat']),
  17. 'name' => get_lang('Details'
  18. ));
  19. $interbreadcrumb[] = array (
  20. 'url' => 'gradebook_showlog_eval.php?visiblelog='.Security::remove_XSS($_GET['visiblelog']).'&amp;selectcat='.Security::remove_XSS($_GET['selectcat']),
  21. 'name' => get_lang('GradebookQualifyLog')
  22. );
  23. $this_section = SECTION_COURSES;
  24. Display :: display_header('');
  25. echo Display::page_header(get_lang('GradebookQualifyLog'));
  26. $t_linkeval_log = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
  27. $t_user= Database :: get_main_table(TABLE_MAIN_USER);
  28. $visible_log=Security::remove_XSS($_GET['visiblelog']);
  29. $evaledit = Evaluation :: load($visible_log);
  30. $sql="SELECT le.name,le.description,le.weight,le.visible,le.type,le.created_at,us.username FROM ".$t_linkeval_log." le INNER JOIN ".$t_user." us
  31. ON le.user_id_log=us.user_id where id_linkeval_log=".$evaledit[0]->get_id()." and type='evaluation';";
  32. $result=Database::query($sql);
  33. $list_info=array();
  34. while ($row=Database::fetch_row($result)) {
  35. $list_info[]=$row;
  36. }
  37. foreach($list_info as $key => $info_log) {
  38. $list_info[$key][5]=($info_log[5]) ? api_convert_and_format_date($info_log[5]) : 'N/A';
  39. $list_info[$key][3]=($info_log[3]==1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible');
  40. }
  41. $parameters=array('visiblelog'=>$visible_log,'selectcat'=>intval($_GET['selectcat']));
  42. $table = new SortableTableFromArrayConfig($list_info, 1,20,'gradebookeval');
  43. $table->set_additional_parameters($parameters);
  44. $table->set_header(0, get_lang('GradebookNameLog'));
  45. $table->set_header(1, get_lang('GradebookDescriptionLog'));
  46. $table->set_header(2, get_lang('GradebookPreviousWeight'));
  47. $table->set_header(3, get_lang('GradebookVisibilityLog'));
  48. $table->set_header(4, get_lang('ResourceType'));
  49. $table->set_header(5, get_lang('Date'));
  50. $table->set_header(6, get_lang('GradebookWhoChangedItLog'));
  51. $table->display();
  52. Display :: display_footer();