Permalink
Browse files

Backporting Howard's commit fixing bug #2963 for import/export dropdo…

…wn from HEAD
  • Loading branch information...
1 parent 8d37ee0 commit c32eee0b15f5a48db64a42ba333d73e97913dd60 mjollnir_ committed Apr 19, 2005
Showing with 10 additions and 4 deletions.
  1. +5 −2 mod/quiz/export.php
  2. +5 −2 mod/quiz/import.php
View
@@ -4,6 +4,10 @@
require_once("../../config.php");
require_once("lib.php");
+ // list formats that are supported for export
+ // need to change this if you add something!
+ $fileformats = array( 'gift', 'xml', 'qti' );
+
require_variable($category);
optional_variable($format);
@@ -74,8 +78,7 @@
error("No categories!");
}
- $fileformats = get_list_of_plugins("mod/quiz/format");
- $fileformatname = array();
+ // iterate over valid formats to generate dropdown list
foreach ($fileformats as $key => $fileformat) {
$formatname = get_string($fileformat, 'quiz');
if ($formatname == "[[$fileformat]]") {
View
@@ -4,6 +4,11 @@
require_once("../../config.php");
require_once("lib.php");
+ // list of supported file formats
+ // if you add another one it must be added here to appear on the list
+ $fileformats = array('aiken','aon','blackboard','coursetestmanager',
+ 'gift','learnwise','missingword','webct','xml' );
+
require_variable($category);
optional_variable($format);
@@ -92,8 +97,6 @@
error("No categories!");
}
- $fileformats = get_list_of_plugins("mod/quiz/format");
- $fileformatname = array();
foreach ($fileformats as $key => $fileformat) {
$formatname = get_string($fileformat, 'quiz');
if ($formatname == "[[$fileformat]]") {

0 comments on commit c32eee0

Please sign in to comment.