Improve SCORM tool to show message when item not found Fixing CT#253 requires testing

skala
Julio Montoya 16 years ago
parent a6e215bbe8
commit a7fcda267f
  1. 20
      main/newscorm/blank.php
  2. 2
      main/newscorm/learnpath.class.php

@ -1,28 +1,21 @@
<?php //$id: $ <?php //$id: $
/* For licensing terms, see /chamilo_license.txt */
/** /**
* Script that displays a blank page (with later a message saying why) * Script that displays a blank page (with later a message saying why)
* @package dokeos.learnpath * @package dokeos.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org> * @author Yannick Warnier <ywarnier@beeznest.org>
*/ */
/**
* Script
*/
$language_file[] = "learnpath"; $language_file[] = array('learnpath','document');
//flag to allow for anonymous user - needs to be set before global.inc.php //flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true; $use_anonymous = true;
require('../inc/global.inc.php'); require_once '../inc/global.inc.php';
include_once('../inc/reduced_header.inc.php'); require_once '../inc/reduced_header.inc.php';
?> ?>
<body> <body>
<?php <?php
if (isset($_GET['error'])) { if (isset($_GET['error'])) {
switch($_GET['error']){ switch($_GET['error']){
case 'document_deleted': case 'document_deleted':
@ -33,6 +26,10 @@ if (isset($_GET['error'])) {
echo '<br /><br />'; echo '<br /><br />';
Display::display_normal_message(get_lang('_prereq_not_complete')); Display::display_normal_message(get_lang('_prereq_not_complete'));
break; break;
case 'document_not_found':
echo '<br /><br />';
Display::display_normal_message(get_lang('FileNotFound'));
break;
default: default:
break; break;
} }
@ -41,6 +38,5 @@ if (isset($_GET['error'])) {
Display::display_normal_message(get_lang('ExerciseFinished')); Display::display_normal_message(get_lang('ExerciseFinished'));
} }
?> ?>
</body> </body>
</html> </html>

@ -3091,6 +3091,8 @@ class learnpath {
} else { } else {
$file = $course_path . '/scorm/' . $lp_path . '/' . $decoded; $file = $course_path . '/scorm/' . $lp_path . '/' . $decoded;
} }
} else {
$file = 'blank.php?error=document_not_found';
} }
} }
//}else{ //}else{

Loading…
Cancel
Save