pull/2487/head
Angel Fernando Quiroz Campos 9 years ago
parent a249a955e4
commit d12a47f6e0
  1. 4
      main/admin/access_url_add_courses_to_url.php
  2. 2
      main/admin/access_url_edit_usergroup_to_url.php
  3. 4
      main/admin/access_url_edit_users_to_url.php
  4. 29
      main/admin/access_urls.php
  5. 2
      main/admin/add_courses_to_usergroup.php
  6. 2
      main/admin/add_sessions_to_promotion.php
  7. 2
      main/admin/add_sessions_to_usergroup.php
  8. 2
      main/admin/configure_extensions.php
  9. 6
      main/admin/configure_homepage.php
  10. 4
      main/admin/configure_inscription.php
  11. 2
      main/admin/course_import.php
  12. 3
      main/admin/course_intro_pdf_import.php
  13. 5
      main/admin/course_request_accepted.php
  14. 3
      main/admin/course_request_rejected.php
  15. 3
      main/admin/course_request_review.php
  16. 2
      main/admin/dashboard_add_courses_to_user.php
  17. 2
      main/admin/filler.php
  18. 6
      main/admin/languages.php
  19. 2
      main/admin/ldap_import_students.php
  20. 2
      main/admin/ldap_import_students_to_session.php
  21. 17
      main/admin/ldap_users_list.php
  22. 2
      main/admin/ldap_users_synchro.php
  23. 34
      main/admin/settings.lib.php
  24. 4
      main/admin/skills_import.php
  25. 10
      main/admin/special_exports.php
  26. 6
      main/admin/sub_language_add.php
  27. 4
      main/admin/user_move_stats.php
  28. 6
      main/admin/usergroup_import.php
  29. 6
      main/attendance/attendance_calendar.php
  30. 6
      main/attendance/attendance_sheet.php
  31. 2
      main/auth/reset.php
  32. 4
      main/course_description/add.php
  33. 2
      main/course_description/edit.php
  34. 5
      main/course_info/infocours.php
  35. 2
      main/course_progress/thematic_plan.php
  36. 6
      main/coursecopy/copy_course.php
  37. 6
      main/coursecopy/copy_course_session.php
  38. 8
      main/coursecopy/copy_course_session_selected.php
  39. 14
      main/coursecopy/import_backup.php
  40. 6
      main/document/create_document.php
  41. 6
      main/document/edit_document.php
  42. 16
      main/dropbox/index.php
  43. 2
      main/exercise/exercise_submit.php
  44. 20
      main/gradebook/gradebook_view_result.php
  45. 4
      main/gradebook/lib/fe/displaygradebook.php
  46. 6
      main/inc/ajax/record_audio_wami.ajax.php
  47. 12
      main/inc/introductionSection.inc.php

@ -58,10 +58,10 @@ if (isset($_POST['form_sent']) && $_POST['form_sent']) {
if ($form_sent == 1) {
if (count($courses) == 0 || count($url_list) == 0) {
Display::addFlash(Display::return_message(get_lang('AtLeastOneCourseAndOneURL'), 'error'));
echo Display::return_message(get_lang('AtLeastOneCourseAndOneURL'), 'error');
} else {
UrlManager::add_courses_to_urls($courses, $url_list);
Display::addFlash(Display::return_message(get_lang('CourseBelongURL'), 'confirm'));
echo Display::return_message(get_lang('CourseBelongURL'), 'confirm');
}
}
}

@ -202,7 +202,7 @@ $url_list = UrlManager::get_url_data();
<input type="hidden" name="add_type" value="<?php echo $add_type ?>"/>
<?php
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal')); //main API
echo Display::return_message($errorMsg, 'normal'); //main API
}
?>
<div class="row">

@ -134,7 +134,7 @@ if (isset($_POST['form_sent']) && $_POST['form_sent']) {
Display::display_header($tool_name);
if (!empty($message)) {
Display::addFlash(Display::return_message($message, 'normal', false));
echo Display::return_message($message, 'normal', false);
}
echo '<div class="actions">';
@ -221,7 +221,7 @@ $url_list = UrlManager::get_url_data();
<?php
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal')); //main API
echo Display::return_message($errorMsg, 'normal'); //main API
}
?>

@ -35,18 +35,18 @@ if (isset($_GET['action'])) {
case 'delete_url':
$result = UrlManager::delete($url_id);
if ($result) {
Display::addFlash(Display::return_message(get_lang('URLDeleted'), 'normal'));
echo Display::return_message(get_lang('URLDeleted'), 'normal');
} else {
Display :: display_error_message(get_lang('CannotDeleteURL'));
echo Display::return_message(get_lang('CannotDeleteURL'), 'error');
}
break;
case 'lock':
UrlManager::set_url_status('lock', $url_id);
Display::addFlash(Display::return_message(get_lang('URLInactive'), 'normal'));
echo Display::return_message(get_lang('URLInactive'), 'normal');
break;
case 'unlock':
UrlManager::set_url_status('unlock', $url_id);
Display::addFlash(Display::return_message(get_lang('URLActive'), 'normal'));
echo Display::return_message(get_lang('URLActive'), 'normal');
break;
case 'register':
// we are going to register the admin
@ -59,12 +59,10 @@ if (isset($_GET['action'])) {
$url_str .= $my_url['url'].' <br />';
}
}
Display::addFlash(
Display::return_message(
get_lang('AdminUserRegisteredToThisURL').': '.$url_str.'<br />',
'normal',
false
)
echo Display::return_message(
get_lang('AdminUserRegisteredToThisURL').': '.$url_str.'<br />',
'normal',
false
);
}
}
@ -83,16 +81,18 @@ foreach ($url_list as $my_url) {
}
}
if (!empty($url_string)) {
Display:: display_warning_message(
echo Display::return_message(
get_lang('AdminShouldBeRegisterInSite').'<br />'.$url_string,
'warning',
false
);
}
// checking the current installation
if ($current_access_url_id == -1) {
Display::display_warning_message(
get_lang('URLNotConfiguredPleaseChangedTo').': '.api_get_path(WEB_PATH)
echo Display::return_message(
get_lang('URLNotConfiguredPleaseChangedTo').': '.api_get_path(WEB_PATH),
'warning'
);
} elseif (api_is_platform_admin()) {
$quant = UrlManager::relation_url_user_exist(
@ -100,8 +100,9 @@ if ($current_access_url_id == -1) {
$current_access_url_id
);
if ($quant == 0) {
Display:: display_warning_message(
echo Display::return_message(
'<a href="'.api_get_self().'?action=register&sec_token='.$parameters['sec_token'].'">'.get_lang('ClickToRegisterAdmin').'</a>',
'warning',
false
);
}

@ -206,7 +206,7 @@ echo Display::input('hidden', 'id', $id);
echo Display::input('hidden', 'form_sent', '1');
echo Display::input('hidden', 'add_type', null);
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal')); //main API
echo Display::return_message($errorMsg, 'normal'); //main API
}
?>

@ -158,7 +158,7 @@ echo Display::input('hidden', 'id', $id);
echo Display::input('hidden', 'form_sent', '1');
echo Display::input('hidden', 'add_type', null);
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal')); //main API
echo Display::return_message($errorMsg, 'normal'); //main API
}
?>

@ -179,7 +179,7 @@ echo Display::input('hidden', 'id', $id);
echo Display::input('hidden', 'form_sent', '1');
echo Display::input('hidden', 'add_type', null);
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal')); //main API
echo Display::return_message($errorMsg, 'normal'); //main API
}
?>

@ -136,7 +136,7 @@ Display::display_header($nameTool);
<div id="message" style="display: none">
<?php
if (!empty($message)) {
Display::addFlash(Display::return_message($message, 'normal'));
echo Display::return_message($message, 'normal');
}
?>
</div>

@ -796,7 +796,7 @@ switch ($action) {
<input type="hidden" name="formSent" value="1"/>
<?php
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal'));
echo Display::return_message($errorMsg, 'normal');
}
?>
<div class="row">
@ -847,7 +847,7 @@ switch ($action) {
case 'edit_link':
$menuf = ($action == 'insert_tabs' || $action == 'edit_tabs') ? $mtloggedin : $menuf;
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal'));
echo Display::return_message($errorMsg, 'normal');
}
$default = array();
$form = new FormValidator('configure_homepage_'.$action, 'post', $selfUrl.'?action='.$action, '', array('style' => 'margin: 0px;'));
@ -940,7 +940,7 @@ switch ($action) {
$open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal')); //main API
echo Display::return_message($errorMsg, 'normal'); //main API
}
$default = array();

@ -165,7 +165,7 @@ echo Display::page_header($tool_name);
//api_display_tool_title($tool_name);
if (api_get_setting('allow_registration') == 'approval') {
Display::addFlash(Display::return_message(get_lang('YourAccountHasToBeApproved'), 'normal'));
echo Display::return_message(get_lang('YourAccountHasToBeApproved'), 'normal');
}
//if openid was not found
if (!empty($_GET['openid_msg']) && $_GET['openid_msg'] == 'idnotfound') {
@ -364,7 +364,7 @@ switch ($action) {
}
if (!empty($errorMsg)) {
Display::addFlash(Display::return_message($errorMsg, 'normal'));
echo Display::return_message($errorMsg, 'normal');
}
$default = array();

@ -139,7 +139,7 @@ function save_courses_data($courses)
}
if (!empty($msg)) {
Display::addFlash(Display::return_message($msg, 'normal', false));
echo Display::return_message($msg, 'normal', false);
}
}

@ -18,7 +18,6 @@ $errors = [];
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
set_time_limit(0);
Display::display_header($tool_name);
if ($_POST['formSent']) {
if (empty($_FILES['import_file']['tmp_name'])) {
@ -49,6 +48,8 @@ if (count($errors) != 0) {
} elseif ($_POST['formSent']) {
Display::addFlash(Display::return_message('CourseIntroductionsAllImportesSuccessfully', 'confirmation', false));
}
Display::display_header($tool_name);
?>
<form method="post" action="<?php echo api_get_self(); ?>" enctype="multipart/form-data" style="margin: 0;">
<h3><?php echo $tool_name; ?></h3>

@ -133,17 +133,18 @@ function modify_filter($id)
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'course_list.php', 'name' => get_lang('CourseList'));
$tool_name = get_lang('AcceptedCourseRequests');
Display :: display_header($tool_name);
// Display confirmation or error message.
if (!empty($message)) {
if ($is_error_message) {
Display::display_error_message($message, false);
Display::addFlash(Display::return_message($message, 'error', false));
} else {
Display::addFlash(Display::return_message($message, 'normal', false));
}
}
Display :: display_header($tool_name);
if (!$course_validation_feature) {
Display :: display_footer();
exit;

@ -166,7 +166,6 @@ $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdm
$interbreadcrumb[] = array('url' => 'course_list.php', 'name' => get_lang('CourseList'));
$tool_name = get_lang('RejectedCourseRequests');
Display :: display_header($tool_name);
// Display confirmation or error message.
if (!empty($message)) {
@ -177,6 +176,8 @@ if (!empty($message)) {
}
}
Display::display_header($tool_name);
if (!$course_validation_feature) {
Display :: display_footer();
exit;

@ -204,7 +204,6 @@ $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdm
$interbreadcrumb[] = array('url' => 'course_list.php', 'name' => get_lang('CourseList'));
$tool_name = get_lang('ReviewCourseRequests');
Display :: display_header($tool_name);
// Display confirmation or error message.
if (!empty($message)) {
@ -215,6 +214,8 @@ if (!empty($message)) {
}
}
Display::display_header($tool_name);
if (!$course_validation_feature) {
Display :: display_footer();
exit;

@ -223,7 +223,7 @@ $result = Database::query($sql);
<input type="hidden" name="formSent" value="1" />
<?php
if (!empty($msg)) {
Display::addFlash(Display::return_message($msg, 'normal')); //main API
echo Display::return_message($msg, 'normal'); //main API
}
?>

@ -58,7 +58,7 @@ if (count($output) > 0) {
}
$result .= '</table>';
$result .= '</div>';
Display::addFlash(Display::return_message($result, 'normal', false));
echo Display::return_message($result, 'normal', false);
}
?>
<div id="datafiller" class="panel panel-default">

@ -233,9 +233,6 @@ $tool_name = get_lang('PlatformLanguages');
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
// including the header file (which includes the banner itself)
Display :: display_header($tool_name);
if (isset($_GET['action']) && $_GET['action'] == 'make_unavailable_confirmed') {
$language_info = SubLanguageManager::get_all_information_of_language($_GET['id']);
if ($language_info['available'] == 1) {
@ -249,6 +246,9 @@ if (isset($_GET['action']) && $_GET['action'] == 'make_unavailable_confirmed') {
// displaying the explanation for this tool
Display::addFlash(Display::return_message(get_lang('PlatformLanguagesExplanation'), 'normal'));
// including the header file (which includes the banner itself)
Display::display_header($tool_name);
echo '<a id="disable_all_except_default" href="javascript:void(0)" class="btn btn-primary"><em class="fa fa-eye"></em> '.get_lang('LanguagesDisableAllExceptDefault').'</a><br /><br />';
// selecting all the languages

@ -310,9 +310,9 @@ elseif (!empty($annee) && !empty($course) && ($_POST['confirmed'] == 'yes'))
*/
else
{
Display::display_header($tool_name);
$message = get_lang('NoUserAdded');
Display::addFlash(Display::return_message($message, 'normal', false));
Display::display_header($tool_name);
}
echo '<br /><br />';
echo '<a href="ldap_import_students.php?annee=&composante=&etape=">'.get_lang('BackToNewSearch').'</a>';

@ -204,9 +204,9 @@ elseif (!empty($annee) && !empty($id_session) && ($_POST['confirmed'] == 'yes'))
*/
else
{
Display::display_header($tool_name);
$message = get_lang('NoUserAdded');
Display::addFlash(Display::return_message($message, 'normal', false));
Display::display_header($tool_name);
}
echo '<br /><br />';
echo '<a href="ldap_import_students.php?annee=&composante=&etape=">'.get_lang('BackToNewSearch').'</a>';

@ -43,11 +43,10 @@ if (isset ($_GET['action']))
switch ($_GET['action'])
{
case 'show_message' :
Display::display_header($tool_name);
Display::addFlash(Display::return_message($_GET['message'], 'normal'));
Display::display_header($tool_name);
break;
case 'delete_user' :
Display::display_header($tool_name);
if ($user_id != $_user['user_id'] && UserManager::delete_user($_GET['user_id']))
{
Display::addFlash(Display::return_message(get_lang('UserDeleted'), 'normal'));
@ -56,16 +55,17 @@ if (isset ($_GET['action']))
{
Display::addFlash(Display::return_message(get_lang('CannotDeleteUser'), 'error'));
}
Display::display_header($tool_name);
break;
case 'lock' :
Display::display_header($tool_name);
$message = lock_unlock_user('lock', $_GET['user_id']);
Display::addFlash(Display::return_message($message, 'normal'));
Display::display_header($tool_name);
break;
case 'unlock':
Display::display_header($tool_name);
$message = lock_unlock_user('unlock', $_GET['user_id']);
Display::addFlash(Display::return_message($message, 'normal'));
Display::display_header($tool_name);
break;
case 'add_user':
$id = $_GET['id'];
@ -94,6 +94,7 @@ if (isset ($_GET['action']))
$message = get_lang('NoUserAdded');
}
Display::addFlash(Display::return_message($message, 'normal', false));
Display::display_header($tool_name);
}
break;
default:
@ -132,11 +133,11 @@ if (isset ($_POST['action']))
}
if ($number_of_selected_users == $number_of_deleted_users)
{
Display::addFlash(Display::return_message(get_lang('SelectedUsersDeleted'), 'normal'));
echo Display::return_message(get_lang('SelectedUsersDeleted'), 'normal');
}
else
{
Display::addFlash(Display::return_message(get_lang('SomeUsersNotDeleted'), 'error'));
echo Display::return_message(get_lang('SomeUsersNotDeleted'), 'error');
}
break;
case 'add_user' :
@ -154,11 +155,11 @@ if (isset ($_POST['action']))
addUserToSession($UserList, $_GET['id_session']);
if (count($UserList) > 0)
{
Display::addFlash(Display::return_message(count($UserList)." ".get_lang('LDAPUsersAdded')));
echo Display::return_message(count($UserList)." ".get_lang('LDAPUsersAdded'));
}
else
{
Display::addFlash(Display::return_message(get_lang('NoUserAdded')));
echo Display::return_message(get_lang('NoUserAdded'));
}
break;

@ -62,7 +62,7 @@ Display::display_header($tool_name);
if (isset($action) && ($action == "synchro")) {
$included = true;
require('ldap_synchro.php');
Display::addFlash(Display::return_message($message, 'normal', false));
echo Display::return_message($message, 'normal', false);
}
Display::display_footer();
?>

@ -34,7 +34,7 @@ function handleRegions()
api_get_utc_datetime(),
$user_id
);
Display::addFlash(Display::return_message(get_lang('SettingsStored'), 'confirmation'));
echo Display::return_message(get_lang('SettingsStored'), 'confirmation');
}
$plugin_obj = new AppPlugin();
@ -140,7 +140,7 @@ function handlePlugins()
api_get_utc_datetime(),
$user_id
);
Display::addFlash(Display::return_message(get_lang('SettingsStored'), 'confirmation'));
echo Display::return_message(get_lang('SettingsStored'), 'confirmation');
}
$all_plugins = $plugin_obj->read_plugins_from_path();
@ -285,12 +285,10 @@ function handleStylesheets()
$urlId = api_get_current_access_url_id();
if (!is_writable(CSS_UPLOAD_PATH)) {
Display::addFlash(
Display::return_message(
CSS_UPLOAD_PATH.get_lang('IsNotWritable'),
'error',
false
)
echo Display::return_message(
CSS_UPLOAD_PATH.get_lang('IsNotWritable'),
'error',
false
);
} else {
// Uploading a new stylesheet.
@ -323,11 +321,7 @@ function handleStylesheets()
);
if ($result) {
Display::addFlash(
Display::return_message(
get_lang('StylesheetAdded')
)
);
echo Display::return_message(get_lang('StylesheetAdded'));
}
}
}
@ -579,7 +573,7 @@ function uploadStylesheet($values, $picture)
}
$zip->close();
} else {
Display::addFlash(Display::return_message(get_lang('ErrorReadingZip').$info['extension'], 'error', false));
echo Display::return_message(get_lang('ErrorReadingZip').$info['extension'], 'error', false);
}
} else {
// Simply move the file.
@ -727,7 +721,7 @@ function handleSearch()
$formValues = $form->exportValues();
setConfigurationSettingsInDatabase($formValues, $_configuration['access_url']);
$search_enabled = $formValues['search_enabled'];
Display::addFlash(Display::return_message($SettingsStored, 'confirm'));
echo Display::return_message($SettingsStored, 'confirm');
}
$specific_fields = get_specific_field_list();
@ -1099,7 +1093,7 @@ function addEditTemplate()
Database::insert($table_system_template, $params);
// Display a feedback message.
Display::addFlash(Display::return_message(get_lang('TemplateAdded'), 'confirm'));
echo Display::return_message(get_lang('TemplateAdded'), 'confirm');
echo '<a href="settings.php?category=Templates&action=add">'.Display::return_icon('new_template.png', get_lang('AddTemplate'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
$content_template = '<head>{CSS}<style type="text/css">.text{font-weight: normal;}</style></head><body>'.Database::escape_string($values['template_text']).'</body>';
@ -1111,7 +1105,7 @@ function addEditTemplate()
Database::query($sql);
// Display a feedback message.
Display::addFlash(Display::return_message(get_lang('TemplateEdited'), 'confirm'));
echo Display::return_message(get_lang('TemplateEdited'), 'confirm');
}
}
Security::clear_token();
@ -1150,7 +1144,7 @@ function deleteTemplate($id)
Database::query($sql);
// Display a feedback message.
Display::addFlash(Display::return_message(get_lang('TemplateDeleted'), 'confirm'));
echo Display::return_message(get_lang('TemplateDeleted'), 'confirm');
}
/**
@ -1715,9 +1709,9 @@ function generateCSSDownloadLink($style)
//@TODO: use more generic script to download.
$str = '<a class="btn btn-primary btn-large" href="'.$url.'">'.get_lang('ClickHereToDownloadTheFile').'</a>';
Display::addFlash(Display::return_message($str, 'normal', false));
echo Display::return_message($str, 'normal', false);
} else {
Display::addFlash(Display::return_message(get_lang('FileNotFound'), 'warning'));
echo Display::return_message(get_lang('FileNotFound'), 'warning');
}
}

@ -243,10 +243,10 @@ $interbreadcrumb[] = array("url" => 'skill_list.php', "name" => get_lang('Manage
Display :: display_header($tool_name);
if (!empty($error_message)) {
Display::addFlash(Display::return_message($error_message, 'error'));
echo Display::return_message($error_message, 'error');
}
if (!empty($see_message_import)) {
Display::addFlash(Display::return_message($see_message_import, 'normal'));
echo Display::return_message($see_message_import, 'normal');
}
$toolbar = Display::url(

@ -37,7 +37,7 @@ Display::display_header($nameTools);
echo Display::page_header($nameTools);
if (count($_POST) == 0) {
Display::addFlash(Display::return_message(get_lang('SpecialExportsIntroduction')));
echo Display::return_message(get_lang('SpecialExportsIntroduction'));
}
$error = 0;
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
@ -64,7 +64,7 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') ||
$zip_folder = new PclZip($FileZip['TEMP_FILE_ZIP']);
if (!isset($_POST['resource']) || count($_POST['resource']) == 0) {
Display::addFlash(Display::return_message(get_lang('ErrorMsgSpecialExport'), 'error'));
echo Display::return_message(get_lang('ErrorMsgSpecialExport'), 'error');
} else {
$Resource = $_POST['resource'];
@ -130,7 +130,7 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') ||
}
if ($export && $name) {
Display::addFlash(Display::return_message(get_lang('BackupCreated'), 'confirm'));
echo Display::return_message(get_lang('BackupCreated'), 'confirm');
echo '<br /><a class="btn btn-default" href="'.api_get_path(WEB_CODE_PATH).'course_info/download.php?archive_path=&archive='.urlencode($name).'">'.get_lang('Download').'</a>';
} else {
// Display forms especial export
@ -138,10 +138,10 @@ if ($export && $name) {
$cb = new CourseBuilder();
$course = $cb->build_session_course();
if ($course === false) {
Display::addFlash(Display::return_message(get_lang('ErrorMsgSpecialExport'), 'error'));
echo Display::return_message(get_lang('ErrorMsgSpecialExport'), 'error');
form_special_export();
} else {
Display::addFlash(Display::return_message(get_lang('ToExportSpecialSelect'), 'normal'));
echo Display::return_message(get_lang('ToExportSpecialSelect'), 'normal');
CourseSelectForm :: display_form_session_export($course);
}
} else {

@ -261,9 +261,9 @@ echo $msg;
if (isset($_POST['SubmitAddDeleteLanguage'])) {
$rs = SubLanguageManager::remove_sub_language($_GET['id'], $_GET['sub_language_id']);
if ($rs === true) {
Display::addFlash(Display::return_message(get_lang('TheSubLanguageHasBeenRemoved'), 'confirm'));
echo Display::return_message(get_lang('TheSubLanguageHasBeenRemoved'), 'confirm');
} else {
Display::addFlash(Display::return_message(get_lang('TheSubLanguageHasNotBeenRemoved'), 'error'));
echo Display::return_message(get_lang('TheSubLanguageHasNotBeenRemoved'), 'error');
}
}
// ckeck_if_is_parent_of_sub_language($parent_id)===false
@ -302,7 +302,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'definenewsublanguage') {
$form->display();
}
if (isset($_GET['action']) && $_GET['action'] == 'definenewsublanguage') {
Display::addFlash(Display::return_message(get_lang('TheSubLanguageForThisLanguageHasBeenAdded')));
echo Display::return_message(get_lang('TheSubLanguageForThisLanguageHasBeenAdded'));
}
}
/**

@ -598,13 +598,11 @@ function get_courses_list_by_user_id_based_in_exercises($user_id) {
return $course_list;
}
Display::addFlash(Display::return_message(get_lang('CompareUserResultsBetweenCoursesAndCoursesInASession'), 'normal', false));
Display::display_header(get_lang('MoveUserStats'));
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
Display::addFlash(Display::return_message(get_lang('CompareUserResultsBetweenCoursesAndCoursesInASession'), 'normal', false));
// Some pagination
$page = 1;

@ -90,9 +90,6 @@ $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classe
// Setting the name of the tool.
$tool_name = get_lang('ImportClassListCSV');
// Displaying the header.
Display :: display_header($tool_name);
set_time_limit(0);
$form = new FormValidator('import_classes');
@ -127,6 +124,9 @@ if ($form->validate()) {
}
}
// Displaying the header.
Display :: display_header($tool_name);
$form->display();
?>
<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>

@ -33,17 +33,17 @@ $message_information = get_lang('AttendanceCalendarDescription');
if (!empty($message_information)) {
$message = '<strong>'.get_lang('Information').'</strong><br />';
$message .= $message_information;
Display::addFlash(Display::return_message($message, 'normal', false));
echo Display::return_message($message, 'normal', false);
}
if (isset($error_repeat_date) && $error_repeat_date) {
$message = get_lang('EndDateMustBeMoreThanStartDate');
Display::addFlash(Display::return_message($message, 'error', false));
echo Display::return_message($message, 'error', false);
}
if (isset($error_checkdate) && $error_checkdate) {
$message = get_lang('InvalidDate');
Display::addFlash(Display::return_message($message, 'error', false));
echo Display::return_message($message, 'error', false);
}
if (isset($action) && $action == 'calendar_add') {

@ -64,7 +64,7 @@ if (api_is_allowed_to_edit(null, true) ||
}
if (!$exists_attendance_today) {
Display::addFlash(Display::return_message(get_lang('ThereIsNoClassScheduledTodayTryPickingAnotherDay'), 'warning'));
echo Display::return_message(get_lang('ThereIsNoClassScheduledTodayTryPickingAnotherDay'), 'warning');
}
$form->addSelect(
@ -118,11 +118,11 @@ if (api_is_allowed_to_edit(null, true) ||
if (!empty($message_information)) {
$message = '<strong>'.get_lang('Information').'</strong><br />';
$message .= $message_information;
Display::addFlash(Display::return_message($message, 'normal', false));
echo Display::return_message($message, 'normal', false);
}
if ($is_locked_attendance) {
Display::addFlash(Display::return_message(get_lang('TheAttendanceSheetIsLocked'), 'warning', false));
echo Display::return_message(get_lang('TheAttendanceSheetIsLocked'), 'warning', false);
}
$param_filter = '&filter='.Security::remove_XSS($default_filter).'&group_id='.$groupId;

@ -9,7 +9,6 @@ if (!ctype_alnum($token)) {
$token = '';
}
$tpl = new Template(null);
// Build the form
$form = new FormValidator('reset', 'POST', api_get_self().'?token='.$token);
@ -62,6 +61,7 @@ if ($form->validate()) {
}
}
$tpl = new Template(null);
$tpl->assign('form', $form->toHtml());
$content = $tpl->get_template('auth/set_temp_password.tpl');
$tpl->assign('content', $tpl->fetch($content));

@ -38,7 +38,7 @@ echo '</div>';
// error messages
if (isset($error) && intval($error) == 1) {
Display::addFlash(Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false));
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false);
}
// default header title form
@ -85,6 +85,6 @@ $form->addButtonCreate(get_lang('Save'));
if (isset ($question[$description_type])) {
$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
$message .= $question[$description_type];
Display::addFlash(Display::return_message($message, 'normal', false));
echo Display::return_message($message, 'normal', false);
}
$form->display();

@ -56,7 +56,7 @@ echo '</div>';
// error messages
if (isset($error) && intval($error) == 1) {
Display::addFlash(Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false));
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false);
}
// default header title form

@ -783,12 +783,13 @@ if ($form->validate() && is_settings_editable()) {
exit;
}
/* Header */
Display :: display_header($nameTools, MODULE_HELP_NAME);
if ($show_delete_watermark_text_message) {
Display::addFlash(Display::return_message(get_lang('FileDeleted'), 'normal'));
}
/* Header */
Display::display_header($nameTools, MODULE_HELP_NAME);
// Display the form
echo '<div id="course_settings">';
$form->display();

