1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 09:55:33 +02:00

MDL-66016 block_myoverview: Improve settings page

This commit is contained in:
Alexander Bias 2019-07-02 14:19:38 +02:00
parent 2276614cd8
commit 8196aa4437

@ -27,23 +27,29 @@ defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
require_once($CFG->dirroot . '/blocks/myoverview/lib.php');
// Presentation options heading.
$settings->add(new admin_setting_heading('block_myoverview/appearance',
get_string('appearance', 'admin'),
''));
// Display Course Categories on Dashboard course items (cards, lists, summary items).
$settings->add(new admin_setting_configcheckbox(
'block_myoverview/displaycategories',
get_string('displaycategories', 'block_myoverview'),
get_string('displaycategories_help', 'block_myoverview'),
1));
$choices = array(BLOCK_MYOVERVIEW_VIEW_CARD => get_string('card', 'block_myoverview'),
BLOCK_MYOVERVIEW_VIEW_LIST => get_string('list', 'block_myoverview'),
BLOCK_MYOVERVIEW_VIEW_SUMMARY => get_string('summary', 'block_myoverview'));
'block_myoverview/displaycategories',
get_string('displaycategories', 'block_myoverview'),
get_string('displaycategories_help', 'block_myoverview'),
1));
// Enable / Disable available layouts.
$choices = array(BLOCK_MYOVERVIEW_VIEW_CARD => get_string('card', 'block_myoverview'),
BLOCK_MYOVERVIEW_VIEW_LIST => get_string('list', 'block_myoverview'),
BLOCK_MYOVERVIEW_VIEW_SUMMARY => get_string('summary', 'block_myoverview'));
$settings->add(new admin_setting_configmulticheckbox(
'block_myoverview/layouts',
get_string('layouts', 'block_myoverview'),
get_string('layouts_help', 'block_myoverview'),
$choices,
$choices));
'block_myoverview/layouts',
get_string('layouts', 'block_myoverview'),
get_string('layouts_help', 'block_myoverview'),
$choices,
$choices));
unset ($choices);
// Enable / Disable course filter items.
$settings->add(new admin_setting_heading('block_myoverview/availablegroupings',