mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch 'MDL-53841-master' of http://github.com/damyon/moodle
This commit is contained in:
commit
fbc6c48736
1 changed files with 6 additions and 1 deletions
|
@ -205,7 +205,12 @@ class assign {
|
|||
public function register_return_link($action, $params) {
|
||||
global $PAGE;
|
||||
$params['action'] = $action;
|
||||
$currenturl = new moodle_url('/mod/assign/view.php', array('id' => $this->get_course_module()->id));
|
||||
$cm = $this->get_course_module();
|
||||
if ($cm) {
|
||||
$currenturl = new moodle_url('/mod/assign/view.php', array('id' => $cm->id));
|
||||
} else {
|
||||
$currenturl = new moodle_url('/mod/assign/index.php', array('id' => $this->get_course()->id));
|
||||
}
|
||||
|
||||
$currenturl->params($params);
|
||||
$PAGE->set_url($currenturl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue