mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-45301 assign: Add font options for EditPDF
This commit is contained in:
parent
8503f2cfd8
commit
9e725bc168
19 changed files with 160 additions and 9 deletions
|
@ -22,6 +22,10 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir . '/pdflib.php');
|
||||
|
||||
use core_admin\local\settings\filesize;
|
||||
|
||||
$capabilities = array(
|
||||
|
@ -174,6 +178,19 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
|||
$temp->add(new admin_setting_configselect('moodlecourse/maxbytes', new lang_string('maximumupload'),
|
||||
new lang_string('coursehelpmaximumupload'), key($choices), $choices));
|
||||
|
||||
if (!empty($CFG->enablepdfexportfont)) {
|
||||
$pdf = new \pdf;
|
||||
$fontlist = $pdf->get_export_fontlist();
|
||||
// Show the option if the font is defined more than one.
|
||||
if (count($fontlist) > 1) {
|
||||
$temp->add(new admin_setting_configselect('moodlecourse/pdfexportfont',
|
||||
new lang_string('pdfexportfont', 'course'),
|
||||
new lang_string('pdfexportfont_help', 'course'),
|
||||
'freesans', $fontlist
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// Completion tracking.
|
||||
$temp->add(new admin_setting_heading('progress', new lang_string('completion','completion'), ''));
|
||||
$temp->add(new admin_setting_configselect('moodlecourse/enablecompletion', new lang_string('completion', 'completion'),
|
||||
|
|
|
@ -18,6 +18,8 @@ if ($hassiteconfig) {
|
|||
$temp->add(new admin_setting_configcheckbox('langstringcache', new lang_string('langstringcache', 'admin'), new lang_string('configlangstringcache', 'admin'), 1));
|
||||
$temp->add(new admin_setting_configtext('locale', new lang_string('localetext', 'admin'), new lang_string('configlocale', 'admin'), '', PARAM_FILE));
|
||||
$temp->add(new admin_setting_configselect('latinexcelexport', new lang_string('latinexcelexport', 'admin'), new lang_string('configlatinexcelexport', 'admin'), '0', array('0'=>'Unicode','1'=>'Latin')));
|
||||
$temp->add(new admin_setting_configcheckbox('enablepdfexportfont', new lang_string('enablepdfexportfont', 'admin'),
|
||||
new lang_string('enablepdfexportfont_desc', 'admin'), 0));
|
||||
$temp->add(new setting_scheduled_task_status('langimporttaskstatus', '\tool_langimport\task\update_langpacks_task'));
|
||||
|
||||
$ADMIN->add('language', $temp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue