"index.php","name" => get_lang('PlatformAdmin'));
Display::display_header($tool_name);
/*
==============================================================================
DISPLAY FUNCTIONS
==============================================================================
*/
function make_strong($text)
{
return "" . $text . "";
}
/**
* Return a list of language directories.
* @todo function does not belong here, move to code library,
* also see infocours.php and index.php which contain a similar function
*/
function get_language_folder_list($dirname)
{
if($dirname[strlen($dirname)-1]!='/') $dirname.='/';
$handle=opendir($dirname);
while ($entries = readdir($handle))
{
if ($entries=='.' || $entries=='..' || $entries=='CVS') continue;
if (is_dir($dirname.$entries))
{
$language_list[] = $entries;
}
}
closedir($handle);
return $language_list;
}
/**
* Displays a select element (drop down menu) so the user can select
* the course language.
* @todo function does not belong here, move to (display?) library,
* @todo language display used apparently no longer existing array, converted to english for now.
* but we should switch to display the real language names.
*/
function display_language_select($element_name)
{
global $platformLanguage;
//get language list
$dirname = api_get_path(SYS_PATH)."main/lang/";
$language_list = get_language_folder_list($dirname);
sort($language_list);
//build array with strings to display
foreach ($language_list as $this_language)
{
$language_to_display[$this_language] = $this_language;
}
//sort alphabetically
//warning: key,value association needs to be maintained --> asort instead of sort
asort($language_to_display);
$user_selected_language = $_SESSION["user_language_choice"];
if (! isset($user_selected_language) ) $user_selected_language = $platformLanguage;
//display
echo "";
}
/**
* This code creates a select form element to let the user
* choose a real course to link to.
*
* We display the course code, but internally store the course id.
*/
function display_real_course_code_select($element_name)
{
$real_course_list = CourseManager::get_real_course_list();
echo "\n";
}
function display_create_virtual_course_form()
{
$category_table = Database::get_main_table(MAIN_CATEGORY_TABLE);
$message = make_strong(get_lang('AdminCreateVirtualCourse')) . " " . get_lang('AdminCreateVirtualCourseExplanation') . " This feature is in development phase, bug reports welcome.";
?>