postpone.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php // $Id: postpone.php 9246 2006-09-25 13:24:53Z bmol $
  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. $langFile = "postpone";
  44. //$interbreadcrumb[]= array ("url"=>"index.php", "name"=> get_lang('Admin'));
  45. $htmlHeadXtra[] = "
  46. <style type=\"text/css\">
  47. <!--
  48. .month {font-weight : bold;color : #FFFFFF;background-color : #4171B5;padding-left : 15px;padding-right : 15px;}
  49. .content {position: relative; left: 25px;}
  50. -->
  51. </style>
  52. <STYLE media=\"print\" type=\"text/css\">
  53. TD {border-bottom: thin dashed Gray;}
  54. </STYLE>";
  55. include('../inc/global.inc.php');
  56. $this_section=SECTION_COURSES;
  57. include(api_get_path(LIBRARY_PATH).'debug.lib.inc.php');
  58. Display::display_header($nameTools,"Settings");
  59. //include(api_get_path(CONFIGURATION_PATH)."postpone.conf.php");
  60. $nameTools = get_lang('Postpone');
  61. $TABLECOURSE = Database::get_main_table(MAIN_COURSE_TABLE);
  62. $is_allowedToEdit = $is_courseAdmin;
  63. $currentCourseID = $_course['sysCode'];
  64. $currentCourseRepository = $_course["path"];
  65. $sqlCourseExtention = "SELECT last_visit, last_edit, creation_date, expiration_date FROM ".$TABLECOURSE." WHERE code = '".$_cid."'";
  66. $resultCourseExtention = api_sql_query($sqlCourseExtention,__FILE__,__LINE__);
  67. $currentCourseExtentionData = mysql_fetch_array($resultCourseExtention);
  68. $currentCourseLastVisit = $currentCourseExtentionData["last_visit"];
  69. $currentCourseLastEdit = $currentCourseExtentionData["last_edit"];
  70. $currentCourseCreationDate = $currentCourseExtentionData["creation_date"];
  71. $currentCourseExpirationDate = $currentCourseExtentionData["expiration_date"];
  72. // HERE YOU CAN EDIT YOUR RULES TO EXTEND THE LIFE OF COURSE
  73. // $newCourseExpirationDate = now() + $extendDelay
  74. ?>
  75. <h3>
  76. <?php echo $nameTools ?>
  77. </h3>
  78. <?php echo get_lang('SubTitle'); ?>
  79. this script would be called by
  80. professor,
  81. or administrator,
  82. or other script
  83. to give more time to a course before expiration
  84. <?php
  85. Display::display_footer();
  86. ?>