Fix flash message when saving a exercise question

pull/2487/head
Angel Fernando Quiroz Campos 9 years ago
parent a1842c1b30
commit aabbf9d4f4
  1. 12
      main/exercise/admin.php

@ -344,6 +344,12 @@ $htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_JS_PATH).'hotspot/css/hotspot.css">';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'hotspot/js/hotspot.js"></script>';
if (isset($_GET['message'])) {
if (in_array($_GET['message'], array('ExerciseStored', 'ItemUpdated', 'ItemAdded'))) {
Display::addFlash(Display::return_message(get_lang($_GET['message']), 'confirmation'));
}
}
Display::display_header($nameTools, 'Exercise');
/*
if ($objExercise->exercise_was_added_in_lp) {
@ -424,12 +430,6 @@ if ($inATest) {
echo '</div>';
}
if (isset($_GET['message'])) {
if (in_array($_GET['message'], array('ExerciseStored', 'ItemUpdated', 'ItemAdded'))) {
Display::addFlash(Display::return_message(get_lang($_GET['message']), 'confirmation'));
}
}
if ($newQuestion || $editQuestion) {
// Question management
$type = isset($_REQUEST['answerType']) ? Security::remove_XSS($_REQUEST['answerType']) : null;

Loading…
Cancel
Save