dthies / moodle-format_popups

Moodle course format that opens some activities in a modal instead of a new page
Other
4 stars 2 forks source link

Popup support for third-party plugins #1

Closed stefanscholz closed 3 years ago

stefanscholz commented 3 years ago

Hi Daniel,

love the idea! I will certainly use it in the future.

One question: Is it possible to add support to additional plugins? I would really like Video Time to be supported (https://moodle.org/plugins/mod_videotime), is that something you would need to do, or can we do it from within mod_videotime? I see that there's a file per mod in /classes/local, is that the (only) way to add support?

Thanks! Stefan

dthies commented 3 years ago

Hi Stephan,

Adding a file seemed the easiest way to add support for additional modules at the time. I could add one for your plugin. However, if you would prefer to do in it is your plugin I could implement an a function hook so you could just add a function like mod_videotime_format_popups_render to you lib.php to be used instead.

stefanscholz commented 3 years ago

Hi Daniel,

thank you for your response! I think the more sustainable approach would be the hook, so that other third-party plugins developers can add support without your involvement. Would you be able to help with adding it to our plugin (paid)?

Best Stefan

dthies commented 3 years ago

Stefan,

I pushed a new branch for you to test. You should be able to download it. I do not know if in needs addition CSS for it to work properly, but looks like the original to me.

Your plugin was very easy add, but do not think that there are that many other activities that are well suited to this.

I will still need to clean up the code and update the documentation a little. I also only tested with the free version of you plugin. I do not know if pro version needs anything else.

Daniel

dthies commented 3 years ago

Stefan, I have merged my changes to master branch and updated the plugin directory. It seemed to work fine with the free version. I do not know about the pro version, but would think that resume function needs to be tested and probably also the label mode.

stefanscholz commented 3 years ago

Hi Daniel,

many thanks!

I can confirm that it works well with the free version; as you correctly anticipated, there are issues with the pro version. Would you be available to work on that? I can of course provide the code, and – if you want – we can do a quick walkthrough so that you can estimate the effort/cost for it better?

Thanks, Stefan

dthies commented 3 years ago

Hi Stefan,

You can email me at dethies@gmail.com or create and account at my test site moodle.openlearner.org where you will have a course to upload the course to. My schedule is fairly flexible if we need to meet.

Daniel