@ -32,7 +32,7 @@ echo Display::tag('h2', $thematic_data['title']);
echo $thematic_data['content'];
if (isset($message) && $message == 'ok') {
Display::addFlash(Display::return_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull'), 'normal'));
echo Display::return_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull'), 'normal');
}
if ($action === 'thematic_plan_list') {

@ -58,13 +58,13 @@ if (Security::check_token('post') && (
$cr = new CourseRestorer($course);
$cr->set_file_option($_POST['same_file_name_option']);
$cr->restore($_POST['destination_course']);
Display::addFlash(Display::return_message(
echo Display::return_message(
get_lang('CopyFinished').': <a href="'.api_get_course_url($_POST['destination_course']).'">'.
Security::remove_XSS($_POST['destination_course']).
'</a>',
'normal',
false
));
);
} elseif (Security::check_token('post') && (
isset($_POST['copy_option']) &&
$_POST['copy_option'] == 'select_items'
@ -96,7 +96,7 @@ if (Security::check_token('post') && (
);
if (empty($courseList)) {
Display::addFlash(Display::return_message(get_lang('NoDestinationCoursesAvailable'), 'normal'));
echo Display::return_message(get_lang('NoDestinationCoursesAvailable'), 'normal');
} else {
$options = array();
foreach ($courseList as $courseItem) {

@ -293,7 +293,7 @@ if (Security::check_token('post') && (
$cr = new CourseRestorer($course);
//$cr->set_file_option($_POST['same_file_name_option']);
$cr->restore($destination_course, $destination_session);
Display::addFlash(Display::return_message(get_lang('CopyFinished'), 'confirmation'));
echo Display::return_message(get_lang('CopyFinished'), 'confirmation');
display_form();
} else {
$arr_course_origin = array();
@ -347,7 +347,7 @@ if (Security::check_token('post') && (
// Else, if a CourseSelectForm is requested, show it
if (api_get_setting('show_glossary_in_documents') != 'none') {
Display::addFlash(Display::return_message(get_lang('ToExportDocumentsWithGlossaryYouHaveToSelectGlossary'), 'normal'));
echo Display::return_message(get_lang('ToExportDocumentsWithGlossaryYouHaveToSelectGlossary'), 'normal');
}
$arr_course_origin = array();
@ -369,7 +369,7 @@ if (Security::check_token('post') && (
}
if ((is_array($arr_course_origin) && count($arr_course_origin) > 0) && !empty($destination_session)) {
Display::addFlash(Display::return_message(get_lang('ToExportLearnpathWithQuizYouHaveToSelectQuiz'), 'normal'));
echo Display::return_message(get_lang('ToExportLearnpathWithQuizYouHaveToSelectQuiz'), 'normal');
$course_origin = api_get_course_info($arr_course_origin[0]);
$cb = new CourseBuilder('', $course_origin);
$course = $cb->build($origin_session, $arr_course_origin[0], $with_base_content);

@ -353,10 +353,10 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') ||
} elseif (isset($_POST['copy_option']) && $_POST['copy_option'] == 'select_items') {
// Else, if a CourseSelectForm is requested, show it
if (api_get_setting('show_glossary_in_documents') != 'none') {
Display::addFlash(Display::return_message(
echo Display::return_message(
get_lang('ToExportDocumentsWithGlossaryYouHaveToSelectGlossary'),
'normal'
));
);
}
$arrCourseDestination = array();
@ -370,10 +370,10 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') ||
}
if (!empty($destinationSession)) {
Display::addFlash(Display::return_message(
echo Display::return_message(
get_lang('ToExportLearnpathWithQuizYouHaveToSelectQuiz'),
'normal'
));
);
$cb = new CourseBuilder('', $courseInfo);
$course = $cb->build($sessionId, $courseCode);

@ -97,21 +97,21 @@ if (Security::check_token('post') && (
$cr = new CourseRestorer($course);
$cr->set_file_option($_POST['same_file_name_option']);
$cr->restore();
Display::addFlash(Display::return_message(get_lang('ImportFinished')));
echo Display::return_message(get_lang('ImportFinished'));
echo '<a class="btn btn-default" href="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/index.php">'.get_lang('CourseHomepage').'</a>';
} else {
if (!$error) {
Display::addFlash(Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning'));
echo Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
} elseif ($filename === false) {
Display::addFlash(Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error'));
echo Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
} else {
if ($filename == '') {
Display::addFlash(Display::return_message(get_lang('SelectBackupFile'), 'error'));
echo Display::return_message(get_lang('SelectBackupFile'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
} else {
Display::addFlash(Display::return_message(get_lang('UploadError'), 'error'));
echo Display::return_message(get_lang('UploadError'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
}
}
@ -141,10 +141,10 @@ if (Security::check_token('post') && (
$hiddenFields['sec_token'] = Security::get_token();
CourseSelectForm::display_form($course, $hiddenFields);
} elseif ($filename === false) {
Display::addFlash(Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error'));
echo Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
} else {
Display::addFlash(Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning'));
echo Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
}
} else {

@ -499,8 +499,8 @@ if ($form->validate()) {
// Don't create file with the same name.
if (file_exists($filepath.$filename.'.'.$extension)) {
Display:: display_header($nameTools, 'Doc');
Display::addFlash(Display::return_message(get_lang('FileExists').' '.$title, 'error', false));
Display:: display_header($nameTools, 'Doc');
Display:: display_footer();
exit;
}
@ -581,13 +581,13 @@ if ($form->validate()) {
header('Location: document.php?'.api_get_cidreq().'&id='.$folder_id.$selectcat.$certificate_condition);
exit();
} else {
Display :: display_header($nameTools, 'Doc');
Display::addFlash(Display::return_message(get_lang('Impossible'), 'error'));
Display :: display_header($nameTools, 'Doc');
Display :: display_footer();
}
} else {
Display :: display_header($nameTools, 'Doc');
Display::addFlash(Display::return_message(get_lang('Impossible'), 'error'));
Display :: display_header($nameTools, 'Doc');
Display :: display_footer();
}
} else {

@ -519,15 +519,15 @@ if ($owner_id == api_get_user_id() ||
$str_info .= $info_value.'<br/>';
}
$create_certificate = get_lang('CreateCertificateWithTags');
Display::addFlash(Display::return_message(
echo Display::return_message(
$create_certificate.': <br /><br />'.$str_info,
'normal',
false
));
);
}
if ($extension == 'svg' && !api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') {
Display::addFlash(Display::return_message(get_lang('BrowserDontSupportsSVG'), 'warning'));
echo Display::return_message(get_lang('BrowserDontSupportsSVG'), 'warning');
}
// HTML-editor
echo '<div class="page-create">

@ -93,10 +93,10 @@ if (isset($_POST['StoreCategory'])) {
}
$return_information = store_addcategory();
if ($return_information['type'] == 'confirmation') {
Display::addFlash(Display::return_message($return_information['message'], 'confirmation'));
echo Display::return_message($return_information['message'], 'confirmation');
}
if ($return_information['type'] == 'error') {
Display::addFlash(Display::return_message(get_lang('FormHasErrorsPleaseComplete').'<br />'.$return_information['message'], 'error'));
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete').'<br />'.$return_information['message'], 'error');
display_addcategory_form($_POST['category_name'], $_POST['edit_id'], $postAction);
}
}
@ -117,7 +117,7 @@ if (($action == 'movesent' || $action == 'movereceived') && isset($_GET['move_id
);
}
if (isset($_POST['do_move'])) {
Display::addFlash(Display::return_message(store_move($_POST['id'], $_POST['move_target'], $_POST['part']), 'confirm'));
echo Display::return_message(store_move($_POST['id'], $_POST['move_target'], $_POST['part']), 'confirm');
}
// Delete a file
@ -134,7 +134,7 @@ if (($action == 'deletereceivedfile' || $action == 'deletesentfile') && isset($_
$dropboxfile->deleteSentWork($_GET['id']);
$message = get_lang('SentFileDeleted');
}
Display::addFlash(Display::return_message($message, 'confirmation'));
echo Display::return_message($message, 'confirmation');
}
// Delete a category
@ -143,7 +143,7 @@ if (($action == 'deletereceivedcategory' || $action == 'deletesentcategory') &&
api_not_allowed();
}
$message = delete_category($action, $_GET['id']);
Display::addFlash(Display::return_message($message, 'confirmation'));
echo Display::return_message($message, 'confirmation');
}
// Do an action on multiple files
@ -158,7 +158,7 @@ if (!isset($_POST['feedback']) && (
$postAction == 'download_sent')
) {
$display_message = handle_multiple_actions();
Display::addFlash(Display::return_message($display_message, 'normal'));
echo Display::return_message($display_message, 'normal');
}
// Store Feedback
@ -170,14 +170,14 @@ if (isset($_POST['feedback'])) {
$check = Security::check_token();
if ($check) {
$display_message = store_feedback();
Display::addFlash(Display::return_message($display_message, 'normal'));
echo Display::return_message($display_message, 'normal');
Security::check_token();
}
}
// Error Message
if (isset($_GET['error']) && !empty($_GET['error'])) {
Display::addFlash(Display::return_message(get_lang($_GET['error']), 'normal'));
echo Display::return_message(get_lang($_GET['error']), 'normal');
}
$dropbox_data_sent = array();

@ -902,7 +902,7 @@ if ($objExercise->review_answers) {
}
if (!empty($error)) {
Display::addFlash(Display::return_message($error, 'error', false));
echo Display::return_message($error, 'error', false);
} else {
if (!empty ($exercise_sound)) {
echo "<a href=\"../document/download.php?doc_url=%2Faudio%2F".Security::remove_XSS($exercise_sound)."\" target=\"_blank\">", "<img src=\"../img/sound.gif\" border=\"0\" align=\"absmiddle\" alt=", get_lang('Sound')."\" /></a>";

@ -175,7 +175,6 @@ if (isset($_GET['import'])) {
}
}
} else {
header('Location: '.api_get_self().'?import=&selecteval='.$select_eval.'&importnofile=');
Display::addFlash(
Display::return_message(
get_lang('ImportNoFile'),
@ -183,16 +182,17 @@ if (isset($_GET['import'])) {
false
)
);
header('Location: '.api_get_self().'?import=&selecteval='.$select_eval.'&importnofile=');
exit;
}
if ($overwritescore != 0) {
header('Location: '.api_get_self().'?selecteval='.$select_eval.'&importoverwritescore='.$overwritescore);
Display::addFlash(
Display::return_message(
get_lang('ImportOverWriteScore').' '.$overwritescore
)
);
header('Location: '.api_get_self().'?selecteval='.$select_eval.'&importoverwritescore='.$overwritescore);
exit;
}
if ($nr_results_added == 0) {
@ -470,29 +470,29 @@ if (!isset($_GET['export']) && (!isset($_GET['import']))) {
Display :: display_header('');
}
if (isset($_GET['addresultnostudents'])) {
Display::addFlash(Display::return_message(get_lang('AddResultNoStudents'), 'warning', false));
echo Display::return_message(get_lang('AddResultNoStudents'), 'warning', false);
}
if (isset($_GET['addresult'])) {
Display::addFlash(Display::return_message(get_lang('ResultAdded'), 'confirmation', false));
echo Display::return_message(get_lang('ResultAdded'), 'confirmation', false);
}
if (isset($_GET['adduser'])) {
Display::addFlash(Display::return_message(get_lang('UserAdded'), 'confirmation', false));
echo Display::return_message(get_lang('UserAdded'), 'confirmation', false);
}
if (isset($_GET['incorrectdata'])) {
Display::addFlash(Display::return_message(get_lang('IncorrectData'), 'warning', false));
echo Display::return_message(get_lang('IncorrectData'), 'warning', false);
}
if (isset($_GET['massdelete'])) {
Display::addFlash(Display::return_message(get_lang('ResultsDeleted'), 'confirmation', false));
echo Display::return_message(get_lang('ResultsDeleted'), 'confirmation', false);
}
if (isset($_GET['nouser'])) {
Display::addFlash(Display::return_message(get_lang('NoUser'), 'warning', false));
echo Display::return_message(get_lang('NoUser'), 'warning', false);
}
if (isset($_GET['overwritemax'])) {
Display::addFlash(Display::return_message(get_lang('OverWriteMax'), 'warning', false));
echo Display::return_message(get_lang('OverWriteMax'), 'warning', false);
}
if (isset($_GET['import_user_error'])) {
@ -503,7 +503,7 @@ if (isset($_GET['import_user_error'])) {
}
if (isset($_GET['import_score_error'])) {
$userinfo = api_get_user_info($_GET['import_score_error']);
Display::addFlash(Display::return_message(get_lang('ScoreDoesNotMatch').' '.api_get_person_name($userinfo['firstname'], $userinfo['lastname']), 'warning'));
echo Display::return_message(get_lang('ScoreDoesNotMatch').' '.api_get_person_name($userinfo['firstname'], $userinfo['lastname']), 'warning');
}
if ($file_type == null) {
//show the result header

@ -297,7 +297,7 @@ class DisplayGradebook
$scoreinfo .= '<strong>'.sprintf(get_lang('TotalX'), $scorecourse_display.$aditionalButtons).'</strong>';
}
Display::addFlash(Display::return_message($scoreinfo, 'normal', false));
echo Display::return_message($scoreinfo, 'normal', false);
}
// show navigation tree and buttons?
@ -448,7 +448,7 @@ class DisplayGradebook
$msg = $weight.' - '.$min_certification.$edit_icon;
//@todo show description
$description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>'.get_lang('GradebookDescriptionLog').'</strong>'.': '.$catobj->get_description());
Display::addFlash(Display::return_message($msg, 'normal', false));
echo Display::return_message($msg, 'normal', false);
if (!empty($description)) {
echo Display::div($description, array());
}

@ -129,9 +129,7 @@ if (!empty($documentData)) {
$lp->set_modified_on();
$lpItem = new learnpathItem($lpItemId);
$lpItem->add_audio_from_documents($newDocId);
Display::addFlash(
Display::return_message(get_lang('Updated'), 'info')
);
echo Display::return_message(get_lang('Updated'), 'info');
}
}
@ -139,5 +137,5 @@ if (!empty($documentData)) {
// Remove file with one extension
unlink($documentPath);
} else {
Display::addFlash($contents);
echo $contents;
}

@ -96,13 +96,7 @@ if ($intro_editAllowed) {
}
Database::getManager()->persist($toolIntro);
Database::getManager()->flush();
Display::addFlash(
Display::return_message(
get_lang('IntroductionTextUpdated'),
'confirmation',
false
)
);
echo Display::return_message(get_lang('IntroductionTextUpdated'), 'confirmation', false);
} else {
// got to the delete command
$intro_cmdDel = true;
@ -120,9 +114,7 @@ if ($intro_editAllowed) {
id='".Database::escape_string($moduleId)."' AND
session_id='".intval($session_id)."'";
Database::query($sql);
Display::addFlash(
Display::return_message(get_lang('IntroductionTextDeleted'), 'confirmation')
);
echo Display::return_message(get_lang('IntroductionTextDeleted'), 'confirmation');
}
}

Loading…
Cancel
Save