postpone.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. /**
  21. * Code
  22. */
  23. /* INIT SECTION */
  24. // Language file that needs to be included
  25. $language_file = 'postpone';
  26. //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Admin'));
  27. $htmlHeadXtra[] = "
  28. <style type=\"text/css\">
  29. <!--
  30. .month {font-weight : bold;color : #FFFFFF;background-color : #4171B5;padding-left : 15px;padding-right : 15px;}
  31. .content {position: relative; left: 25px;}
  32. -->
  33. </style>
  34. <STYLE media=\"print\" type=\"text/css\">
  35. TD {border-bottom: thin dashed Gray;}
  36. </STYLE>";
  37. require '../inc/global.inc.php';
  38. $this_section = SECTION_COURSES;
  39. Display::display_header($nameTools, 'Settings');
  40. //include api_get_path(CONFIGURATION_PATH).'postpone.conf.php';
  41. $nameTools = get_lang('Postpone');
  42. $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE);
  43. $is_allowedToEdit = $is_courseAdmin;
  44. $currentCourseID = $_course['sysCode'];
  45. $currentCourseRepository = $_course['path'];
  46. $sqlCourseExtention = "SELECT last_visit, last_edit, creation_date, expiration_date FROM ".$TABLECOURSE." WHERE code = '".$_cid."'";
  47. $resultCourseExtention = Database::query($sqlCourseExtention);
  48. $currentCourseExtentionData = Database::fetch_array($resultCourseExtention);
  49. $currentCourseLastVisit = $currentCourseExtentionData['last_visit'];
  50. $currentCourseLastEdit = $currentCourseExtentionData['last_edit'];
  51. $currentCourseCreationDate = $currentCourseExtentionData['creation_date'];
  52. $currentCourseExpirationDate = $currentCourseExtentionData['expiration_date'];
  53. // HERE YOU CAN EDIT YOUR RULES TO EXTEND THE LIFE OF COURSE
  54. // $newCourseExpirationDate = now() + $extendDelay
  55. ?>
  56. <h3>
  57. <?php echo $nameTools ?>
  58. </h3>
  59. This script would be called by
  60. professor,
  61. or administrator,
  62. or other script
  63. to give more time to a course before expiration.
  64. <?php
  65. Display::display_footer();