MDL-53773 tool_lp: Missing validate_context call in external function
authorFrederic Massart <fred@moodle.com>
Thu, 14 Apr 2016 03:24:11 +0000 (11:24 +0800)
committerFrederic Massart <fred@moodle.com>
Mon, 18 Apr 2016 03:06:01 +0000 (11:06 +0800)
Just sneaking that in as I noticed it while fixing RTL.

admin/tool/lp/classes/external.php

index a80606f..61a922f 100644 (file)
@@ -279,6 +279,7 @@ class external extends external_api {
 
         $competency = api::read_competency($params['competencyid']);
         $framework = api::read_framework($competency->get_competencyframeworkid());
+        self::validate_context($framework->get_context());
         $renderable = new output\competency_summary($competency, $framework, $params['includerelated'], $params['includecourses']);
         $renderer = $PAGE->get_renderer('tool_lp');