mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
Merge branch 'MDL-79307' of https://github.com/paulholden/moodle
This commit is contained in:
commit
5f9310dc99
@ -20,7 +20,9 @@ use core\task\adhoc_task;
|
||||
use core\task\manager;
|
||||
use assignfeedback_editpdf\document_services;
|
||||
use assignfeedback_editpdf\combined_document;
|
||||
use assignfeedback_editpdf\pdf;
|
||||
use context_module;
|
||||
use moodle_exception;
|
||||
use assign;
|
||||
|
||||
/**
|
||||
@ -47,6 +49,13 @@ class convert_submission extends adhoc_task {
|
||||
return;
|
||||
}
|
||||
|
||||
// Early exit if ghostscript isn't correctly configured.
|
||||
$result = pdf::test_gs_path(false);
|
||||
if ($result->status !== pdf::GSPATH_OK) {
|
||||
$statusstring = get_string('test_' . $result->status, 'assignfeedback_editpdf');
|
||||
throw new moodle_exception('pathtogserror', 'assignfeedback_editpdf', '', $statusstring, $result->status);
|
||||
}
|
||||
|
||||
$cm = get_coursemodule_from_instance('assign', $submission->assignment, 0, false, MUST_EXIST);
|
||||
$context = context_module::instance($cm->id);
|
||||
$assign = new assign($context, null, null);
|
||||
|
@ -59,6 +59,7 @@ $string['generatefeedback'] = 'Generate feedback PDF';
|
||||
$string['gotopage'] = 'Go to page';
|
||||
$string['green'] = 'Green';
|
||||
$string['gsimage'] = 'Ghostscript test image';
|
||||
$string['pathtogserror'] = 'The configured path to ghostscript is not correctly set: {$a}';
|
||||
$string['pathtogspathdesc'] = 'Please note that annotate PDF requires the path to ghostscript to be set in {$a}.';
|
||||
$string['highlight'] = 'Highlight';
|
||||
$string['jsrequired'] = 'JavaScript is required to annotate a PDF. Please enable JavaScript in your browser to use this feature.';
|
||||
|
Loading…
x
Reference in New Issue
Block a user