From 947217d7254b260e556117becfb8c8b93729b521 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Tue, 2 May 2006 09:04:38 +0000 Subject: [PATCH] Small clean up, and fix a link to a required file for robustness. --- lib/questionlib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/questionlib.php b/lib/questionlib.php index 831bc0020d..e5b4c5875b 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -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 ) ) { -- 2.39.5