blank.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Script that displays a blank page (with later a message saying why)
  5. * @package chamilo.learnpath
  6. * @author Yannick Warnier <ywarnier@beeznest.org>
  7. */
  8. /**
  9. * Code
  10. */
  11. $language_file = array('learnpath', 'document','exercice');
  12. // Flag to allow for anonymous user - needs to be set before global.inc.php.
  13. $use_anonymous = true;
  14. require_once '../inc/global.inc.php';
  15. Display::display_reduced_header();
  16. if (isset($_GET['error'])) {
  17. switch ($_GET['error']){
  18. case 'document_deleted':
  19. echo '<br /><br />';
  20. Display::display_error_message(get_lang('DocumentHasBeenDeleted'));
  21. break;
  22. case 'prerequisites':
  23. echo '<br /><br />';
  24. Display::display_warning_message(get_lang('LearnpathPrereqNotCompleted'));
  25. break;
  26. case 'document_not_found':
  27. echo '<br /><br />';
  28. Display::display_warning_message(get_lang('FileNotFound'));
  29. break;
  30. case 'reached_one_attempt':
  31. //Seems not be use
  32. echo '<br /><br />';
  33. Display::display_warning_message(get_lang('ReachedOneAttempt'));
  34. break;
  35. case 'max_attempt_reached':
  36. echo '<br /><br />';
  37. Display::display_warning_message(get_lang('ReachedMaxAttempt'));
  38. break;
  39. default:
  40. break;
  41. }
  42. } elseif (isset($_GET['msg']) && $_GET['msg'] == 'exerciseFinished') {
  43. echo '<br /><br />';
  44. Display::display_normal_message(get_lang('ExerciseFinished'));
  45. }
  46. Display::display_footer();