Commit 9244faa3 authored by jun's avatar jun

Merge branch 'MDL-59766-master' of git://github.com/damyon/moodle

parents 6b58bb56 9a73d11c
......@@ -39,6 +39,8 @@ $string['command'] = 'Command:';
$string['commentcontextmenu'] = 'Comment context menu';
$string['couldnotsavepage'] = 'Could not save page {$a}';
$string['currentstamp'] = 'Stamp';
$string['default'] = 'Enabled by default';
$string['default_help'] = 'If set, this feedback method will be enabled by default for all new assignments.';
$string['deleteannotation'] = 'Delete annotation';
$string['deletecomment'] = 'Delete comment';
$string['deletefeedback'] = 'Delete feedback PDF';
......
......@@ -332,12 +332,11 @@ class assign_feedback_editpdf extends assign_feedback_plugin {
}
/**
* Automatically enable or disable editpdf feedback plugin based on
* whether the ghostscript path is set correctly.
* Determine if ghostscript is available and working.
*
* @return bool
*/
public function is_enabled() {
public function is_available() {
if ($this->enabledcache === null) {
$testpath = assignfeedback_editpdf\pdf::test_gs_path(false);
$this->enabledcache = ($testpath->status == assignfeedback_editpdf\pdf::GSPATH_OK);
......@@ -345,12 +344,12 @@ class assign_feedback_editpdf extends assign_feedback_plugin {
return $this->enabledcache;
}
/**
* Automatically hide the setting for the editpdf feedback plugin.
* Prevent enabling this plugin if ghostscript is not available.
*
* @return bool false
*/
public function is_configurable() {
return false;
return $this->is_available();
}
/**
......
......@@ -24,6 +24,11 @@
defined('MOODLE_INTERNAL') || die();
// Enabled by default.
$settings->add(new admin_setting_configcheckbox('assignfeedback_editpdf/default',
new lang_string('default', 'assignfeedback_editpdf'),
new lang_string('default_help', 'assignfeedback_editpdf'), 1));
// Stamp files setting.
$name = 'assignfeedback_editpdf/stamps';
$title = get_string('stamps','assignfeedback_editpdf');
......
Markdown is supported
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