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

Source for file class_information.php

Documentation is available at class_information.php

  1. <?php // $Id: class_information.php 14280 2008-02-11 10:51:59Z elixir_inter $
  2. /*
  3. ==============================================================================
  4.     Dokeos - elearning and course management software
  5.  
  6.     Copyright (c) 2004 Dokeos S.A.
  7.     Copyright (c) 2003 Ghent University (UGent)
  8.     Copyright (c) 2001 Universite catholique de Louvain (UCL)
  9.     Copyright (c) Olivier Brouckaert
  10.  
  11.     For a full list of contributors, see "credits.txt".
  12.     The full license can be read in "license.txt".
  13.  
  14.     This program is free software; you can redistribute it and/or
  15.     modify it under the terms of the GNU General Public License
  16.     as published by the Free Software Foundation; either version 2
  17.     of the License, or (at your option) any later version.
  18.  
  19.     See the GNU General Public License for more details.
  20.  
  21.     Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  22. ==============================================================================
  23. */
  24. /**
  25. ============================================================================== 
  26. *    @author     Bart Mollet
  27. *    @package dokeos.admin
  28. ============================================================================== 
  29. */
  30.  
  31. /*
  32. ==============================================================================
  33.         INIT SECTION
  34. ==============================================================================
  35. */ 
  36.  
  37. // name of the language file that needs to be included 
  38. $language_file='admin';
  39.  
  40. $cidReset=true;
  41.  
  42. require('../inc/global.inc.php');
  43. $this_section=SECTION_PLATFORM_ADMIN;
  44.  
  45. require(api_get_path(LIBRARY_PATH).'classmanager.lib.php');
  46. if!isset($_GET['id']))
  47. {
  48.     api_not_allowed();    
  49. }
  50. $interbreadcrumb[array ("url" => 'index.php'"name" => get_lang('PlatformAdmin'));
  51. $interbreadcrumb[array ("url" => 'class_list.php'"name" => get_lang('AdminClasses'));
  52. $class_id $_GET['id'];
  53. $class ClassManager::get_class_info($class_id);
  54.  
  55. $tool_name $class['name'];
  56. Display::display_header($tool_name);
  57. //api_display_tool_title($tool_name);
  58. /**
  59.  * Show all users subscribed in this class
  60.  */
  61. echo '<h4>'.get_lang('Users').'</h4>';
  62. echo '<blockquote>';
  63.  
  64. $users ClassManager::get_users($class_id);
  65. ifcount($users0)
  66. {
  67. $table_header[array (get_lang('OfficialCode')true);
  68. $table_header[array (get_lang('FirstName')true);
  69. $table_header[array (get_lang('LastName')true);
  70. $table_header[array (get_lang('Email')true);
  71. $table_header[array (get_lang('Status')true);
  72. $table_header[array (''false);
  73. $data array();
  74. foreach($users as $index => $user)
  75. {
  76.     $row array ();
  77.     $row[$user['official_code'];
  78.     $row[$user['firstname'];
  79.     $row[$user['lastname'];
  80.     $row[Display :: encrypted_mailto_link($user['email']$user['email']);
  81.     $row[$user['status'== get_lang('Student'get_lang('Teacher');
  82.     $row['<a href="user_information.php?user_id='.$user['user_id'].'"><img src="../img/synthese_view.gif" border="0" /></a>';
  83.     $data[$row;
  84. }
  85. Display::display_sortable_table($table_header,$data,array(),array(),array('id'=>$_GET['id']));
  86. }
  87. else
  88. {
  89.     echo get_lang('NoUsersInClass');    
  90. }
  91. echo '</blockquote>';
  92. /**
  93.  * Show all courses in which this class is subscribed
  94.  */
  95. $courses ClassManager::get_courses($class_id);
  96. if (count($courses0)
  97. {
  98.     $header[array (get_lang('Code')true);
  99.     $header[array (get_lang('Title')true);
  100.     $header[array (''false);
  101.     $data array ();
  102.     foreach$courses as $index=>$course)
  103.     {
  104.         $row array ();
  105.         $row[$course['visual_code'];
  106.         $row[$course['title'];
  107.         $row['<a href="course_information.php?code='.$course['code'].'"><img src="../img/info_small.gif" border="0" /></a>'.'<a href="'.api_get_path(WEB_COURSE_PATH).$course['directory'].'"><img src="../img/course_home.gif" border="0"/></a>' .
  108.                 '<a href="course_edit.php?course_code='.$course['code'].'"><img src="../img/edit.gif" border="0" title="'.get_lang('Edit').'" alt="'.get_lang('Edit').'"/></a>';
  109.         $data[$row;
  110.     }
  111.     echo '<p><b>'.get_lang('Courses').'</b></p>';
  112.     echo '<blockquote>';
  113.     Display :: display_sortable_table($header$dataarray ()array ()array('id'=>$_GET['id']));
  114.     echo '</blockquote>';
  115. }
  116. else
  117. {
  118.     echo '<p>'.get_lang('NoCoursesForThisClass').'</p>';
  119. }
  120. /*
  121. ==============================================================================
  122.         FOOTER 
  123. ==============================================================================
  124. */ 
  125. ?>

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