mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-32245 question bank: update URL after moving question between categories.
Also, improve the URL when you go to edit the questions in a category.
This commit is contained in:
parent
917169221f
commit
9645fe83ff
@ -100,7 +100,7 @@ class question_category_list_item extends list_item {
|
||||
$editqestions = get_string('editquestions', 'question');
|
||||
|
||||
/// Each section adds html to be displayed as part of this list item
|
||||
$questionbankurl = new moodle_url("/question/edit.php", ($this->parentlist->pageurl->params() + array('category'=>"$category->id,$category->contextid")));
|
||||
$questionbankurl = new moodle_url("/question/edit.php", ($this->parentlist->pageurl->params() + array('cat'=>"$category->id,$category->contextid")));
|
||||
$catediturl = $this->parentlist->pageurl->out(true, array('edit' => $this->id));
|
||||
$item = "<b><a title=\"{$str->edit}\" href=\"$catediturl\">" .
|
||||
format_string($category->name, true, array('context' => $this->parentlist->context)) .
|
||||
@ -456,6 +456,8 @@ class question_category_object {
|
||||
question_move_category_to_context($cat->id, $oldcat->contextid, $tocontextid);
|
||||
}
|
||||
|
||||
// Cat param depends on the context id, so update it.
|
||||
$this->pageurl->param('cat', $updateid . ',' . $tocontextid);
|
||||
redirect($this->pageurl);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user