diff --git a/main/admin/access_url_add_courses_to_url.php b/main/admin/access_url_add_courses_to_url.php index e9ce80c95e..c51f29fa23 100755 --- a/main/admin/access_url_add_courses_to_url.php +++ b/main/admin/access_url_add_courses_to_url.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'); } } } diff --git a/main/admin/access_url_edit_usergroup_to_url.php b/main/admin/access_url_edit_usergroup_to_url.php index 7c4ade5426..74ca6f684e 100755 --- a/main/admin/access_url_edit_usergroup_to_url.php +++ b/main/admin/access_url_edit_usergroup_to_url.php @@ -202,7 +202,7 @@ $url_list = UrlManager::get_url_data();
diff --git a/main/admin/access_url_edit_users_to_url.php b/main/admin/access_url_edit_users_to_url.php index ec6c420e87..7119dabd02 100755 --- a/main/admin/access_url_edit_users_to_url.php +++ b/main/admin/access_url_edit_users_to_url.php @@ -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 '
'; @@ -221,7 +221,7 @@ $url_list = UrlManager::get_url_data(); diff --git a/main/admin/access_urls.php b/main/admin/access_urls.php index faf6fac3d4..feb08f4e07 100755 --- a/main/admin/access_urls.php +++ b/main/admin/access_urls.php @@ -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'].'
'; } } - Display::addFlash( - Display::return_message( - get_lang('AdminUserRegisteredToThisURL').': '.$url_str.'
', - 'normal', - false - ) + echo Display::return_message( + get_lang('AdminUserRegisteredToThisURL').': '.$url_str.'
', + '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').'
'.$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( ''.get_lang('ClickToRegisterAdmin').'', + 'warning', false ); } diff --git a/main/admin/add_courses_to_usergroup.php b/main/admin/add_courses_to_usergroup.php index 8100e7139a..e4857b938a 100755 --- a/main/admin/add_courses_to_usergroup.php +++ b/main/admin/add_courses_to_usergroup.php @@ -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 } ?> diff --git a/main/admin/add_sessions_to_promotion.php b/main/admin/add_sessions_to_promotion.php index b672f76ff8..2f54e1d8ab 100755 --- a/main/admin/add_sessions_to_promotion.php +++ b/main/admin/add_sessions_to_promotion.php @@ -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 } ?> diff --git a/main/admin/add_sessions_to_usergroup.php b/main/admin/add_sessions_to_usergroup.php index 84af75ebc2..49fadf92c7 100755 --- a/main/admin/add_sessions_to_usergroup.php +++ b/main/admin/add_sessions_to_usergroup.php @@ -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 } ?> diff --git a/main/admin/configure_extensions.php b/main/admin/configure_extensions.php index f9fdd4c5d9..061f7e1889 100755 --- a/main/admin/configure_extensions.php +++ b/main/admin/configure_extensions.php @@ -136,7 +136,7 @@ Display::display_header($nameTool); diff --git a/main/admin/configure_homepage.php b/main/admin/configure_homepage.php index d1b315de25..2b0efd6fb4 100755 --- a/main/admin/configure_homepage.php +++ b/main/admin/configure_homepage.php @@ -796,7 +796,7 @@ switch ($action) {
@@ -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(); diff --git a/main/admin/configure_inscription.php b/main/admin/configure_inscription.php index d6dc9ccebb..3d01e53f08 100755 --- a/main/admin/configure_inscription.php +++ b/main/admin/configure_inscription.php @@ -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(); diff --git a/main/admin/course_import.php b/main/admin/course_import.php index 0ff14f3c94..eb9525190d 100755 --- a/main/admin/course_import.php +++ b/main/admin/course_import.php @@ -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); } } diff --git a/main/admin/course_intro_pdf_import.php b/main/admin/course_intro_pdf_import.php index 44eab73f87..a2df83d2bc 100755 --- a/main/admin/course_intro_pdf_import.php +++ b/main/admin/course_intro_pdf_import.php @@ -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); ?>

diff --git a/main/admin/course_request_accepted.php b/main/admin/course_request_accepted.php index b7823f3ae8..fe0e1499a3 100755 --- a/main/admin/course_request_accepted.php +++ b/main/admin/course_request_accepted.php @@ -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; diff --git a/main/admin/course_request_rejected.php b/main/admin/course_request_rejected.php index 25767bb293..7c9e39d752 100755 --- a/main/admin/course_request_rejected.php +++ b/main/admin/course_request_rejected.php @@ -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; diff --git a/main/admin/course_request_review.php b/main/admin/course_request_review.php index 4c9a44dbc9..82c84252c3 100755 --- a/main/admin/course_request_review.php +++ b/main/admin/course_request_review.php @@ -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; diff --git a/main/admin/dashboard_add_courses_to_user.php b/main/admin/dashboard_add_courses_to_user.php index 6a2fe78081..f8d8067020 100755 --- a/main/admin/dashboard_add_courses_to_user.php +++ b/main/admin/dashboard_add_courses_to_user.php @@ -223,7 +223,7 @@ $result = Database::query($sql); diff --git a/main/admin/filler.php b/main/admin/filler.php index d61babf60b..b9236b9ca0 100755 --- a/main/admin/filler.php +++ b/main/admin/filler.php @@ -58,7 +58,7 @@ if (count($output) > 0) { } $result .= ''; $result .= '
'; - Display::addFlash(Display::return_message($result, 'normal', false)); + echo Display::return_message($result, 'normal', false); } ?>
diff --git a/main/admin/languages.php b/main/admin/languages.php index 37f411f072..313fa3d19c 100755 --- a/main/admin/languages.php +++ b/main/admin/languages.php @@ -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 ' '.get_lang('LanguagesDisableAllExceptDefault').'

'; // selecting all the languages diff --git a/main/admin/ldap_import_students.php b/main/admin/ldap_import_students.php index 03c2994e6f..dfa3a8cbde 100755 --- a/main/admin/ldap_import_students.php +++ b/main/admin/ldap_import_students.php @@ -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 '

'; echo ''.get_lang('BackToNewSearch').''; diff --git a/main/admin/ldap_import_students_to_session.php b/main/admin/ldap_import_students_to_session.php index 9f0c2d9e36..aa1e1954a0 100755 --- a/main/admin/ldap_import_students_to_session.php +++ b/main/admin/ldap_import_students_to_session.php @@ -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 '

