Greetings!
I am fairly new to Moodle systems and am developing a system integration plugin for my university. Currently, I am stuck at a certain step, detailed below:
I need to fetch a course information from an external database, not related to Moodle, compare it to user data and then work it into creating new courses and populating them. So far I've created the block plugin and messed around with interface properties. I have searched for a couple days now on how to proceed for my plugin to be able to access and retrieve info from this external source, but all I've been able to find was various methods on allowing external applications to access Moodle via tokens.
Is there a known way that I can access an external database using PHP in the block_myblock.php frankenstein file? Is there any sort of documentation or guide tackling this problem that I could adapt to my own problem?
I'm currently using the latest Moodle distribution available. My final objective is to have a plugin that works for any version higher than 3.1.*
Asking the community is my last resource, as I'm sure that someone else had to deal with this problem at some point. I'm simply not able to find anything about it on Google or forums. Sorry.
I really appreciate any help provided.
Sincerely,
Gustavo