Merge branch 'MDL-72124_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user