mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
Merge branch 'MDL-68797-master' of https://github.com/nguyenphuctien/moodle
This commit is contained in:
commit
44124e453d
6 changed files with 322 additions and 0 deletions
|
@ -302,6 +302,7 @@ class api {
|
|||
$settings->tool_mobile_forcelogout = get_config('tool_mobile', 'forcelogout');
|
||||
$settings->tool_mobile_customlangstrings = get_config('tool_mobile', 'customlangstrings');
|
||||
$settings->tool_mobile_disabledfeatures = get_config('tool_mobile', 'disabledfeatures');
|
||||
$settings->tool_mobile_filetypeexclusionlist = get_config('tool_mobile', 'filetypeexclusionlist');
|
||||
$settings->tool_mobile_custommenuitems = get_config('tool_mobile', 'custommenuitems');
|
||||
$settings->tool_mobile_apppolicy = get_config('tool_mobile', 'apppolicy');
|
||||
}
|
||||
|
|
|
@ -63,6 +63,9 @@ $string['downloadcourse'] = 'Download course';
|
|||
$string['downloadcourses'] = 'Download courses';
|
||||
$string['enablesmartappbanners'] = 'Enable App Banners';
|
||||
$string['enablesmartappbanners_desc'] = 'If enabled, a banner promoting the mobile app will be displayed when accessing the site using a mobile browser.';
|
||||
$string['filetypeexclusionlist'] = 'File type exclusion list';
|
||||
$string['filetypeexclusionlist_desc'] = 'List of file types that we don\'t want users to try and open in the app. These files will still be listed on the app\'s course screen, but attempting to open them on iOS or Android would display a warning to the user indicating that this file type is not intended for use on a mobile device. They can then either cancel the open, or ignore the warning and open anyway.';
|
||||
$string['filetypeexclusionlistplaceholder'] = 'Mobile file type exclusion list';
|
||||
$string['forcedurlscheme'] = 'If you want to allow only your custom branded app to be opened via a browser window, then specify its URL scheme here. If you want to allow only the official app, then set the default value. Leave the field empty if you want to allow any app.';
|
||||
$string['forcedurlscheme_key'] = 'URL scheme';
|
||||
$string['forcelogout'] = 'Force log out';
|
||||
|
@ -81,6 +84,7 @@ $string['loginintheapp'] = 'Via the app';
|
|||
$string['logininthebrowser'] = 'Via a browser window (for SSO plugins)';
|
||||
$string['loginintheembeddedbrowser'] = 'Via an embedded browser (for SSO plugins)';
|
||||
$string['mainmenu'] = 'Main menu';
|
||||
$string['managefiletypes'] = 'Manage file types';
|
||||
$string['minimumversion'] = 'If an app version is specified (3.8.0 or higher), any users using an older app version will be prompted to upgrade their app before being allowed access to the site.';
|
||||
$string['minimumversion_key'] = 'Minimum app version required';
|
||||
$string['mobileapp'] = 'Mobile app';
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use core_admin\local\settings\autocomplete;
|
||||
|
||||
if ($hassiteconfig) {
|
||||
|
||||
$ADMIN->add('root', new admin_category('mobileapp', new lang_string('mobileapp', 'tool_mobile')), 'development');
|
||||
|
@ -188,6 +190,27 @@ if ($hassiteconfig) {
|
|||
new lang_string('custommenuitems', 'tool_mobile'),
|
||||
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
|
||||
|
||||
// File type exclusionlist.
|
||||
$choices = [];
|
||||
foreach (core_filetypes::get_types() as $key => $info) {
|
||||
$text = '.' . $key;
|
||||
if (!empty($info['type'])) {
|
||||
$text .= ' (' . $info['type'] . ')';
|
||||
}
|
||||
$choices[$key] = $text;
|
||||
}
|
||||
|
||||
$attributes = [
|
||||
'manageurl' => new \moodle_url('/admin/tool/filetypes/index.php'),
|
||||
'managetext' => get_string('managefiletypes', 'tool_mobile'),
|
||||
'multiple' => true,
|
||||
'delimiter' => ',',
|
||||
'placeholder' => get_string('filetypeexclusionlistplaceholder', 'tool_mobile')
|
||||
];
|
||||
$temp->add(new autocomplete('tool_mobile/filetypeexclusionlist',
|
||||
new lang_string('filetypeexclusionlist', 'tool_mobile'),
|
||||
new lang_string('filetypeexclusionlist_desc', 'tool_mobile'), array(), $choices, $attributes));
|
||||
|
||||
$temp->add(new admin_setting_heading('tool_mobile/language',
|
||||
new lang_string('language'), ''));
|
||||
|
||||
|
|
|
@ -213,6 +213,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
|
|||
array('name' => 'tool_mobile_forcelogout', 'value' => 0),
|
||||
array('name' => 'tool_mobile_customlangstrings', 'value' => ''),
|
||||
array('name' => 'tool_mobile_disabledfeatures', 'value' => ''),
|
||||
array('name' => 'tool_mobile_filetypeexclusionlist', 'value' => ''),
|
||||
array('name' => 'tool_mobile_custommenuitems', 'value' => ''),
|
||||
array('name' => 'tool_mobile_apppolicy', 'value' => ''),
|
||||
array('name' => 'calendartype', 'value' => $CFG->calendartype),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue