Commit 47a7c930 authored by Nigel McNie's avatar Nigel McNie
Browse files

Add rudimentary checking for the zip command.

(cherry picked from commit f134754c2583647bcbf0c65c31efadb469b1eca2)
parent fa38ca20
......@@ -39,6 +39,11 @@ $exportplugins = plugins_installed('export');
if (!$exportplugins) {
die_info(get_string('noexportpluginsenabled', 'export'));
if (!is_executable(get_config('pathtozip'))) {
log_info("Either you do not have the 'zip' command installed, or the config setting 'pathtozip' is not pointing at your zip command."
. " Until you fix this, you will not be able to use the export system.");
die_info(get_string('zipnotinstalled', 'export'));
foreach ($exportplugins as $plugin) {
safe_require('export', $plugin->name);
......@@ -42,5 +42,6 @@ $string['unabletoexportportfoliousingoptions'] = 'Unable to export a portfolio u
$string['unabletogenerateexport'] = 'Unable to generate export';
$string['viewstoexport'] = 'Views to export';
$string['whatdoyouwanttoexport'] = 'What do you want to export?';
$string['zipnotinstalled'] = 'Your system does not have the zip command. Please install zip to enable this feature';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment