Merge branch 'MDL-49985_master' of git://github.com/markn86/moodle
Conflicts: mod/forum/post.php
This commit is contained in:
@@ -29,14 +29,11 @@ define('AJAX_SCRIPT', true);
|
||||
|
||||
require_once(dirname(__dir__) . '/config.php');
|
||||
|
||||
$returnurl = optional_param('returnurl', 0, PARAM_LOCALURL);
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
}
|
||||
|
||||
$PAGE->set_context(context_system::instance());
|
||||
$courserenderer = $PAGE->get_renderer('core', 'course');
|
||||
$courserenderer->returnurl = $returnurl;
|
||||
|
||||
echo json_encode($courserenderer->coursecat_ajax());
|
||||
|
||||
@@ -44,7 +44,6 @@ if ($categoryid) {
|
||||
|
||||
$PAGE->set_pagelayout('coursecategory');
|
||||
$courserenderer = $PAGE->get_renderer('core', 'course');
|
||||
$courserenderer->returnurl = $PAGE->url;
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
|
||||
+1
-5
@@ -49,9 +49,6 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
protected $strings;
|
||||
|
||||
/** @var moodle_url|null stores page where to return to from the enrolment page */
|
||||
public $returnurl;
|
||||
|
||||
/**
|
||||
* Override the constructor so that we can initialise the string cache
|
||||
*
|
||||
@@ -1210,8 +1207,7 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
|
||||
// course name
|
||||
$coursename = $chelper->get_course_formatted_name($course);
|
||||
$coursenamelink = html_writer::link(new moodle_url('/course/view.php',
|
||||
array('id' => $course->id, 'returnurl' => $this->returnurl)),
|
||||
$coursenamelink = html_writer::link(new moodle_url('/course/view.php', array('id' => $course->id)),
|
||||
$coursename, array('class' => $course->visible ? '' : 'dimmed'));
|
||||
$content .= html_writer::tag($nametag, $coursenamelink, array('class' => 'coursename'));
|
||||
// If we display course in collapsed form but the course has summary or course contacts, display the link to the info page.
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
$switchrole = optional_param('switchrole',-1, PARAM_INT); // Deprecated, use course/switchrole.php instead.
|
||||
$modchooser = optional_param('modchooser', -1, PARAM_BOOL);
|
||||
$return = optional_param('return', 0, PARAM_LOCALURL);
|
||||
$returnurl = optional_param('returnurl', 0, PARAM_LOCALURL);
|
||||
|
||||
$params = array();
|
||||
if (!empty($name)) {
|
||||
@@ -43,9 +42,6 @@
|
||||
if ($section) {
|
||||
$urlparams['section'] = $section;
|
||||
}
|
||||
if ($returnurl) {
|
||||
$urlparams['returnurl'] = $returnurl;
|
||||
}
|
||||
|
||||
$PAGE->set_url('/course/view.php', $urlparams); // Defined here to avoid notices on errors etc
|
||||
|
||||
|
||||
+1
-2
@@ -181,8 +181,7 @@ NS._toggle_category_expansion = function(e) {
|
||||
categoryid: categoryid,
|
||||
depth: depth,
|
||||
showcourses: categorynode.getData('showcourses'),
|
||||
type: TYPE_CATEGORY,
|
||||
returnurl: location.href
|
||||
type: TYPE_CATEGORY
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-2
@@ -180,8 +180,7 @@ NS._toggle_category_expansion = function(e) {
|
||||
categoryid: categoryid,
|
||||
depth: depth,
|
||||
showcourses: categorynode.getData('showcourses'),
|
||||
type: TYPE_CATEGORY,
|
||||
returnurl: location.href
|
||||
type: TYPE_CATEGORY
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
+1
-2
@@ -179,8 +179,7 @@ NS._toggle_category_expansion = function(e) {
|
||||
categoryid: categoryid,
|
||||
depth: depth,
|
||||
showcourses: categorynode.getData('showcourses'),
|
||||
type: TYPE_CATEGORY,
|
||||
returnurl: location.href
|
||||
type: TYPE_CATEGORY
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user