Skip to content
Browse files

MDL-25478 - stop fatal errors adding blocks on the module edit page

Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
  • Loading branch information...
1 parent c63ebd4 commit ebb32067bf928b0decaa406ea3f281fa14bf2f4f @svidusov svidusov committed with danpoltawski
Showing with 5 additions and 3 deletions.
  1. +5 −3 course/modedit.php
View
8 course/modedit.php
@@ -42,12 +42,14 @@
}
if (!empty($add)) {
- $url->param('add', $add);
- $PAGE->set_url($url);
-
$section = required_param('section', PARAM_INT);
$course = required_param('course', PARAM_INT);
+ $url->param('add', $add);
+ $url->param('section', $section);
+ $url->param('course', $course);
+ $PAGE->set_url($url);
+
$course = $DB->get_record('course', array('id'=>$course), '*', MUST_EXIST);
$module = $DB->get_record('modules', array('name'=>$add), '*', MUST_EXIST);

0 comments on commit ebb3206

Please sign in to comment.
Something went wrong with that request. Please try again.