Skip to content
Snippets Groups Projects
Commit e2fec021 authored by 3i Logic LMS's avatar 3i Logic LMS
Browse files

Implement Security

parent 2740dbfd
Branches
No related tags found
No related merge requests found
......@@ -38,6 +38,11 @@ $delete = optional_param('delete', null, PARAM_RAW);
$id = optional_param('id', null, PARAM_INT);
require_login();
$context = context_system::instance();
if (!has_capability('block/learning_plan:managepages', $context)) {
redirect($CFG->wwwroot);
}
$context = context_system::instance();
$PAGE->set_context($context);
$PAGE->set_url('/blocks/learning_plan/view.php');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment