mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-72124_master' of https://github.com/marxjohnson/moodle
This commit is contained in:
commit
1eb6c49fa3
5 changed files with 14 additions and 14 deletions
|
@ -50,8 +50,8 @@ abstract class question_base extends base {
|
|||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
$cat = $this->other['categoryid'] . ',' . $this->contextid;
|
||||
if ($this->courseid) {
|
||||
$cat = $this->other['categoryid'] . ',' . $this->contextid;
|
||||
if ($this->contextlevel == CONTEXT_MODULE) {
|
||||
return new \moodle_url('/question/edit.php',
|
||||
['cmid' => $this->contextinstanceid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
|
||||
|
@ -60,8 +60,8 @@ abstract class question_base extends base {
|
|||
['courseid' => $this->courseid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
|
||||
}
|
||||
// Lets try viewing from the frontpage for contexts above course.
|
||||
return new \moodle_url('/question/bank/managecategories/category.php',
|
||||
['courseid' => SITEID, 'edit' => $this->other['categoryid'], 'lastchanged' => $this->objectid]);
|
||||
return new \moodle_url('/question/edit.php',
|
||||
['courseid' => SITEID, 'edit' => $cat, 'lastchanged' => $this->objectid]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,15 +50,15 @@ abstract class question_category_base extends base {
|
|||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
$cat = $this->objectid . ',' . $this->contextid;
|
||||
if ($this->courseid) {
|
||||
$cat = $this->objectid . ',' . $this->contextid;
|
||||
if ($this->contextlevel == CONTEXT_MODULE) {
|
||||
return new \moodle_url('/question/edit.php', ['cmid' => $this->contextinstanceid, 'cat' => $cat]);
|
||||
}
|
||||
return new \moodle_url('/question/edit.php', ['courseid' => $this->courseid, 'cat' => $cat]);
|
||||
}
|
||||
// Lets try viewing from the frontpage for contexts above course.
|
||||
return new \moodle_url('/question/bank/managecategories/category.php', ['courseid' => SITEID, 'edit' => $this->objectid]);
|
||||
return new \moodle_url('/question/edit.php', ['courseid' => SITEID, 'cat' => $cat, 'edit' => $this->objectid]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,8 +77,8 @@ class question_moved extends question_base {
|
|||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
$cat = $this->other['newcategoryid'] . ',' . $this->contextid;
|
||||
if ($this->courseid) {
|
||||
$cat = $this->other['newcategoryid'] . ',' . $this->contextid;
|
||||
if ($this->contextlevel == CONTEXT_MODULE) {
|
||||
return new \moodle_url('/question/edit.php',
|
||||
['cmid' => $this->contextinstanceid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
|
||||
|
@ -87,8 +87,8 @@ class question_moved extends question_base {
|
|||
['courseid' => $this->courseid, 'cat' => $cat, 'lastchanged' => $this->objectid]);
|
||||
}
|
||||
// Lets try viewing from the frontpage for contexts above course.
|
||||
return new \moodle_url('/question/bank/managecategories/category.php',
|
||||
['courseid' => SITEID, 'edit' => $this->other['newcategoryid'], 'lastchanged' => $this->objectid]);
|
||||
return new \moodle_url('/question/edit.php',
|
||||
['courseid' => SITEID, 'cat' => $cat, 'lastchanged' => $this->objectid]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,15 +76,15 @@ class questions_exported extends question_base {
|
|||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
$cat = $this->other['categoryid'] . ',' . $this->contextid;
|
||||
if ($this->courseid) {
|
||||
$cat = $this->other['categoryid'] . ',' . $this->contextid;
|
||||
if ($this->contextlevel == CONTEXT_MODULE) {
|
||||
return new \moodle_url('/question/edit.php', ['cmid' => $this->contextinstanceid, 'cat' => $cat]);
|
||||
}
|
||||
return new \moodle_url('/question/edit.php', ['courseid' => $this->courseid, 'cat' => $cat]);
|
||||
}
|
||||
return new \moodle_url('/question/bank/managecategories/category.php',
|
||||
['courseid' => SITEID, 'edit' => $this->other['categoryid']]);
|
||||
return new \moodle_url('/question/edit.php',
|
||||
['courseid' => SITEID, 'cat' => $cat]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,15 +76,15 @@ class questions_imported extends question_base {
|
|||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
$cat = $this->other['categoryid'] . ',' . $this->contextid;
|
||||
if ($this->courseid) {
|
||||
$cat = $this->other['categoryid'] . ',' . $this->contextid;
|
||||
if ($this->contextlevel == CONTEXT_MODULE) {
|
||||
return new \moodle_url('/question/edit.php', ['cmid' => $this->contextinstanceid, 'cat' => $cat]);
|
||||
}
|
||||
return new \moodle_url('/question/edit.php', ['courseid' => $this->courseid, 'cat' => $cat]);
|
||||
}
|
||||
return new \moodle_url('/question/bank/managecategories/category.php',
|
||||
['courseid' => SITEID, 'edit' => $this->other['categoryid']]);
|
||||
return new \moodle_url('/question/edit.php',
|
||||
['courseid' => SITEID, 'cat' => $cat]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue