Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings link in Plugins overview and Manage blocks #412

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

ferishili
Copy link
Contributor

@ferishili ferishili commented Jan 8, 2025

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:

Screenshot 2025-01-08 at 11 31 28

And by clicking on settings link you will end up in seperate category which contains a link to main settings:

Screenshot 2025-01-08 at 11 32 53

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

  • Patch this PR
  • Navigate to Site admin > Plugins > Plugins overview.
  • Locate the block_opencast
  • Click on Settings shorcut link.
  • You would endup in a new setting page, locate the Opencast Videos Setting link and click on it.
  • You then will be redirected to main settings of block opencast plugin.

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!

@ferishili ferishili requested a review from bluetom January 8, 2025 10:45
@ferishili ferishili self-assigned this Jan 8, 2025
@bluetom bluetom merged commit d5e91e4 into Opencast-Moodle:main Jan 13, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link configuration in Plugin-Overview
2 participants