From 45fc997e847078a8e9f6c27a96a9217a676cddfd Mon Sep 17 00:00:00 2001 From: Michael Hawkins Date: Thu, 15 Jul 2021 14:13:17 +0800 Subject: [PATCH] MDL-72154 calendar: Remove unnecessary strings/link from import page --- calendar/classes/local/event/forms/managesubscriptions.php | 1 - calendar/import.php | 4 ---- lang/en/calendar.php | 3 +-- lang/en/deprecated.txt | 1 + 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/calendar/classes/local/event/forms/managesubscriptions.php b/calendar/classes/local/event/forms/managesubscriptions.php index 6b79b6310473c..9cd4f0f18a873 100644 --- a/calendar/classes/local/event/forms/managesubscriptions.php +++ b/calendar/classes/local/event/forms/managesubscriptions.php @@ -53,7 +53,6 @@ public function definition() { $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); diff --git a/calendar/import.php b/calendar/import.php index eaa0c274a4eb5..526392c11518a 100644 --- a/calendar/import.php +++ b/calendar/import.php @@ -117,15 +117,11 @@ 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(); diff --git a/lang/en/calendar.php b/lang/en/calendar.php index f987fe1b3d12d..05faa8569e92f 100644 --- a/lang/en/calendar.php +++ b/lang/en/calendar.php @@ -32,7 +32,6 @@ $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['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 @@ // 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'; diff --git a/lang/en/deprecated.txt b/lang/en/deprecated.txt index e0aa9d555ae07..ba1798300c8c6 100644 --- a/lang/en/deprecated.txt +++ b/lang/en/deprecated.txt @@ -155,3 +155,4 @@ configenableactivitychooser,core_admin enableactivitychooser,core_admin coursepreferences,core yourprogress,core_completion +importfrominstructions,core_calendar