mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 00:20:37 +01:00
Merge branch 'MDL-77472-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
38cc21db3c
@ -57,12 +57,12 @@ $heading = get_string('itemsedit', 'grades');
|
||||
if ($grade_item = grade_item::fetch(array('id'=>$id, 'courseid'=>$courseid))) {
|
||||
// redirect if outcomeid present
|
||||
if (!empty($grade_item->outcomeid) && !empty($CFG->enableoutcomes)) {
|
||||
$url = $CFG->wwwroot.'/grade/edit/tree/outcomeitem.php?id='.$id.'&courseid='.$courseid;
|
||||
$url = new moodle_url('/grade/edit/tree/outcomeitem.php', ['id' => $id, 'courseid' => $courseid]);
|
||||
redirect($gpr->add_url_params($url));
|
||||
}
|
||||
if ($grade_item->is_course_item() or $grade_item->is_category_item()) {
|
||||
$grade_category = $grade_item->get_item_category();
|
||||
$url = $CFG->wwwroot.'/grade/edit/tree/category.php?id='.$grade_category->id.'&courseid='.$courseid;
|
||||
$url = new moodle_url('/grade/edit/tree/category.php', ['id' => $grade_category->id, 'courseid' => $courseid]);
|
||||
redirect($gpr->add_url_params($url));
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ $heading = get_string('outcomeitemsedit', 'grades');
|
||||
if ($grade_item = grade_item::fetch(array('id'=>$id, 'courseid'=>$courseid))) {
|
||||
// redirect if outcomeid present
|
||||
if (empty($grade_item->outcomeid)) {
|
||||
$url = $CFG->wwwroot.'/grade/edit/tree/item.php?id='.$id.'&courseid='.$courseid;
|
||||
$url = new moodle_url('/grade/edit/tree/item.php', ['id' => $id, 'courseid' => $courseid]);
|
||||
redirect($gpr->add_url_params($url));
|
||||
}
|
||||
$item = $grade_item->get_record_data();
|
||||
|
@ -1222,10 +1222,9 @@ class grade_plugin_return {
|
||||
* Add return tracking params into url
|
||||
*
|
||||
* @param moodle_url $url A URL
|
||||
*
|
||||
* @return string $url with return tracking params
|
||||
* @return moodle_url with return tracking params
|
||||
*/
|
||||
public function add_url_params(moodle_url $url) {
|
||||
public function add_url_params(moodle_url $url): moodle_url {
|
||||
if (empty($this->type)) {
|
||||
return $url;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user