mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-53923 mod_assign: test unoconv path
This commit is contained in:
parent
65cbefc403
commit
c4d692285f
7 changed files with 221 additions and 0 deletions
|
@ -2282,3 +2282,22 @@ function upgrade_install_plugins(array $installable, $confirmed, $heading='', $c
|
|||
die();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Method used to check the installed unoconv version.
|
||||
*
|
||||
* @param environment_results $result object to update, if relevant.
|
||||
* @return environment_results|null updated results or null if unoconv path is not executable.
|
||||
*/
|
||||
function check_unoconv_version(environment_results $result){
|
||||
global $CFG;
|
||||
|
||||
if (!during_initial_install() && !empty($CFG->pathtounoconv) && is_executable(trim($CFG->pathtounoconv))) {
|
||||
|
||||
if (assignfeedback_editpdf\pdf::check_unoconv_version_support() === false) {
|
||||
$result->setInfo('unoconv version not supported');
|
||||
$result->setStatus(false);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue