mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-73598 reportbuilder: feature switch for custom reports.
This commit is contained in:
parent
a01f1fa71c
commit
335012580b
6 changed files with 105 additions and 8 deletions
|
@ -30,7 +30,13 @@ use core_reportbuilder\permission;
|
|||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
/** @var admin_root $ADMIN */
|
||||
$ADMIN->add('reports', new admin_category('reportbuilder', new lang_string('reportbuilder', 'core_reportbuilder')));
|
||||
$ADMIN->add(
|
||||
'reports', new admin_category(
|
||||
'reportbuilder',
|
||||
new lang_string('reportbuilder', 'core_reportbuilder'),
|
||||
empty($CFG->enablecustomreports)
|
||||
)
|
||||
);
|
||||
|
||||
$ADMIN->add(
|
||||
'reportbuilder', new accesscallback(
|
||||
|
@ -39,6 +45,7 @@ $ADMIN->add(
|
|||
(new moodle_url('/reportbuilder/index.php'))->out(),
|
||||
static function(accesscallback $accesscallback): bool {
|
||||
return permission::can_view_reports_list();
|
||||
}
|
||||
},
|
||||
empty($CFG->enablecustomreports)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -64,6 +64,12 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
|||
1)
|
||||
);
|
||||
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecustomreports',
|
||||
new lang_string('enablecustomreports', 'core_reportbuilder'),
|
||||
new lang_string('enablecustomreports_desc', 'core_reportbuilder'),
|
||||
1
|
||||
));
|
||||
|
||||
$fullunicodesupport = true;
|
||||
if ($DB->get_dbfamily() == 'mysql') {
|
||||
$collation = $DB->get_dbcollation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue