|
@@ -1,239 +1,210 @@
|
|
<?php
|
|
<?php
|
|
/* For licensing terms, see /license.txt */
|
|
/* For licensing terms, see /license.txt */
|
|
|
|
+
|
|
/**
|
|
/**
|
|
-* Index of the admin tools
|
|
|
|
-*
|
|
|
|
-* @package chamilo.admin
|
|
|
|
-*/
|
|
|
|
-// name of the language file that needs to be included <br />
|
|
|
|
-$language_file=array('admin','tracking');
|
|
|
|
|
|
+ * Index page of the admin tools
|
|
|
|
+ * @package chamilo.admin
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+// Language files that need to be included.
|
|
|
|
+$language_file = array('admin', 'tracking');
|
|
|
|
|
|
-// resetting the course id
|
|
|
|
-$cidReset=true;
|
|
|
|
|
|
+// Resetting the course id.
|
|
|
|
+$cidReset = true;
|
|
|
|
|
|
-// including some necessary chamilo files
|
|
|
|
|
|
+// Including some necessary chamilo files.
|
|
require_once '../inc/global.inc.php';
|
|
require_once '../inc/global.inc.php';
|
|
require_once api_get_path(LIBRARY_PATH).'security.lib.php';
|
|
require_once api_get_path(LIBRARY_PATH).'security.lib.php';
|
|
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
|
|
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
|
|
require_once api_get_path(SYS_CODE_PATH).'admin/statistics/statistics.lib.php';
|
|
require_once api_get_path(SYS_CODE_PATH).'admin/statistics/statistics.lib.php';
|
|
require_once api_get_path(LIBRARY_PATH).'urlmanager.lib.php';
|
|
require_once api_get_path(LIBRARY_PATH).'urlmanager.lib.php';
|
|
|
|
|
|
-// setting the section (for the tabs)
|
|
|
|
-$this_section=SECTION_PLATFORM_ADMIN;
|
|
|
|
|
|
+// Setting the section (for the tabs).
|
|
|
|
+$this_section = SECTION_PLATFORM_ADMIN;
|
|
|
|
|
|
-// Access restrictions
|
|
|
|
|
|
+// Access restrictions.
|
|
api_protect_admin_script(true);
|
|
api_protect_admin_script(true);
|
|
$nameTools = get_lang('PlatformAdmin');
|
|
$nameTools = get_lang('PlatformAdmin');
|
|
|
|
|
|
-// setting breadcrumbs
|
|
|
|
|
|
+// Setting breadcrumbs.
|
|
//$interbreadcrumb[] = array('url' => 'index.php', 'name' => $nameTools);
|
|
//$interbreadcrumb[] = array('url' => 'index.php', 'name' => $nameTools);
|
|
|
|
|
|
-// setting the name of the tool
|
|
|
|
-$tool_name=get_lang('PlatformAdmin');
|
|
|
|
|
|
+// Setting the name of the tool.
|
|
|
|
+$tool_name = get_lang('PlatformAdmin');
|
|
|
|
|
|
// Displaying the header
|
|
// Displaying the header
|
|
Display::display_header($nameTools);
|
|
Display::display_header($nameTools);
|
|
|
|
|
|
|
|
|
|
-if(api_is_platform_admin()) {
|
|
|
|
- if(is_dir(api_get_path(SYS_CODE_PATH).'install/') && is_readable(api_get_path(SYS_CODE_PATH).'install/index.php'))
|
|
|
|
- {
|
|
|
|
|
|
+if (api_is_platform_admin()) {
|
|
|
|
+ if (is_dir(api_get_path(SYS_CODE_PATH).'install/') && is_readable(api_get_path(SYS_CODE_PATH).'install/index.php')) {
|
|
Display::display_normal_message(get_lang('InstallDirAccessibleSecurityThreat'));
|
|
Display::display_normal_message(get_lang('InstallDirAccessibleSecurityThreat'));
|
|
}
|
|
}
|
|
- /*
|
|
|
|
- ACTION HANDLING
|
|
|
|
- */
|
|
|
|
- if (!empty($_POST['Register']))
|
|
|
|
- {
|
|
|
|
|
|
+
|
|
|
|
+ /* ACTION HANDLING */
|
|
|
|
+
|
|
|
|
+ if (!empty($_POST['Register'])) {
|
|
register_site();
|
|
register_site();
|
|
Display :: display_confirmation_message(get_lang('VersionCheckEnabled'));
|
|
Display :: display_confirmation_message(get_lang('VersionCheckEnabled'));
|
|
}
|
|
}
|
|
|
|
|
|
- /*
|
|
|
|
- MAIN SECTION
|
|
|
|
- */
|
|
|
|
- $keyword_url = Security::remove_XSS((empty($_GET['keyword'])?'':$_GET['keyword']));
|
|
|
|
|
|
+ /* MAIN SECTION */
|
|
|
|
+
|
|
|
|
+ $keyword_url = Security::remove_XSS((empty($_GET['keyword']) ? '' : $_GET['keyword']));
|
|
}
|
|
}
|
|
|
|
|
|
if (api_is_platform_admin()) {
|
|
if (api_is_platform_admin()) {
|
|
- ?>
|
|
|
|
- <div class="admin_section">
|
|
|
|
|
|
+?>
|
|
|
|
+<div class="admin_section">
|
|
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo api_ucfirst(get_lang('Users')); ?></h4>
|
|
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo api_ucfirst(get_lang('Users')); ?></h4>
|
|
|
|
|
|
- <div style="list-style-type:none"><form method="get" action="user_list.php">
|
|
|
|
- <input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
- <button class="search" type="submit"> <?php echo get_lang('Search');?>
|
|
|
|
- </button>
|
|
|
|
|
|
+ <div style="list-style-type:none">
|
|
|
|
+ <form method="get" action="user_list.php">
|
|
|
|
+ <input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
+ <button class="search" type="submit"> <?php echo get_lang('Search'); ?></button>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<ul>
|
|
<!-- <li><a href="user_list.php?search=advanced"><?php echo api_ucfirst(get_lang('AdvancedSearch')); ?></a></li> -->
|
|
<!-- <li><a href="user_list.php?search=advanced"><?php echo api_ucfirst(get_lang('AdvancedSearch')); ?></a></li> -->
|
|
- <li><a href="user_list.php"> <?php echo get_lang('UserList') ?></a></li>
|
|
|
|
- <li><a href="user_add.php"> <?php echo get_lang('AddUsers') ?></a></li>
|
|
|
|
- <li><a href="user_export.php"> <?php echo get_lang('ExportUserListXMLCSV') ?></a></li>
|
|
|
|
- <li><a href="user_import.php"> <?php echo get_lang('ImportUserListXMLCSV') ?></a></li>
|
|
|
|
- <?php if (api_get_setting('allow_social_tool')=='true') { ?>
|
|
|
|
- <li><a href="group_add.php"> <?php echo get_lang('AddGroups') ?></a></li>
|
|
|
|
- <li><a href="group_list.php"> <?php echo get_lang('GroupList') ?></a></li>
|
|
|
|
- <?php
|
|
|
|
- }
|
|
|
|
- if(isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap'])>0){
|
|
|
|
- ?>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <li><a href="ldap_users_list.php"><?php echo get_lang('ImportLDAPUsersIntoPlatform');?></a></li>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <?php
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- <li><a href="user_fields.php"> <?php echo get_lang('ManageUserFields'); ?></a></li>
|
|
|
|
- </ul>
|
|
|
|
- </div>
|
|
|
|
-<?php
|
|
|
|
-} else {
|
|
|
|
- ?>
|
|
|
|
- <div class="admin_section">
|
|
|
|
|
|
+ <li><a href="user_list.php"><?php echo get_lang('UserList'); ?></a></li>
|
|
|
|
+ <li><a href="user_add.php"><?php echo get_lang('AddUsers'); ?></a></li>
|
|
|
|
+ <li><a href="user_export.php"><?php echo get_lang('ExportUserListXMLCSV'); ?></a></li>
|
|
|
|
+ <li><a href="user_import.php"><?php echo get_lang('ImportUserListXMLCSV'); ?></a></li>
|
|
|
|
+ <?php if (api_get_setting('allow_social_tool') == 'true') { ?>
|
|
|
|
+ <li><a href="group_add.php"><?php echo get_lang('AddGroups'); ?></a></li>
|
|
|
|
+ <li><a href="group_list.php"><?php echo get_lang('GroupList'); ?></a></li>
|
|
|
|
+ <?php }
|
|
|
|
+ if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) { ?>
|
|
|
|
+ <li><a href="ldap_users_list.php"><?php echo get_lang('ImportLDAPUsersIntoPlatform');?></a></li>
|
|
|
|
+ <?php } ?>
|
|
|
|
+ <li><a href="user_fields.php"><?php echo get_lang('ManageUserFields'); ?></a></li>
|
|
|
|
+ </ul>
|
|
|
|
+</div>
|
|
|
|
+<?php } else { ?>
|
|
|
|
+<div class="admin_section">
|
|
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo api_ucfirst(get_lang('Users')); ?></h4>
|
|
<h4><?php Display::display_icon('members.gif', get_lang('Users')); ?> <?php echo api_ucfirst(get_lang('Users')); ?></h4>
|
|
<ul>
|
|
<ul>
|
|
- <li><a href="user_list.php"> <?php echo get_lang('UserList') ?></a></li>
|
|
|
|
- <li><a href="../mySpace/user_add.php"><?php echo get_lang('AddUsers') ?></a></li>
|
|
|
|
- <li><a href="user_import.php"> <?php echo get_lang('ImportUserListXMLCSV') ?></a></li>
|
|
|
|
|
|
+ <li><a href="user_list.php"><?php echo get_lang('UserList'); ?></a></li>
|
|
|
|
+ <li><a href="../mySpace/user_add.php"><?php echo get_lang('AddUsers'); ?></a></li>
|
|
|
|
+ <li><a href="user_import.php"><?php echo get_lang('ImportUserListXMLCSV'); ?></a></li>
|
|
</ul>
|
|
</ul>
|
|
- </div>
|
|
|
|
|
|
+</div>
|
|
<?php
|
|
<?php
|
|
}
|
|
}
|
|
|
|
|
|
-//Advance search link moved
|
|
|
|
-/* <li><a href="course_list.php?search=advanced"><?php echo api_ucfirst(get_lang('AdvancedSearch')); ?></a></li> */
|
|
|
|
-
|
|
|
|
-if(api_is_platform_admin()) {
|
|
|
|
-?>
|
|
|
|
- <div class="admin_section">
|
|
|
|
- <h4><?php Display::display_icon('course.gif', get_lang('Courses')); ?> <?php echo api_ucfirst(get_lang('Courses')); ?></h4>
|
|
|
|
- <div style="list-style-type:none">
|
|
|
|
- <form method="get" action="course_list.php">
|
|
|
|
- <input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
- <button class="search" type="submit"> <?php echo get_lang('Search');?></button>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
|
|
+if (api_is_platform_admin()) { ?>
|
|
|
|
+<div class="admin_section">
|
|
|
|
+ <h4><?php Display::display_icon('course.gif', get_lang('Courses')); ?> <?php echo api_ucfirst(get_lang('Courses')); ?></h4>
|
|
|
|
+ <div style="list-style-type:none">
|
|
|
|
+ <form method="get" action="course_list.php">
|
|
|
|
+ <input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
+ <button class="search" type="submit"><?php echo get_lang('Search'); ?></button>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
<ul>
|
|
<ul>
|
|
- <li><a href="course_list.php"><?php echo get_lang('CourseList') ?></a></li>
|
|
|
|
- <li><a href="course_add.php"><?php echo get_lang('AddCourse') ?></a></li>
|
|
|
|
|
|
+ <li><a href="course_list.php"><?php echo get_lang('CourseList'); ?></a></li>
|
|
|
|
+ <li><a href="course_add.php"><?php echo get_lang('AddCourse'); ?></a></li>
|
|
<li><a href="course_export.php"><?php echo get_lang('ExportCourses'); ?></a></li>
|
|
<li><a href="course_export.php"><?php echo get_lang('ExportCourses'); ?></a></li>
|
|
<li><a href="course_import.php"><?php echo get_lang('ImportCourses'); ?></a></li>
|
|
<li><a href="course_import.php"><?php echo get_lang('ImportCourses'); ?></a></li>
|
|
- <!-- <li><a href="course_virtual.php"><?php //echo get_lang('AdminManageVirtualCourses') ?></a></li> -->
|
|
|
|
|
|
+ <!-- <li><a href="course_virtual.php"><?php //echo get_lang('AdminManageVirtualCourses'); ?></a></li> -->
|
|
<li><a href="course_category.php"><?php echo get_lang('AdminCategories'); ?></a></li>
|
|
<li><a href="course_category.php"><?php echo get_lang('AdminCategories'); ?></a></li>
|
|
<li><a href="subscribe_user2course.php"><?php echo get_lang('AddUsersToACourse'); ?></a></li>
|
|
<li><a href="subscribe_user2course.php"><?php echo get_lang('AddUsersToACourse'); ?></a></li>
|
|
<li><a href="course_user_import.php"><?php echo get_lang('ImportUsersToACourse'); ?></a></li>
|
|
<li><a href="course_user_import.php"><?php echo get_lang('ImportUsersToACourse'); ?></a></li>
|
|
- <?php if (api_get_setting('search_enabled')=='true') { ?>
|
|
|
|
- <li><a href="specific_fields.php"><?php echo get_lang('SpecificSearchFields'); ?></a></li>
|
|
|
|
- <?php } ?>
|
|
|
|
- <?php
|
|
|
|
- if(isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap'])>0){
|
|
|
|
- ?>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <li><a href="ldap_import_students.php"><?php echo get_lang('ImportLDAPUsersIntoCourse');?></a></li>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <?php
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
|
|
+ <?php if (api_get_setting('search_enabled') == 'true') { ?>
|
|
|
|
+ <li><a href="specific_fields.php"><?php echo get_lang('SpecificSearchFields'); ?></a></li>
|
|
|
|
+ <?php }
|
|
|
|
+ if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) { ?>
|
|
|
|
+ <li><a href="ldap_import_students.php"><?php echo get_lang('ImportLDAPUsersIntoCourse'); ?></a></li>
|
|
|
|
+ <?php } ?>
|
|
</ul>
|
|
</ul>
|
|
- </div>
|
|
|
|
|
|
+</div>
|
|
|
|
|
|
- <div class="admin_section">
|
|
|
|
- <h4><?php Display::display_icon('settings.gif', get_lang('Platform')); ?> <?php echo api_ucfirst(get_lang('Platform')); ?></h4>
|
|
|
|
- <ul>
|
|
|
|
- <li><a href="settings.php"><?php echo get_lang('DokeosConfigSettings') ?></a></li>
|
|
|
|
- <li><a href="special_exports.php"><?php echo get_lang('SpecialExports') ?></a></li>
|
|
|
|
- <li><a href="system_announcements.php"><?php echo get_lang('SystemAnnouncements') ?></a></li>
|
|
|
|
- <li><a href="languages.php"><?php echo get_lang('Languages'); ?></a></li>
|
|
|
|
- <li><a href="configure_homepage.php"><?php echo get_lang('ConfigureHomePage'); ?></a></li>
|
|
|
|
- <li><a href="configure_inscription.php"><?php echo get_lang('ConfigureInscription'); ?></a></li>
|
|
|
|
- <li><a href="statistics/index.php"><?php echo get_lang('Statistics'); ?> </a></li>
|
|
|
|
- <li><a href="calendar.php"><?php echo get_lang('GlobalAgenda'); ?> </a></li>
|
|
|
|
- <?php if(!empty($phpMyAdminPath)) { ?>
|
|
|
|
- <li><a href="<?php echo $phpMyAdminPath; ?>" target="_blank"><?php echo get_lang("AdminDatabases"); ?></a><br />(<?php echo get_lang("DBManagementOnlyForServerAdmin"); ?>)</li>
|
|
|
|
- <?php } ?>
|
|
|
|
- <?php
|
|
|
|
- if(!empty($_configuration['multiple_access_urls'])) {
|
|
|
|
|
|
+<div class="admin_section">
|
|
|
|
+ <h4><?php Display::display_icon('settings.gif', get_lang('Platform')); ?> <?php echo api_ucfirst(get_lang('Platform')); ?></h4>
|
|
|
|
+ <ul>
|
|
|
|
+ <li><a href="settings.php"><?php echo get_lang('DokeosConfigSettings') ?></a></li>
|
|
|
|
+ <li><a href="special_exports.php"><?php echo get_lang('SpecialExports') ?></a></li>
|
|
|
|
+ <li><a href="system_announcements.php"><?php echo get_lang('SystemAnnouncements') ?></a></li>
|
|
|
|
+ <li><a href="languages.php"><?php echo get_lang('Languages'); ?></a></li>
|
|
|
|
+ <li><a href="configure_homepage.php"><?php echo get_lang('ConfigureHomePage'); ?></a></li>
|
|
|
|
+ <li><a href="configure_inscription.php"><?php echo get_lang('ConfigureInscription'); ?></a></li>
|
|
|
|
+ <li><a href="statistics/index.php"><?php echo get_lang('Statistics'); ?> </a></li>
|
|
|
|
+ <li><a href="calendar.php"><?php echo get_lang('GlobalAgenda'); ?> </a></li>
|
|
|
|
+ <?php if (!empty($phpMyAdminPath)) { ?>
|
|
|
|
+ <li><a href="<?php echo $phpMyAdminPath; ?>" target="_blank"><?php echo get_lang('AdminDatabases'); ?></a><br />(<?php echo get_lang('DBManagementOnlyForServerAdmin'); ?>)</li>
|
|
|
|
+ <?php
|
|
|
|
+ }
|
|
|
|
+ if (!empty($_configuration['multiple_access_urls'])) {
|
|
if (api_is_global_platform_admin()) {
|
|
if (api_is_global_platform_admin()) {
|
|
echo '<li><a href="access_urls.php">'.get_lang('ConfigureMultipleAccessURLs').'</a></li>';
|
|
echo '<li><a href="access_urls.php">'.get_lang('ConfigureMultipleAccessURLs').'</a></li>';
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- if (api_get_setting('allow_reservation')=='true') {
|
|
|
|
- echo '<li><a href="../reservation/m_category.php">'.get_lang('BookingSystem').'</a></li>';
|
|
|
|
- }
|
|
|
|
|
|
+ if (api_get_setting('allow_reservation') == 'true') {
|
|
|
|
+ echo '<li><a href="../reservation/m_category.php">'.get_lang('BookingSystem').'</a></li>';
|
|
|
|
+ }
|
|
|
|
|
|
- if (api_get_setting('allow_terms_conditions')=='true') {
|
|
|
|
- echo '<li><a href="legal_add.php">'.get_lang('TermsAndConditions').'</a></li>';
|
|
|
|
- }
|
|
|
|
|
|
+ if (api_get_setting('allow_terms_conditions') == 'true') {
|
|
|
|
+ echo '<li><a href="legal_add.php">'.get_lang('TermsAndConditions').'</a></li>';
|
|
|
|
+ }
|
|
|
|
|
|
- //@todo Translations needed in order to see a better explanation of issues
|
|
|
|
- echo '<li><a href="system_status.php">'.get_lang('SystemStatus').'</a></li>';
|
|
|
|
|
|
+ //@todo Translations needed in order to see a better explanation of issues
|
|
|
|
+ echo '<li><a href="system_status.php">'.get_lang('SystemStatus').'</a></li>';
|
|
|
|
|
|
- if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
|
|
|
|
- //do not show on production portals, where the tests directory doesn't exist
|
|
|
|
- echo '<li><a href="filler.php">'.get_lang('DataFiller').'</a></li>';
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- </ul>
|
|
|
|
- </div>
|
|
|
|
|
|
+ if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
|
|
|
|
+ // Do not show on production portals, where the tests directory doesn't exist.
|
|
|
|
+ echo '<li><a href="filler.php">'.get_lang('DataFiller').'</a></li>';
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ </ul>
|
|
|
|
+</div>
|
|
|
|
|
|
- <?php
|
|
|
|
|
|
+<?php
|
|
}
|
|
}
|
|
|
|
|
|
-if(api_get_setting('use_session_mode')=='true') {
|
|
|
|
-?>
|
|
|
|
|
|
+if (api_get_setting('use_session_mode') == 'true') { ?>
|
|
|
|
|
|
<div class="admin_section">
|
|
<div class="admin_section">
|
|
- <h4><?php Display::display_icon('blackboard_blue.png', get_lang('Sessions'), array('width'=>'22px')); ?> <?php echo get_lang('Sessions') ?></h4>
|
|
|
|
- <div style="list-style-type:none"><form method="POST" action="session_list.php">
|
|
|
|
- <input type="text" name="keyword_name" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
- <button class="search" type="submit"> <?php echo get_lang('Search');?>
|
|
|
|
- </button>
|
|
|
|
- </form>
|
|
|
|
|
|
+ <h4><?php Display::display_icon('blackboard_blue.png', get_lang('Sessions'), array('width' => '22px')); ?> <?php echo get_lang('Sessions'); ?></h4>
|
|
|
|
+ <div style="list-style-type:none">
|
|
|
|
+ <form method="POST" action="session_list.php">
|
|
|
|
+ <input type="text" name="keyword_name" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
+ <button class="search" type="submit"><?php echo get_lang('Search'); ?></button>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <ul>
|
|
|
|
+ <!-- <li><a href="session_list.php?search=advanced"><?php echo api_ucfirst(get_lang('AdvancedSearch')); ?></a></li> -->
|
|
|
|
+ <li><a href="session_list.php"><?php echo get_lang('ListSession'); ?></a></li>
|
|
|
|
+ <li><a href="session_category_list.php"><?php echo get_lang('ListSessionCategory'); ?></a></li>
|
|
|
|
+ <li><a href="session_add.php"><?php echo get_lang('AddSession'); ?></a></li>
|
|
|
|
+ <li><a href="session_import.php"><?php echo get_lang('ImportSessionListXMLCSV'); ?></a></li>
|
|
|
|
+ <?php if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) { ?>
|
|
|
|
+ <li><a href="ldap_import_students_to_session.php"><?php echo get_lang('ImportLDAPUsersIntoSession'); ?></a></li>
|
|
|
|
+ <?php } ?>
|
|
|
|
+ <li><a href="session_export.php"><?php echo get_lang('ExportSessionListXMLCSV'); ?></a></li>
|
|
|
|
+ <li><a href="../coursecopy/copy_course_session.php"><?php echo get_lang('CopyFromCourseInSessionToAnotherSession'); ?></a></li>
|
|
|
|
+ </ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <ul>
|
|
|
|
- <!-- <li><a href="session_list.php?search=advanced"><?php echo api_ucfirst(get_lang('AdvancedSearch')); ?></a></li> -->
|
|
|
|
- <li><a href="session_list.php"><?php echo get_lang('ListSession') ?></a></li>
|
|
|
|
- <li><a href="session_category_list.php"><?php echo get_lang('ListSessionCategory') ?></a></li>
|
|
|
|
- <li><a href="session_add.php"><?php echo get_lang('AddSession') ?></a></li>
|
|
|
|
- <li><a href="session_import.php"><?php echo get_lang('ImportSessionListXMLCSV') ?></a></li>
|
|
|
|
- <?php
|
|
|
|
- if(isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap'])>0){
|
|
|
|
- ?>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <li><a href="ldap_import_students_to_session.php"><?php echo get_lang('ImportLDAPUsersIntoSession');?></a></li>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <?php
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- <li><a href="session_export.php"><?php echo get_lang('ExportSessionListXMLCSV') ?></a></li>
|
|
|
|
- <li><a href="../coursecopy/copy_course_session.php"><?php echo get_lang('CopyFromCourseInSessionToAnotherSession') ?></a></li>
|
|
|
|
- </ul>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
<?php
|
|
<?php
|
|
-} else if(api_is_platform_admin()) {
|
|
|
|
-?>
|
|
|
|
|
|
+} elseif (api_is_platform_admin()) { ?>
|
|
|
|
|
|
<div class="admin_section">
|
|
<div class="admin_section">
|
|
-<h4><?php Display::display_icon('group.gif', get_lang('AdminClasses')); ?> <?php echo api_ucfirst(get_lang('AdminClasses')); ?></h4>
|
|
|
|
-<div style="list-style-type:none"><form method="get" action="class_list.php">
|
|
|
|
- <input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
- <input class="search" type="submit" value="<?php echo get_lang('Search'); ?>"/>
|
|
|
|
- </form>
|
|
|
|
-</div>
|
|
|
|
-<ul>
|
|
|
|
-<li><a href="class_list.php"><?php echo get_lang('ClassList'); ?></a></li>
|
|
|
|
-<li><a href="class_add.php"><?php echo get_lang('AddClasses'); ?></a></li>
|
|
|
|
-<li><a href="class_import.php"><?php echo get_lang('ImportClassListCSV'); ?></a></li>
|
|
|
|
-<li><a href="class_user_import.php"><?php echo get_lang('AddUsersToAClass'); ?> CSV</a></li>
|
|
|
|
-<li><a href="subscribe_class2course.php"><?php echo get_lang('AddClassesToACourse'); ?></a></li>
|
|
|
|
-</ul>
|
|
|
|
-<br />
|
|
|
|
-<br />
|
|
|
|
|
|
+ <h4><?php Display::display_icon('group.gif', get_lang('AdminClasses')); ?> <?php echo api_ucfirst(get_lang('AdminClasses')); ?></h4>
|
|
|
|
+ <div style="list-style-type:none">
|
|
|
|
+ <form method="get" action="class_list.php">
|
|
|
|
+ <input type="text" name="keyword" value="<?php echo $keyword_url; ?>"/>
|
|
|
|
+ <input class="search" type="submit" value="<?php echo get_lang('Search'); ?>"/>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <ul>
|
|
|
|
+ <li><a href="class_list.php"><?php echo get_lang('ClassList'); ?></a></li>
|
|
|
|
+ <li><a href="class_add.php"><?php echo get_lang('AddClasses'); ?></a></li>
|
|
|
|
+ <li><a href="class_import.php"><?php echo get_lang('ImportClassListCSV'); ?></a></li>
|
|
|
|
+ <li><a href="class_user_import.php"><?php echo get_lang('AddUsersToAClass'); ?> CSV</a></li>
|
|
|
|
+ <li><a href="subscribe_class2course.php"><?php echo get_lang('AddClassesToACourse'); ?></a></li>
|
|
|
|
+ </ul>
|
|
|
|
+ <br /><br />
|
|
</div>
|
|
</div>
|
|
<?php
|
|
<?php
|
|
}
|
|
}
|
|
@@ -242,51 +213,33 @@ if (api_is_platform_admin()) {
|
|
?>
|
|
?>
|
|
|
|
|
|
<div class="admin_section">
|
|
<div class="admin_section">
|
|
- <h4><?php Display::display_icon('visio_meeting.gif', get_lang('ConfigureExtensions')); ?> <?php echo api_ucfirst(get_lang('ConfigureExtensions')); ?></h4>
|
|
|
|
- <ul>
|
|
|
|
- <li><a href="configure_extensions.php?display=visio"><?php echo get_lang('Visioconf'); ?></a></li>
|
|
|
|
- <li><a href="configure_extensions.php?display=ppt2lp"><?php echo get_lang('Ppt2lp'); ?></a></li>
|
|
|
|
- <?php
|
|
|
|
- /* <li><a href="configure_extensions.php?display=ephorus"><?php echo get_lang('EphorusPlagiarismPrevention'); ?></a></li> */
|
|
|
|
- ?>
|
|
|
|
- <li><a href="configure_extensions.php?display=search"><?php echo get_lang('SearchEngine'); ?></a></li>
|
|
|
|
- <li><a href="configure_extensions.php?display=serverstats"><?php echo get_lang('ServerStatistics'); ?></a></li>
|
|
|
|
- <li><a href="configure_extensions.php?display=bandwidthstats"><?php echo get_lang('BandWidthStatistics'); ?></a></li>
|
|
|
|
- </ul>
|
|
|
|
-</div>
|
|
|
|
|
|
+ <h4><?php Display::display_icon('visio_meeting.gif', get_lang('ConfigureExtensions')); ?> <?php echo api_ucfirst(get_lang('ConfigureExtensions')); ?></h4>
|
|
|
|
+ <ul>
|
|
|
|
+ <li><a href="configure_extensions.php?display=visio"><?php echo get_lang('Visioconf'); ?></a></li>
|
|
|
|
+ <li><a href="configure_extensions.php?display=ppt2lp"><?php echo get_lang('Ppt2lp'); ?></a></li>
|
|
<?php
|
|
<?php
|
|
- /*if(isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap'])>0){
|
|
|
|
- ?>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <div class="admin_section">
|
|
|
|
- <h4><?php Display::display_icon('members.gif', 'LDAP'); ?> LDAP</h4>
|
|
|
|
- <ul>
|
|
|
|
- <li><a href="ldap_users_list.php"><?php echo get_lang('ImportLDAPUsersIntoPlatform');?></a></li>
|
|
|
|
- <li><a href="ldap_import_students.php"><?php echo get_lang('ImportLDAPUsersIntoCourse');?></a></li>
|
|
|
|
- <li><a href="ldap_import_students_to_session.php"><?php echo get_lang('ImportLDAPUsersIntoSession');?></a></li>
|
|
|
|
- <!--li><a href="ldap_users_synchro.php"><?php echo get_lang('LDAPSynchroImportUsersAndStepsInSessions');?></a></li-->
|
|
|
|
- </ul>
|
|
|
|
- </div>
|
|
|
|
- <!-- dynamic ldap code -->
|
|
|
|
- <?php
|
|
|
|
- }*/
|
|
|
|
|
|
+ /* <li><a href="configure_extensions.php?display=ephorus"><?php echo get_lang('EphorusPlagiarismPrevention'); ?></a></li> */
|
|
?>
|
|
?>
|
|
|
|
+ <li><a href="configure_extensions.php?display=search"><?php echo get_lang('SearchEngine'); ?></a></li>
|
|
|
|
+ <li><a href="configure_extensions.php?display=serverstats"><?php echo get_lang('ServerStatistics'); ?></a></li>
|
|
|
|
+ <li><a href="configure_extensions.php?display=bandwidthstats"><?php echo get_lang('BandWidthStatistics'); ?></a></li>
|
|
|
|
+ </ul>
|
|
|
|
+</div>
|
|
|
|
|
|
<div class="admin_section">
|
|
<div class="admin_section">
|
|
- <h4><?php Display::display_icon('logo.gif', 'Chamilo'); ?> Chamilo.org</h4>
|
|
|
|
- <ul>
|
|
|
|
- <li><a href="http://www.chamilo.org/" target="_blank"><?php echo get_lang('ChamiloHomepage'); ?></a></li>
|
|
|
|
- <li><a href="http://www.chamilo.org/forum" target="_blank"><?php echo get_lang('ChamiloForum'); ?></a></li>
|
|
|
|
- <li><a href="http://www.chamilo.org/extensions" target="_blank"><?php echo get_lang('ChamiloExtensions'); ?></a></li>
|
|
|
|
-
|
|
|
|
- <?php
|
|
|
|
- //try to display a maximum before we check the chamilo version and all that
|
|
|
|
- //session_write_close(); //close session to avoid blocking concurrent access
|
|
|
|
|
|
+ <h4><?php Display::display_icon('logo.gif', 'Chamilo'); ?> Chamilo.org</h4>
|
|
|
|
+ <ul>
|
|
|
|
+ <li><a href="http://www.chamilo.org/" target="_blank"><?php echo get_lang('ChamiloHomepage'); ?></a></li>
|
|
|
|
+ <li><a href="http://www.chamilo.org/forum" target="_blank"><?php echo get_lang('ChamiloForum'); ?></a></li>
|
|
|
|
+ <li><a href="http://www.chamilo.org/extensions" target="_blank"><?php echo get_lang('ChamiloExtensions'); ?></a></li>
|
|
|
|
+<?php
|
|
|
|
+ // Try to display a maximum before we check the chamilo version and all that.
|
|
|
|
+ //session_write_close(); //close session to avoid blocking concurrent access
|
|
flush(); //send data to client as much as allowed by the web server
|
|
flush(); //send data to client as much as allowed by the web server
|
|
//ob_flush();
|
|
//ob_flush();
|
|
echo '<br />'.get_lang('VersionCheck').': '.version_check().'';
|
|
echo '<br />'.get_lang('VersionCheck').': '.version_check().'';
|
|
- ?>
|
|
|
|
- </ul>
|
|
|
|
|
|
+?>
|
|
|
|
+ </ul>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
<?php
|
|
}
|
|
}
|
|
@@ -303,31 +256,27 @@ function version_check() {
|
|
$tbl_settings = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
|
|
$tbl_settings = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
|
|
$sql = 'SELECT selected_value FROM '.$tbl_settings.' WHERE variable="registered" ';
|
|
$sql = 'SELECT selected_value FROM '.$tbl_settings.' WHERE variable="registered" ';
|
|
$result = Database::query($sql);
|
|
$result = Database::query($sql);
|
|
- $row=Database::fetch_array($result,'ASSOC');
|
|
|
|
|
|
+ $row = Database::fetch_array($result, 'ASSOC');
|
|
|
|
|
|
- // The site has not been registered yet
|
|
|
|
- //if (api_get_setting('registered')=='false')
|
|
|
|
|
|
+ // The site has not been registered yet.
|
|
|
|
+ //if (api_get_setting('registered') == 'false')
|
|
|
|
|
|
$return = '';
|
|
$return = '';
|
|
- if ($row['selected_value']=='false')
|
|
|
|
- {
|
|
|
|
|
|
+ if ($row['selected_value'] == 'false') {
|
|
$return .= '<form action="'.api_get_self().'" id="VersionCheck" name="VersionCheck" method="post">';
|
|
$return .= '<form action="'.api_get_self().'" id="VersionCheck" name="VersionCheck" method="post">';
|
|
$return .= get_lang('VersionCheckExplanation');
|
|
$return .= get_lang('VersionCheckExplanation');
|
|
$return .= '<input type="checkbox" name="donotlistcampus" value="1" id="checkbox" />'.get_lang('HideCampusFromPublicDokeosPlatformsList');
|
|
$return .= '<input type="checkbox" name="donotlistcampus" value="1" id="checkbox" />'.get_lang('HideCampusFromPublicDokeosPlatformsList');
|
|
$return .= '<button type="submit" class="save" name="Register" value="'.get_lang('EnableVersionCheck').'" id="register" />'.get_lang('EnableVersionCheck').'</button>';
|
|
$return .= '<button type="submit" class="save" name="Register" value="'.get_lang('EnableVersionCheck').'" id="register" />'.get_lang('EnableVersionCheck').'</button>';
|
|
$return .= '</form>';
|
|
$return .= '</form>';
|
|
} else {
|
|
} else {
|
|
- // The site has been registered already but is seriously out of date (registration date + 15552000 seconds)
|
|
|
|
|
|
+ // The site has been registered already but is seriously out of date (registration date + 15552000 seconds).
|
|
/*
|
|
/*
|
|
- if ((api_get_setting('registered') + 15552000) > mktime())
|
|
|
|
- {
|
|
|
|
|
|
+ if ((api_get_setting('registered') + 15552000) > mktime()) {
|
|
$return = 'It has been a long time since about your campus has been updated on chamilo.org';
|
|
$return = 'It has been a long time since about your campus has been updated on chamilo.org';
|
|
$return .= '<form action="'.api_get_self().'" id="VersionCheck" name="VersionCheck" method="post">';
|
|
$return .= '<form action="'.api_get_self().'" id="VersionCheck" name="VersionCheck" method="post">';
|
|
$return .= '<input type="submit" name="Register" value="Enable Version Check" id="register" />';
|
|
$return .= '<input type="submit" name="Register" value="Enable Version Check" id="register" />';
|
|
$return .= '</form>';
|
|
$return .= '</form>';
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
|
|
+ } else {
|
|
*/
|
|
*/
|
|
$return = 'site registered. ';
|
|
$return = 'site registered. ';
|
|
$return .= check_system_version();
|
|
$return .= check_system_version();
|
|
@@ -344,70 +293,60 @@ function version_check() {
|
|
*
|
|
*
|
|
* @todo the $_settings should be reloaded here. => write api function for this and use this in global.inc.php also.
|
|
* @todo the $_settings should be reloaded here. => write api function for this and use this in global.inc.php also.
|
|
*/
|
|
*/
|
|
-function register_site()
|
|
|
|
-{
|
|
|
|
- // Database Table Definitions
|
|
|
|
|
|
+function register_site() {
|
|
$tbl_settings = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
|
|
$tbl_settings = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
|
|
|
|
|
|
- // the SQL statment
|
|
|
|
$sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='registered'";
|
|
$sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='registered'";
|
|
$result = Database::query($sql);
|
|
$result = Database::query($sql);
|
|
|
|
|
|
- //
|
|
|
|
- if ($_POST['donotlistcampus'])
|
|
|
|
- {
|
|
|
|
|
|
+ if ($_POST['donotlistcampus']) {
|
|
$sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='donotlistcampus'";
|
|
$sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='donotlistcampus'";
|
|
$result = Database::query($sql);
|
|
$result = Database::query($sql);
|
|
}
|
|
}
|
|
|
|
|
|
- // reload the settings
|
|
|
|
|
|
+ // Reload the settings.
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
-* Check if the current installation is up to date
|
|
|
|
-* The code is borrowed from phpBB and slighlty modified
|
|
|
|
-* @author The phpBB Group <support@phpbb.com> (the code)
|
|
|
|
-* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University (the modifications)
|
|
|
|
-* @copyright (C) 2001 The phpBB Group
|
|
|
|
-* @return language string with some layout (color)
|
|
|
|
-*/
|
|
|
|
-function check_system_version()
|
|
|
|
-{
|
|
|
|
|
|
+ * Check if the current installation is up to date
|
|
|
|
+ * The code is borrowed from phpBB and slighlty modified
|
|
|
|
+ * @author The phpBB Group <support@phpbb.com> (the code)
|
|
|
|
+ * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University (the modifications)
|
|
|
|
+ * @copyright (C) 2001 The phpBB Group
|
|
|
|
+ * @return language string with some layout (color)
|
|
|
|
+ */
|
|
|
|
+function check_system_version() {
|
|
global $_configuration;
|
|
global $_configuration;
|
|
$system_version = trim($_configuration['system_version']); // the chamilo version of your installation
|
|
$system_version = trim($_configuration['system_version']); // the chamilo version of your installation
|
|
|
|
|
|
- if (ini_get('allow_url_fopen')==1)
|
|
|
|
- {
|
|
|
|
- // the number of courses
|
|
|
|
|
|
+ if (ini_get('allow_url_fopen') == 1) {
|
|
|
|
+ // The number of courses
|
|
$number_of_courses = statistics::count_courses();
|
|
$number_of_courses = statistics::count_courses();
|
|
|
|
|
|
- // the number of users
|
|
|
|
- $number_of_users = statistics::count_users();
|
|
|
|
|
|
+ // The number of users
|
|
|
|
+ $number_of_users = statistics::count_users();
|
|
|
|
|
|
- $version_url= 'http://version.chamilo.org/version.php?url='.urlencode(api_get_path(WEB_PATH)).'&campus='.urlencode(api_get_setting('siteName')).'&contact='.urlencode(api_get_setting('emailAdministrator')).'&version='.urlencode($system_version).'&numberofcourses='.urlencode($number_of_courses).'&numberofusers='.urlencode($number_of_users).'&donotlistcampus='.api_get_setting('donotlistcampus').'&organisation='.urlencode(api_get_setting('Institution')).'&adminname='.urlencode(api_get_setting('administratorName').' '.api_get_setting('administratorSurname'));
|
|
|
|
|
|
+ $version_url = 'http://version.chamilo.org/version.php?url='.urlencode(api_get_path(WEB_PATH)).'&campus='.urlencode(api_get_setting('siteName')).'&contact='.urlencode(api_get_setting('emailAdministrator')).'&version='.urlencode($system_version).'&numberofcourses='.urlencode($number_of_courses).'&numberofusers='.urlencode($number_of_users).'&donotlistcampus='.api_get_setting('donotlistcampus').'&organisation='.urlencode(api_get_setting('Institution')).'&adminname='.urlencode(api_get_setting('administratorName').' '.api_get_setting('administratorSurname'));
|
|
|
|
|
|
- $handle=@fopen($version_url,'r');
|
|
|
|
|
|
+ $handle = @fopen($version_url, 'r');
|
|
if ($handle !== false) {
|
|
if ($handle !== false) {
|
|
- $version_info=trim(@fread($handle, 1024));
|
|
|
|
|
|
+ $version_info = trim(@fread($handle, 1024));
|
|
|
|
|
|
- if ($system_version <> $version_info) {
|
|
|
|
- $output='<br /><span style="color:red">' . get_lang('YourVersionNotUpToDate') . '. '.get_lang('LatestVersionIs').' <b>Chamilo '.$version_info.'</b>. '.get_lang('YourVersionIs').' <b>Chamilo '.$system_version. '</b>. '.str_replace('http://www.chamilo.org','<a href="http://www.chamilo.org">http://www.chamilo.org</a>',get_lang('PleaseVisitDokeos')).'</span>';
|
|
|
|
|
|
+ if ($system_version != $version_info) {
|
|
|
|
+ $output = '<br /><span style="color:red">' . get_lang('YourVersionNotUpToDate') . '. '.get_lang('LatestVersionIs').' <b>Chamilo '.$version_info.'</b>. '.get_lang('YourVersionIs').' <b>Chamilo '.$system_version. '</b>. '.str_replace('http://www.chamilo.org', '<a href="http://www.chamilo.org">http://www.chamilo.org</a>', get_lang('PleaseVisitDokeos')).'</span>';
|
|
} else {
|
|
} else {
|
|
$output = '<br /><span style="color:green">'.get_lang('VersionUpToDate').': Chamilo '.$version_info.'</span>';
|
|
$output = '<br /><span style="color:green">'.get_lang('VersionUpToDate').': Chamilo '.$version_info.'</span>';
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
$output = '<span style="color:red">' . get_lang('ImpossibleToContactVersionServerPleaseTryAgain') . '</span>';
|
|
$output = '<span style="color:red">' . get_lang('ImpossibleToContactVersionServerPleaseTryAgain') . '</span>';
|
|
}
|
|
}
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
|
|
+ } else {
|
|
$output = '<span style="color:red">' . get_lang('AllowurlfopenIsSetToOff') . '</span>';
|
|
$output = '<span style="color:red">' . get_lang('AllowurlfopenIsSetToOff') . '</span>';
|
|
}
|
|
}
|
|
return $output;
|
|
return $output;
|
|
}
|
|
}
|
|
-/*
|
|
|
|
- FOOTER
|
|
|
|
-*/
|
|
|
|
|
|
+
|
|
|
|
+/* FOOTER */
|
|
|
|
+
|
|
Display::display_footer();
|
|
Display::display_footer();
|
|
-?>
|
|
|