MDL-71062 core: Step 1 deprecation of print_error function

This commit is contained in:
Sujith Haridasan
2022-07-13 08:20:54 +05:30
parent a23f0bff3e
commit 73d604369d
506 changed files with 1511 additions and 1488 deletions
+3 -3
View File
@@ -8814,15 +8814,15 @@ function admin_externalpage_setup($section, $extrabutton = '', array $extraurlpa
if (!$hassiteconfig) {
// The requested section could depend on a different capability
// but most likely the user has inadequate capabilities
print_error('accessdenied', 'admin');
throw new \moodle_exception('accessdenied', 'admin');
} else {
print_error('sectionerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
throw new \moodle_exception('sectionerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
}
}
// this eliminates our need to authenticate on the actual pages
if (!$extpage->check_access()) {
print_error('accessdenied', 'admin');
throw new \moodle_exception('accessdenied', 'admin');
die;
}