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-06 19:53:34 +13:00
committed by Jun Pataleta
parent f013112752
commit d52e5dd32d
+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;