Skip to content

Commit

Permalink
MDL-66016 block_myoverview: Improve settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Aug 23, 2019
1 parent 2276614 commit 8196aa4
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions blocks/myoverview/settings.php
Expand Up @@ -27,23 +27,29 @@
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',
Expand Down

0 comments on commit 8196aa4

Please sign in to comment.