]> git.mjollnir.org Git - moodle.git/commitdiff
Small clean up, and fix a link to a required file for robustness.
authorthepurpleblob <thepurpleblob>
Tue, 2 May 2006 09:04:38 +0000 (09:04 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 2 May 2006 09:04:38 +0000 (09:04 +0000)
lib/questionlib.php

index 831bc0020da2dacb3516ca74aa0b39cd217cc33a..e5b4c5875bde904b7d8d5b347328141db488bc7e 100644 (file)
@@ -1522,6 +1522,11 @@ function get_questions_category( $category, $noparent=false ) {
     return $qresults;
 }
 
+
+//===========================
+// Import/Export Functions
+//===========================
+
 /**
  * Get list of available import or export formats
  * @param string $type 'import' if import list, otherwise export list assumed
@@ -1533,8 +1538,7 @@ function get_import_export_formats( $type ) {
     $fileformats = get_list_of_plugins("question/format");
 
     $fileformatname=array();
-    //FIX ME: this is confusing and may not always work, better use absolute path instead
-    require_once( "format.php" );
+    require_once( "{$CFG->dirroot}/question/format.php" );
     foreach ($fileformats as $key => $fileformat) {
         $format_file = $CFG->dirroot . "/question/format/$fileformat/format.php";
         if (file_exists( $format_file ) ) {