Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-6325 Bug Fix

  • Loading branch information...
commit 4e2cbb28e57f8f79cf4379f26b18ae4d76e533be 1 parent 5a521aa
mark-nielsen authored
Showing with 2 additions and 12 deletions.
  1. +2 −12 mod/lesson/import.php
View
14 mod/lesson/import.php
@@ -4,6 +4,7 @@
require_once("../../config.php");
require_once("lib.php");
require_once("locallib.php");
+ require_once($CFG->libdir.'/questionlib.php');
$id = required_param('id', PARAM_INT); // Course Module ID
$pageid = optional_param('pageid', '', PARAM_INT); // Page ID
@@ -51,7 +52,6 @@
}
require("format.php"); // Parent class
- require("$CFG->libdir/questionlib.php"); // for the constants used in quiz/format/<format>/format.php
require("$CFG->dirroot/question/format/$form->format/format.php");
$classname = "qformat_$form->format";
@@ -78,17 +78,7 @@
/// Print upload form
- $fileformats = get_list_of_plugins('question/format');
- $fileformatnames = array();
- foreach ($fileformats as $key => $fileformat) {
- $formatname = get_string($fileformat, 'lesson');
- if ($formatname == "[[$fileformat]]") {
- $formatname = $fileformat; // Just use the raw folder name
- }
- $fileformatnames[$fileformat] = $formatname;
- }
- natcasesort($fileformatnames);
-
+ $fileformatnames = get_import_export_formats('import');
print_heading_with_help($strimportquestions, "import", "lesson");
Please sign in to comment.
Something went wrong with that request. Please try again.