mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-44822 assignfeedback_editpdf: Stop test generation in is_enabled()
This change also moves one of the checks in test_gs_path. If generateimage is false, there's no need to stat for the fixture file.
This commit is contained in:
parent
9b8555fbea
commit
9f7674bddc
@ -546,13 +546,13 @@ class pdf extends \FPDI {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$testfile = $CFG->dirroot.'/mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf';
|
||||
if (!file_exists($testfile)) {
|
||||
$ret->status = self::GSPATH_NOTESTFILE;
|
||||
if (!$generateimage) {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
if (!$generateimage) {
|
||||
$testfile = $CFG->dirroot.'/mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf';
|
||||
if (!file_exists($testfile)) {
|
||||
$ret->status = self::GSPATH_NOTESTFILE;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ class assign_feedback_editpdf extends assign_feedback_plugin {
|
||||
* @return bool
|
||||
*/
|
||||
public function is_enabled() {
|
||||
$testpath = assignfeedback_editpdf\pdf::test_gs_path();
|
||||
$testpath = assignfeedback_editpdf\pdf::test_gs_path(false);
|
||||
if ($testpath->status == assignfeedback_editpdf\pdf::GSPATH_OK) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user