MDL-60443 dataformat lib: Change a wrong variable name

The variable $type really is $dataformat. I have changed it for
prevent the error and show a correct error message.
This commit is contained in:
David Herney
2017-12-05 13:52:36 +08:00
committed by Damyon Wiese
parent 8721afb2c6
commit 5a6a4cef8b
+1 -1
View File
@@ -44,7 +44,7 @@ function download_as_dataformat($filename, $dataformat, $columns, $iterator, $ca
$classname = 'dataformat_' . $dataformat . '\writer';
if (!class_exists($classname)) {
throw new coding_exception("Unable to locate dataformat/$type/classes/writer.php");
throw new coding_exception("Unable to locate dataformat/$dataformat/classes/writer.php");
}
$format = new $classname;