Settings link in Plugins overview and Manage blocks #412
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #379,
Description
In Plugins overview and Manage blocks pages, there is a possiblity for plugins to offer a shortcut link to their settings page.
Currently most of opencast plugins does not offer this possiblity.
Solution
With changes in this PR the settings shortcut link is now offered but in specific ways:
And by clicking on settings link you will end up in seperate category which contains a link to main settings:
From there you can click on Opencast Videos Settings whihc redirect to the main settings.
Reason and explaination
The reason to do it this way is because of minimizing the changes and impacts that comes after that, because the plugin from start is using the wrong name for its setting category and changing it now requires to change a lot of things including tool_openacst plugin, so I have decided to provide a forwarding mechanism!
For block plugins in Moodle it is necessary to use the main amdin setting category with specific naming (see https://github.com/moodle/moodle/blob/ab5692acdf1f9a2b3cf06986f49b951558793f38/lib/classes/plugininfo/block.php#L103)
in format of
'blocksetting' . $this->name
, which for block opencast it ends up with "blocksettingopencast".The setting shortcut link only appears when a plugin has that category in its settings.
To TEST
UPDATE
This PR depends on a very important bug fix in tool_opencast plugin: Opencast-Moodle/moodle-tool_opencast#74
Which will fix the issue of failing test ci steps!