'; echo ''.get_lang('BackToNewSearch').''; diff --git a/main/admin/ldap_users_list.php b/main/admin/ldap_users_list.php index 4aa6a12f5e..8d22fa75ae 100755 --- a/main/admin/ldap_users_list.php +++ b/main/admin/ldap_users_list.php @@ -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; diff --git a/main/admin/ldap_users_synchro.php b/main/admin/ldap_users_synchro.php index 2f4a447fba..081cb2d911 100755 --- a/main/admin/ldap_users_synchro.php +++ b/main/admin/ldap_users_synchro.php @@ -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(); ?> diff --git a/main/admin/settings.lib.php b/main/admin/settings.lib.php index b0964c8b4d..5e1659b101 100755 --- a/main/admin/settings.lib.php +++ b/main/admin/settings.lib.php @@ -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 ''.Display::return_icon('new_template.png', get_lang('AddTemplate'), '', ICON_SIZE_MEDIUM).''; } else { $content_template = '{CSS}'.Database::escape_string($values['template_text']).''; @@ -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 = ''.get_lang('ClickHereToDownloadTheFile').''; - 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'); } } diff --git a/main/admin/skills_import.php b/main/admin/skills_import.php index 3b4d1a7d6d..2dffa2a82f 100755 --- a/main/admin/skills_import.php +++ b/main/admin/skills_import.php @@ -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( diff --git a/main/admin/special_exports.php b/main/admin/special_exports.php index c5a2f88a53..54e8346327 100755 --- a/main/admin/special_exports.php +++ b/main/admin/special_exports.php @@ -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 '
'.get_lang('Download').''; } 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 { diff --git a/main/admin/sub_language_add.php b/main/admin/sub_language_add.php index 88219c8314..93c1a86a47 100755 --- a/main/admin/sub_language_add.php +++ b/main/admin/sub_language_add.php @@ -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')); } } /** diff --git a/main/admin/user_move_stats.php b/main/admin/user_move_stats.php index 0c691d609f..401fc2adb2 100755 --- a/main/admin/user_move_stats.php +++ b/main/admin/user_move_stats.php @@ -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 ''; -Display::addFlash(Display::return_message(get_lang('CompareUserResultsBetweenCoursesAndCoursesInASession'), 'normal', false)); - // Some pagination $page = 1; diff --git a/main/admin/usergroup_import.php b/main/admin/usergroup_import.php index 66a84807e6..a91ac0991f 100755 --- a/main/admin/usergroup_import.php +++ b/main/admin/usergroup_import.php @@ -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(); ?>

:

diff --git a/main/attendance/attendance_calendar.php b/main/attendance/attendance_calendar.php index f3b05d78c4..ff2ab56b9f 100755 --- a/main/attendance/attendance_calendar.php +++ b/main/attendance/attendance_calendar.php @@ -33,17 +33,17 @@ $message_information = get_lang('AttendanceCalendarDescription'); if (!empty($message_information)) { $message = ''.get_lang('Information').'
'; $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') { diff --git a/main/attendance/attendance_sheet.php b/main/attendance/attendance_sheet.php index 728ced17e7..1892777bf9 100755 --- a/main/attendance/attendance_sheet.php +++ b/main/attendance/attendance_sheet.php @@ -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 = ''.get_lang('Information').'
'; $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; diff --git a/main/auth/reset.php b/main/auth/reset.php index d8f4b5dcc4..e2bf9811ba 100644 --- a/main/auth/reset.php +++ b/main/auth/reset.php @@ -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)); diff --git a/main/course_description/add.php b/main/course_description/add.php index 21c110efe7..35044d02a2 100755 --- a/main/course_description/add.php +++ b/main/course_description/add.php @@ -38,7 +38,7 @@ echo '
'; // 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 = ''.get_lang('QuestionPlan').'
'; $message .= $question[$description_type]; - Display::addFlash(Display::return_message($message, 'normal', false)); + echo Display::return_message($message, 'normal', false); } $form->display(); diff --git a/main/course_description/edit.php b/main/course_description/edit.php index 721306fb98..5d74e3c9ab 100755 --- a/main/course_description/edit.php +++ b/main/course_description/edit.php @@ -56,7 +56,7 @@ echo '
'; // 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 diff --git a/main/course_info/infocours.php b/main/course_info/infocours.php index 4d74ebade7..93ad03cc66 100755 --- a/main/course_info/infocours.php +++ b/main/course_info/infocours.php @@ -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 '
'; $form->display(); diff --git a/main/course_progress/thematic_plan.php b/main/course_progress/thematic_plan.php index aa5579da13..ed9133bd8a 100755 --- a/main/course_progress/thematic_plan.php +++ b/main/course_progress/thematic_plan.php @@ -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') { diff --git a/main/coursecopy/copy_course.php b/main/coursecopy/copy_course.php index 9fbb29f6a5..d15e14b422 100755 --- a/main/coursecopy/copy_course.php +++ b/main/coursecopy/copy_course.php @@ -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').': '. Security::remove_XSS($_POST['destination_course']). '', '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) { diff --git a/main/coursecopy/copy_course_session.php b/main/coursecopy/copy_course_session.php index 7de1379d0f..6ac032fd44 100755 --- a/main/coursecopy/copy_course_session.php +++ b/main/coursecopy/copy_course_session.php @@ -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); diff --git a/main/coursecopy/copy_course_session_selected.php b/main/coursecopy/copy_course_session_selected.php index 79ad879371..93fe90ff28 100644 --- a/main/coursecopy/copy_course_session_selected.php +++ b/main/coursecopy/copy_course_session_selected.php @@ -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); diff --git a/main/coursecopy/import_backup.php b/main/coursecopy/import_backup.php index e88bf8f515..1c328a8654 100755 --- a/main/coursecopy/import_backup.php +++ b/main/coursecopy/import_backup.php @@ -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 ''.get_lang('CourseHomepage').''; } else { if (!$error) { - Display::addFlash(Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning')); + echo Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning'); echo ''.get_lang('TryAgain').''; } elseif ($filename === false) { - Display::addFlash(Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error')); + echo Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error'); echo ''.get_lang('TryAgain').''; } else { if ($filename == '') { - Display::addFlash(Display::return_message(get_lang('SelectBackupFile'), 'error')); + echo Display::return_message(get_lang('SelectBackupFile'), 'error'); echo ''.get_lang('TryAgain').''; } else { - Display::addFlash(Display::return_message(get_lang('UploadError'), 'error')); + echo Display::return_message(get_lang('UploadError'), 'error'); echo ''.get_lang('TryAgain').''; } } @@ -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 ''.get_lang('TryAgain').''; } else { - Display::addFlash(Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning')); + echo Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning'); echo ''.get_lang('TryAgain').''; } } else { diff --git a/main/document/create_document.php b/main/document/create_document.php index 8f6382210f..8b507cbc92 100755 --- a/main/document/create_document.php +++ b/main/document/create_document.php @@ -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 { diff --git a/main/document/edit_document.php b/main/document/edit_document.php index 55ec9b9bc7..9b55d4638e 100755 --- a/main/document/edit_document.php +++ b/main/document/edit_document.php @@ -519,15 +519,15 @@ if ($owner_id == api_get_user_id() || $str_info .= $info_value.'
'; } $create_certificate = get_lang('CreateCertificateWithTags'); - Display::addFlash(Display::return_message( + echo Display::return_message( $create_certificate.':

'.$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 '
diff --git a/main/dropbox/index.php b/main/dropbox/index.php index 70ca957e07..cdc044c252 100755 --- a/main/dropbox/index.php +++ b/main/dropbox/index.php @@ -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').'
'.$return_information['message'], 'error')); + echo Display::return_message(get_lang('FormHasErrorsPleaseComplete').'
'.$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(); diff --git a/main/exercise/exercise_submit.php b/main/exercise/exercise_submit.php index 7858b23278..f7571aaa00 100755 --- a/main/exercise/exercise_submit.php +++ b/main/exercise/exercise_submit.php @@ -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 "", ", get_lang('Sound')."; diff --git a/main/gradebook/gradebook_view_result.php b/main/gradebook/gradebook_view_result.php index 9e30750509..4d186abd5f 100755 --- a/main/gradebook/gradebook_view_result.php +++ b/main/gradebook/gradebook_view_result.php @@ -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 diff --git a/main/gradebook/lib/fe/displaygradebook.php b/main/gradebook/lib/fe/displaygradebook.php index 1ff87fa42b..d4637e1072 100755 --- a/main/gradebook/lib/fe/displaygradebook.php +++ b/main/gradebook/lib/fe/displaygradebook.php @@ -297,7 +297,7 @@ class DisplayGradebook $scoreinfo .= ''.sprintf(get_lang('TotalX'), $scorecourse_display.$aditionalButtons).''; } - 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())) ? '' : ''.get_lang('GradebookDescriptionLog').''.': '.$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()); } diff --git a/main/inc/ajax/record_audio_wami.ajax.php b/main/inc/ajax/record_audio_wami.ajax.php index ee9413bd33..61146cfd8a 100755 --- a/main/inc/ajax/record_audio_wami.ajax.php +++ b/main/inc/ajax/record_audio_wami.ajax.php @@ -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; } diff --git a/main/inc/introductionSection.inc.php b/main/inc/introductionSection.inc.php index ea281c7ecc..e62f4383ee 100755 --- a/main/inc/introductionSection.inc.php +++ b/main/inc/introductionSection.inc.php @@ -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'); } }