diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 93f70b3797b..bce42d2e2ce 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -354,8 +354,11 @@ class assign { $o = ''; $mform = null; $notices = array(); + $nextpageparams = array(); - $nextpageparams = array('id'=>$this->get_course_module()->id); + if (!empty($this->get_course_module()->id)) { + $nextpageparams['id'] = $this->get_course_module()->id; + } // Handle form submissions first. if ($action == 'savesubmission') {