postpone.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. // TODO: Is this file needed anymore?
  4. /**
  5. * MODIFY COURSE INFO
  6. * Modify course settings like:
  7. * 1. Course title
  8. * 2. Department
  9. * 3. Course description URL in the university web
  10. * Course code cannot be modified, because it gives the name for the
  11. * course database and course web directory. Professor cannot be
  12. * changed either as it determines who is allowed to modify the course.
  13. *
  14. * @author Thomas Depraetere
  15. * @author Hugues Peeters
  16. * @author Christophe Gesche
  17. *
  18. * @package chamilo.course_info
  19. */
  20. /* INIT SECTION */
  21. // Language file that needs to be included
  22. $language_file = 'postpone';
  23. //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Admin'));
  24. $htmlHeadXtra[] = "
  25. <style type=\"text/css\">
  26. <!--
  27. .month {font-weight : bold;color : #FFFFFF;background-color : #4171B5;padding-left : 15px;padding-right : 15px;}
  28. .content {position: relative; left: 25px;}
  29. -->
  30. </style>
  31. <STYLE media=\"print\" type=\"text/css\">
  32. TD {border-bottom: thin dashed Gray;}
  33. </STYLE>";
  34. require '../inc/global.inc.php';
  35. $this_section = SECTION_COURSES;
  36. Display::display_header($nameTools, 'Settings');
  37. //include api_get_path(CONFIGURATION_PATH).'postpone.conf.php';
  38. $nameTools = get_lang('Postpone');
  39. $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE);
  40. $is_allowedToEdit = $is_courseAdmin;
  41. $currentCourseID = $_course['sysCode'];
  42. $currentCourseRepository = $_course['path'];
  43. $sqlCourseExtention = "SELECT last_visit, last_edit, creation_date, expiration_date FROM ".$TABLECOURSE." WHERE code = '".$_cid."'";
  44. $resultCourseExtention = Database::query($sqlCourseExtention);
  45. $currentCourseExtentionData = Database::fetch_array($resultCourseExtention);
  46. $currentCourseLastVisit = $currentCourseExtentionData['last_visit'];
  47. $currentCourseLastEdit = $currentCourseExtentionData['last_edit'];
  48. $currentCourseCreationDate = $currentCourseExtentionData['creation_date'];
  49. $currentCourseExpirationDate = $currentCourseExtentionData['expiration_date'];
  50. // HERE YOU CAN EDIT YOUR RULES TO EXTEND THE LIFE OF COURSE
  51. // $newCourseExpirationDate = now() + $extendDelay
  52. ?>
  53. <h3>
  54. <?php echo $nameTools ?>
  55. </h3>
  56. <?php //echo get_lang('SubTitle'); ?>
  57. This script would be called by
  58. professor,
  59. or administrator,
  60. or other script
  61. to give more time to a course before expiration.
  62. <?php
  63. Display::display_footer();