mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 17:40:26 +01:00
Merge branch 'MDL-72154-master' of git://github.com/mickhawkins/moodle
This commit is contained in:
commit
05db683745
@ -53,7 +53,6 @@ class managesubscriptions extends \moodleform {
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
|
||||
// Import from (url | importfile).
|
||||
$mform->addElement('html', get_string('importfrominstructions', 'calendar'));
|
||||
$choices = array(CALENDAR_IMPORT_FROM_FILE => get_string('importfromfile', 'calendar'),
|
||||
CALENDAR_IMPORT_FROM_URL => get_string('importfromurl', 'calendar'));
|
||||
$mform->addElement('select', 'importfrom', get_string('importcalendarfrom', 'calendar'), $choices);
|
||||
|
@ -89,6 +89,7 @@ if ($courseid != SITEID && !empty($courseid)) {
|
||||
require_login($course, false);
|
||||
|
||||
$url = new moodle_url('/calendar/export.php', array('time' => $time));
|
||||
$managesubscriptionsurl = new moodle_url('/calendar/managesubscriptions.php');
|
||||
|
||||
if ($action !== '') {
|
||||
$url->param('action', $action);
|
||||
@ -96,6 +97,10 @@ if ($action !== '') {
|
||||
|
||||
if ($course !== NULL) {
|
||||
$url->param('course', $course->id);
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
$managesubscriptionsurl->param('course', $course->id);
|
||||
}
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
|
||||
@ -110,6 +115,7 @@ if ($issite) {
|
||||
}
|
||||
$link = new moodle_url(CALENDAR_URL.'view.php', array('view'=>'upcoming', 'course'=>$calendar->courseid));
|
||||
$PAGE->navbar->add(get_string('calendar', 'calendar'), calendar_get_link_href($link, 0, 0, 0, $time));
|
||||
$PAGE->navbar->add(get_string('managesubscriptions', 'calendar'), $managesubscriptionsurl);
|
||||
$PAGE->navbar->add($pagetitle);
|
||||
|
||||
$PAGE->set_title($course->shortname.': '.get_string('calendar', 'calendar').': '.$pagetitle);
|
||||
|
@ -117,15 +117,11 @@ if (!empty($formdata)) {
|
||||
redirect($managesubscriptionsurl, $importresults);
|
||||
}
|
||||
|
||||
$calendarsubscriptions = get_string('calendarsubscriptions', 'calendar');
|
||||
|
||||
$renderer = $PAGE->get_renderer('core_calendar');
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $renderer->start_layout();
|
||||
echo $OUTPUT->heading($heading);
|
||||
$form->display();
|
||||
echo $OUTPUT->spacer(null, true);
|
||||
echo $OUTPUT->action_link($managesubscriptionsurl, $OUTPUT->larrow() . ' ' . $calendarsubscriptions);
|
||||
echo $renderer->complete_layout();
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -32,7 +32,6 @@ $string['calendarexporturl'] = 'Calendar URL';
|
||||
$string['calendarheading'] = '{$a} Calendar';
|
||||
$string['calendarpreferences'] = 'Calendar preferences';
|
||||
$string['calendartypes'] = 'Calendar types';
|
||||
$string['calendarsubscriptions'] = 'Calendar subscriptions';
|
||||
$string['calendarurlcopiedtoclipboard'] = 'Calendar URL copied to clipboard';
|
||||
$string['category'] = 'Category';
|
||||
$string['categoryevent'] = 'Category event';
|
||||
@ -172,7 +171,6 @@ $string['importcalendarheading'] = 'Import calendar...';
|
||||
$string['importcalendarfrom'] = 'Import from';
|
||||
$string['importfromfile'] = 'Calendar file (.ics)';
|
||||
$string['importfromurl'] = 'Calendar URL';
|
||||
$string['importfrominstructions'] = 'Please provide either a URL to a remote calendar, or upload a file.';
|
||||
$string['invalidtimedurationminutes'] = 'The duration in minutes you have entered is invalid. Please enter the duration in minutes greater than 0 or select no duration.';
|
||||
$string['invalidtimedurationuntil'] = 'The date and time you selected for duration until is before the start time of the event. Please correct this before proceeding.';
|
||||
$string['invalideventtype'] = 'The event type you have selected is invalid.';
|
||||
@ -284,6 +282,7 @@ $string['yoursubscriptions'] = 'Your Subscriptions';
|
||||
|
||||
// Deprecated since Moodle 4.0.
|
||||
$string['calendarurl'] = 'Calendar URL: {$a}';
|
||||
$string['importfrominstructions'] = 'Please provide either a URL to a remote calendar, or upload a file.';
|
||||
|
||||
// Deprecated since Moodle 3.8.
|
||||
$string['global'] = 'Global';
|
||||
|
@ -155,3 +155,4 @@ configenableactivitychooser,core_admin
|
||||
enableactivitychooser,core_admin
|
||||
coursepreferences,core
|
||||
yourprogress,core_completion
|
||||
importfrominstructions,core_calendar
|
||||
|
Loading…
x
Reference in New Issue
Block a user