]> git.mjollnir.org Git - moodle.git/commitdiff
Some better feedback about lack of XSLT functions
authormoodler <moodler>
Tue, 8 Feb 2005 07:23:04 +0000 (07:23 +0000)
committermoodler <moodler>
Tue, 8 Feb 2005 07:23:04 +0000 (07:23 +0000)
backup/bb/restore_bb.php

index 238b8a6745959b34bf5eb1f688c8b0fc62dd0cca..d1ba5eb2f951b5cd7e0df3524b817b585c4a14fd 100644 (file)
@@ -31,16 +31,18 @@ function choose_bb_xsl($manifest){
 function blackboard_convert($dir){
     global $CFG;
 
-    if (!function_exists('xslt_create')) {  // XSLT MUST be installed for this to work
-        return true;
-    }
 
     // Check for a Blackboard manifest file
-    if(is_file($dir."/imsmanifest.xml")){
+    if (is_file($dir."/imsmanifest.xml")){
 
         //Select the proper XSL file
         $xslt_file = choose_bb_xsl($dir."/imsmanifest.xml");
 
+        if (!function_exists('xslt_create')) {  // XSLT MUST be installed for this to work
+            notify('You need the XSLT library installed in PHP to open this Blackboard file');
+            return false;
+        }
+
         //TODO: Use the get_string function
         echo "<li>Converting Blackboard export</li>";