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

Source for file class_edit.php

Documentation is available at class_edit.php

  1. <?php
  2. // $Id: class_edit.php 10215 2006-11-27 13:57:17Z pcool $
  3.  
  4. /*
  5. ==============================================================================
  6.     Dokeos - elearning and course management software
  7.  
  8.     Copyright (c) 2004 Dokeos S.A.
  9.     Copyright (c) 2003 Ghent University (UGent)
  10.     Copyright (c) 2001 Universite catholique de Louvain (UCL)
  11.     Copyright (c) Olivier Brouckaert
  12.  
  13.     For a full list of contributors, see "credits.txt".
  14.     The full license can be read in "license.txt".
  15.  
  16.     This program is free software; you can redistribute it and/or
  17.     modify it under the terms of the GNU General Public License
  18.     as published by the Free Software Foundation; either version 2
  19.     of the License, or (at your option) any later version.
  20.  
  21.     See the GNU General Public License for more details.
  22.  
  23.     Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  24. ==============================================================================
  25. */
  26. /**
  27. ==============================================================================
  28. *    @package dokeos.admin
  29. ==============================================================================
  30. */
  31.  
  32. // name of the language file that needs to be included 
  33. $language_file 'admin';
  34.  
  35. // resetting the course id
  36. $cidReset true;
  37.  
  38. // including some necessary dokeos files
  39. include ('../inc/global.inc.php');
  40. require_once(api_get_path(LIBRARY_PATH).'classmanager.lib.php');
  41. require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
  42.  
  43. // setting the section (for the tabs)
  44. $this_section=SECTION_PLATFORM_ADMIN;
  45.  
  46. // Access restrictions
  47.  
  48. // setting breadcrumbs
  49. $interbreadcrumb[array ("url" => 'index.php'"name" => get_lang('PlatformAdmin'));
  50. $interbreadcrumb[array ("url" => "class_list.php""name" => get_lang('AdminClasses'));
  51.  
  52. // setting the name of the tool
  53. $tool_name get_lang("AddClasses");
  54.  
  55.  
  56. $tool_name get_lang('ModifyClassInfo');
  57. $class_id intval($_GET['idclass']);
  58. $class ClassManager :: get_class_info($class_id);
  59. $form new FormValidator('edit_class','post','class_edit.php?idclass='.$class_id);
  60. $form->add_textfield('name',get_lang('ClassName'));
  61. $form->addElement('submit','submit',get_lang('Ok'));
  62. $form->setDefaults(array('name'=>$class['name']));
  63. if($form->validate())
  64. {
  65.     $values $form->exportValues();
  66.     ClassManager :: set_name($values['name']$class_id);
  67.     header('Location: class_list.php');
  68. }
  69.  
  70.  
  71. Display :: display_header($tool_name);
  72. //api_display_tool_title($tool_name);
  73. $form->display();
  74. /*
  75. ==============================================================================
  76.         FOOTER 
  77. ==============================================================================
  78. */
  79. ?>

Documentation generated on Thu, 12 Jun 2008 13:07:32 -0500 by phpDocumentor 1.4.1