From 05500b53c0a72713977211e0ff4c36ff4e66b9e6 Mon Sep 17 00:00:00 2001 From: NinaHerrmann Date: Fri, 14 Jun 2024 18:40:08 +0200 Subject: [PATCH] Sort lang strings some basic codestyle fixes and remove duplicated heading --- classes/local/output_helper.php | 3 -- classes/privacy/provider.php | 2 +- db/access.php | 2 +- downloadvideo.php | 2 +- lang/en/opencast.php | 59 ++++++++++++++++----------------- 5 files changed, 31 insertions(+), 37 deletions(-) diff --git a/classes/local/output_helper.php b/classes/local/output_helper.php index 5631979..97d3606 100644 --- a/classes/local/output_helper.php +++ b/classes/local/output_helper.php @@ -126,9 +126,6 @@ public static function output_episode($ocinstanceid, $episodeid, $modinstanceid, $configurl = new \moodle_url(get_config('mod_opencast', 'configurl_' . $ocinstanceid)); $themeurl = new \moodle_url(get_config('mod_opencast', 'themeurl_' . $ocinstanceid)); echo \html_writer::script('window.episode = ' . json_encode($data)); - - echo $OUTPUT->heading($title); - echo '
'; // Find aspect-ratio if there is only one video track. diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 661fcde..e3640e7 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider { * * @return string */ - public static function get_reason() : string { + public static function get_reason(): string { return 'privacy:metadata'; } } diff --git a/db/access.php b/db/access.php index 865f9ef..d5b7338 100644 --- a/db/access.php +++ b/db/access.php @@ -19,7 +19,7 @@ * * @package mod_opencast * @copyright 2020 Tobias Reischmann WWU - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late + * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); diff --git a/downloadvideo.php b/downloadvideo.php index d52f921..3c70d9f 100644 --- a/downloadvideo.php +++ b/downloadvideo.php @@ -21,9 +21,9 @@ * @copyright 2021 Tamara Gunkel, University of Münster * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -require_once('../../config.php'); use block_opencast\local\apibridge; +require_once('../../config.php'); global $PAGE, $OUTPUT, $CFG, $DB; diff --git a/lang/en/opencast.php b/lang/en/opencast.php index d560f16..e77c52e 100644 --- a/lang/en/opencast.php +++ b/lang/en/opencast.php @@ -25,16 +25,19 @@ defined('MOODLE_INTERNAL') || die(); -$string['allvideos'] = 'All videos'; +$string['advancedsettings'] = 'Advanced settings'; $string['allowdownload'] = 'Allow students to download the video(s)'; +$string['allvideos'] = 'All videos'; $string['date'] = 'Date'; +$string['defaultuploadedvideotitle'] = 'Uploaded video'; +$string['dnduploadvideofile'] = 'Upload video file to Opencast'; $string['downloadvideo'] = 'Download video'; $string['duration'] = 'Duration'; $string['episode'] = 'Opencast episode'; -$string['errorfetchingvideo'] = 'There was a problem fetching the video.'; $string['erroremptystreamsources'] = 'There is no video source available. Please contact your system administrator.'; +$string['errorfetchingvideo'] = 'There was a problem fetching the video.'; $string['gridview'] = 'View as grid'; @@ -42,62 +45,56 @@ $string['manualocid'] = 'Directly enter the Opencast ID of the series/episode'; $string['modulename'] = 'Video (Opencast)'; -$string['modulenameplural'] = 'Videos (Opencast)'; $string['modulename_help'] = '

The Video (Opencast) module is used to display videos or series from a connected Opencast platform.

In most cases, it is easier not to create the activity directly but to do it via the block "Opencast Videos" instead.

'; +$string['modulenameplural'] = 'Videos (Opencast)'; $string['ocinstance'] = 'Opencast instance'; -$string['opencastname'] = 'Opencast Video Provider: {$a}'; $string['opencast:addinstance'] = 'Add a new Video (Opencast) instance'; $string['opencastid'] = 'Opencast ID'; $string['opencastidnotrecognized'] = 'This ID is neither recognized as a series nor a video.'; +$string['opencastname'] = 'Opencast Video Provider: {$a}'; -$string['pluginname'] = 'Opencast Video Provider'; $string['pluginadministration'] = 'Opencast Video Provider administration'; +$string['pluginname'] = 'Opencast Video Provider'; $string['privacy:metadata'] = 'Opencast Activities are just a way to show Opencast videos inside moodle. They do not store any user related data.'; +$string['series'] = 'Opencast series'; +$string['seriesisempty'] = 'This series is currently empty.'; $string['settings:api-channel'] = 'Opencast Channel'; -$string['settings:download_header'] = 'Student Download Configuration'; +$string['settings:configurl'] = 'URL to Paella config.json'; +$string['settings:configurl_desc'] = 'URL of the config.json used by Paella Player. Can either be a absolute URL or a URL relative to the wwwroot.'; $string['settings:download-channel'] = 'Opencast Download Channel'; $string['settings:download-channel_desc'] = 'Opencast publication channel from which the videos are served when downloading them.'; $string['settings:download-default'] = 'Allow download by default'; $string['settings:download-default_desc'] = 'If activated, the checkbox for allowing downloads in activity forms is checked by default.'; -$string['settings:configurl'] = 'URL to Paella config.json'; -$string['settings:configurl_desc'] = 'URL of the config.json used by Paella Player. Can either be a absolute URL or a URL relative to the wwwroot.'; +$string['settings:download_header'] = 'Student Download Configuration'; $string['settings:global_download'] = 'Force student download'; $string['settings:global_download_desc'] = 'Allow globally that students can download videos. Teachers cannot overwrite this setting.'; $string['settings:themeurl'] = 'URL to Paella theme.json'; $string['settings:themeurl_desc'] = 'URL of the theme.json used by Paella Player. Can either be a absolute URL or a URL relative to the wwwroot.'; -$string['series'] = 'Opencast series'; -$string['seriesisempty'] = 'This series is currently empty.'; +$string['sortseriesby'] = 'Order videos by'; +$string['sortseriesby_help'] = 'Only affects series'; $string['title'] = 'Title'; -// Strings for upload feature. -$string['dnduploadvideofile'] = 'Upload video file to Opencast'; -$string['uploadtitledisplay'] = 'Upload video:'; +$string['uploaddate'] = 'Upload date'; $string['uploaddefaultintrodisplay'] = 'This is an opencast activity module for uploading a video.'; -$string['uploadlandinginfo'] = 'You are about to upload video to Opencast, please make sure the required information are entered.'; -$string['uploadnotallowed'] = 'Performing this action is not allowed'; -$string['uploadformtitle'] = 'Upload the video to Opencast'; +$string['uploadedvideoisbeingprocesses'] = 'This video ({$a}) is already uploaded and is being processed by Opencast, please wait!'; +$string['uploadform_flavor_label'] = 'Use the video for the flavor of:'; +$string['uploadform_flavor_presentation'] = 'Presentation Video'; +$string['uploadform_flavor_presenter'] = 'Presenter Video'; $string['uploadform_general_header'] = 'General Settings'; +$string['uploadform_metadata_header'] = 'Required Event Metadata'; $string['uploadform_ocinstancesselect'] = 'Opencast Instanance'; +$string['uploadform_requirednotice'] = '{$a}Required: all inputs in this form are mandetory to fill out.'; $string['uploadform_seriessselect'] = 'Series'; -$string['uploadform_metadata_header'] = 'Required Event Metadata'; -$string['uploadform_flavor_label'] = 'Use the video for the flavor of:'; -$string['uploadform_flavor_presenter'] = 'Presenter Video'; -$string['uploadform_flavor_presentation'] = 'Presentation Video'; $string['uploadform_uploadexplaination'] = 'This is a partial and short form to upload video, in order to add more metadata and other informations please use the Opencast Video plugin.'; -$string['uploadform_requirednotice'] = '{$a}Required: all inputs in this form are mandetory to fill out.'; -$string['uploadmissingfile'] = 'Because of missing file, this module is no longer valid and is now deleted, please try adding another one.'; -$string['uploadsaved'] = 'Video upload successful. The video is scheduled to be transferred to Opencast now, for more info please go to Opencast Videos'; -$string['defaultuploadedvideotitle'] = 'Uploaded video'; +$string['uploadformtitle'] = 'Upload the video to Opencast'; $string['uploadinprogress'] = 'Uploading video ({$a}) is in progress, please try again later.'; -$string['uploadedvideoisbeingprocesses'] = 'This video ({$a}) is already uploaded and is being processed by Opencast, please wait!'; $string['uploadjobmissing'] = 'There was an error fetching upload data for this video, please try uploading a new one. Due to insufficient data this module is deleted.'; - -// Strings for mod form. -$string['sortseriesby'] = 'Order videos by'; -$string['sortseriesby_help'] = 'Only affects series'; -$string['uploaddate'] = 'Upload date'; +$string['uploadlandinginfo'] = 'You are about to upload video to Opencast, please make sure the required information are entered.'; +$string['uploadmissingfile'] = 'Because of missing file, this module is no longer valid and is now deleted, please try adding another one.'; +$string['uploadnotallowed'] = 'Performing this action is not allowed'; +$string['uploadsaved'] = 'Video upload successful. The video is scheduled to be transferred to Opencast now, for more info please go to Opencast Videos'; +$string['uploadtitledisplay'] = 'Upload video:'; $string['videotitle'] = 'Video title'; -$string['advancedsettings'] = 'Advanced settings';