dokeos-course_info
[ class tree: dokeos-course_info ] [ index: dokeos-course_info ] [ all elements ]

Source for file delete_course.php

Documentation is available at delete_course.php

  1. <?php
  2. // $Id: delete_course.php 12263 2007-05-03 13:34:40Z elixir_julian $
  3. /*
  4. ==============================================================================
  5.     Dokeos - elearning and course management software
  6.  
  7.     Copyright (c) 2004 Dokeos S.A.
  8.     Copyright (c) 2003 Ghent University (UGent)
  9.     Copyright (c) 2001 Universite catholique de Louvain (UCL)
  10.     Copyright (c) Olivier brouckaert
  11.     Copyright (c) Roan Embrechts
  12.     Copyright (c) Bart Mollet, Hogeschool Gent
  13.  
  14.     For a full list of contributors, see "credits.txt".
  15.     The full license can be read in "license.txt".
  16.  
  17.     This program is free software; you can redistribute it and/or
  18.     modify it under the terms of the GNU General Public License
  19.     as published by the Free Software Foundation; either version 2
  20.     of the License, or (at your option) any later version.
  21.  
  22.     See the GNU General Public License for more details.
  23.  
  24.     Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  25. ==============================================================================
  26. */
  27. /**
  28. ==============================================================================
  29. *    This script is about deleting a course.
  30. *    It displays a message box ('are you sure you wish to delete this course')
  31. *    and deletes the course if the user answers affirmatively
  32. *
  33. *    @package dokeos.course_info
  34. ==============================================================================
  35. */
  36. // name of the language file that needs to be included
  37. $language_file array ('admin','course_info');
  38.  
  39. include ('../inc/global.inc.php');
  40. include (api_get_path(LIBRARY_PATH).'course.lib.php');
  41.  
  42. $this_section SECTION_COURSES;
  43.  
  44. $currentCourseCode $_course['official_code'];
  45. $currentCourseName $_course['name'];
  46.  
  47. {
  48.     api_not_allowed(true);
  49. }
  50. $tool_name get_lang('DelCourse');
  51. if (isset($_GET['delete']&& $_GET['delete'== 'yes')
  52. {
  53.     CourseManager :: delete_course($_course['sysCode']);
  54.     // DELETE CONFIRMATION MESSAGE
  55.     unset ($_course);
  56.     unset ($_cid);
  57.     $noPHP_SELF true;
  58.     $message get_lang('Course')." &quot;".$currentCourseName."&quot; "."(".$currentCourseCode.") ".get_lang('HasDel');
  59.     $message .=  "<br /><br /><a href=\"../../index.php\">".get_lang('BackHome')." ".get_setting('siteName')."</a>";
  60.  
  61. // end if $delete
  62. else
  63. {
  64.     $message "&quot;".$currentCourseName."&quot; "."(".$currentCourseCode.") "."<p>".get_lang("ByDel")."</p>"."<p>"."<a href=\"maintenance.php\">".get_lang("N")."</a>"."&nbsp;&nbsp;|&nbsp;&nbsp;"."<a href=\"".api_get_self()."?delete=yes\">".get_lang("Y")."</a>"."</p>";
  65.     $interbreadcrumb[array ("url" => "maintenance.php""name" => get_lang('Maintenance'));
  66. Display :: display_header($tool_name"Settings");
  67. /*
  68. ==============================================================================
  69.         FOOTER
  70. ==============================================================================
  71. */
  72. ?>

Documentation generated on Thu, 12 Jun 2008 13:18:45 -0500 by phpDocumentor 1.4.1