mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Merge branch 'MDL-67208-master' of git://github.com/lameze/moodle
This commit is contained in:
commit
fd0321eede
@ -37,7 +37,7 @@ $groupcourseid = optional_param('groupcourseid', 0, PARAM_INT);
|
||||
$action = optional_param('action', '', PARAM_INT);
|
||||
|
||||
$url = new moodle_url('/calendar/managesubscriptions.php');
|
||||
if ($courseid != SITEID) {
|
||||
if ($courseid != SITEID && !empty($courseid)) {
|
||||
$url->param('course', $courseid);
|
||||
}
|
||||
if ($categoryid) {
|
||||
@ -77,7 +77,7 @@ $customdata = [
|
||||
'courseid' => $course->id,
|
||||
'groups' => $groups,
|
||||
];
|
||||
$form = new \core_calendar\local\event\forms\managesubscriptions(null, $customdata);
|
||||
$form = new \core_calendar\local\event\forms\managesubscriptions($url, $customdata);
|
||||
$form->set_data(array(
|
||||
'course' => $course->id
|
||||
));
|
||||
|
@ -374,7 +374,7 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
protected function subscription_action_form($subscription) {
|
||||
// Assemble form for the subscription row.
|
||||
$html = html_writer::start_tag('form', array('action' => new moodle_url('/calendar/managesubscriptions.php'), 'method' => 'post'));
|
||||
$html = html_writer::start_tag('form', ['action' => $this->page->url->out(false) , 'method' => 'post']);
|
||||
if (empty($subscription->url)) {
|
||||
// Don't update an iCal file, which has no URL.
|
||||
$html .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'pollinterval', 'value' => '0'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user