postpone.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php // $Id: postpone.php 10204 2006-11-26 20:46:53Z pcool $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004 Dokeos S.A.
  6. Copyright (c) 2003 Ghent University (UGent)
  7. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  8. For a full list of contributors, see "credits.txt".
  9. The full license can be read in "license.txt".
  10. This program is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU General Public License
  12. as published by the Free Software Foundation; either version 2
  13. of the License, or (at your option) any later version.
  14. See the GNU General Public License for more details.
  15. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  16. Mail: info@dokeos.com
  17. ==============================================================================
  18. */
  19. /**
  20. ==============================================================================
  21. * MODIFY COURSE INFO |
  22. * Modify course settings like: |
  23. * 1. Course title |
  24. * 2. Department |
  25. * 3. Course description URL in the university web |
  26. * Course code cannot be modified, because it gives the name for the |
  27. * course database and course web directory. Professor cannot be |
  28. * changed either as it determines who is allowed to modify the course. |
  29. *
  30. *
  31. * @author Thomas Depraetere
  32. * @author Hugues Peeters
  33. * @author Christophe Gesche
  34. *
  35. * @package dokeos.course_info
  36. ==============================================================================
  37. */
  38. /*
  39. ==============================================================================
  40. INIT SECTION
  41. ==============================================================================
  42. */
  43. // name of the language file that needs to be included
  44. $language_file = "postpone";
  45. //$interbreadcrumb[]= array ("url"=>"index.php", "name"=> get_lang('Admin'));
  46. $htmlHeadXtra[] = "
  47. <style type=\"text/css\">
  48. <!--
  49. .month {font-weight : bold;color : #FFFFFF;background-color : #4171B5;padding-left : 15px;padding-right : 15px;}
  50. .content {position: relative; left: 25px;}
  51. -->
  52. </style>
  53. <STYLE media=\"print\" type=\"text/css\">
  54. TD {border-bottom: thin dashed Gray;}
  55. </STYLE>";
  56. include('../inc/global.inc.php');
  57. $this_section=SECTION_COURSES;
  58. include(api_get_path(LIBRARY_PATH).'debug.lib.inc.php');
  59. Display::display_header($nameTools,"Settings");
  60. //include(api_get_path(CONFIGURATION_PATH)."postpone.conf.php");
  61. $nameTools = get_lang('Postpone');
  62. $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE);
  63. $is_allowedToEdit = $is_courseAdmin;
  64. $currentCourseID = $_course['sysCode'];
  65. $currentCourseRepository = $_course["path"];
  66. $sqlCourseExtention = "SELECT last_visit, last_edit, creation_date, expiration_date FROM ".$TABLECOURSE." WHERE code = '".$_cid."'";
  67. $resultCourseExtention = api_sql_query($sqlCourseExtention,__FILE__,__LINE__);
  68. $currentCourseExtentionData = mysql_fetch_array($resultCourseExtention);
  69. $currentCourseLastVisit = $currentCourseExtentionData["last_visit"];
  70. $currentCourseLastEdit = $currentCourseExtentionData["last_edit"];
  71. $currentCourseCreationDate = $currentCourseExtentionData["creation_date"];
  72. $currentCourseExpirationDate = $currentCourseExtentionData["expiration_date"];
  73. // HERE YOU CAN EDIT YOUR RULES TO EXTEND THE LIFE OF COURSE
  74. // $newCourseExpirationDate = now() + $extendDelay
  75. ?>
  76. <h3>
  77. <?php echo $nameTools ?>
  78. </h3>
  79. <?php //echo get_lang('SubTitle'); ?>
  80. This script would be called by
  81. professor,
  82. or administrator,
  83. or other script
  84. to give more time to a course before expiration.
  85. <?php
  86. Display::display_footer();
  87. ?>