Hi!
I posted this question to the General Forum yesterday and got the advise to try my luck here!
We would like to get information from the Moodle database (coursename, students enroled in specific courses, etc.) for our Room-Access-Control System.
What do we have to be aware of? Can we use the functions in $CFG/lib or even those in $CFG/course.
Does a dummy-php-file exist, where the needed function e.g. has_capability and other
musts for integrating already are listed? Or something like the Moodle-Programming course?
Hope someone can answer my questions!
Regards,
Monica
If you want to write a custom PHP script to do something Moodle-y then you just need to do require_once('../config.php'); at the top (with an appropriate number of ../s), and that gets you all the standard Moodle libraries. If you need any other libraries that are not included by default, for example course/lib.php, just require them as well.
If your script does not naturally fit into one of the standard plugin types, put it in the local folder. That is, give it a name like local/roomaccess/script.php.
If your script does not naturally fit into one of the standard plugin types, put it in the local folder. That is, give it a name like local/roomaccess/script.php.
Hi Monica,
You might have a look at accesslib.php for some useful functions.
And Integration FAQ might give you some further pointers.
hth
Frank
You might have a look at accesslib.php for some useful functions.
And Integration FAQ might give you some further pointers.
hth
Frank
Hi!
Thanks for all the good advises!
If we update our Moodle 1.9.3 to 1.9.7 is the local directory (../moodle/local/roomaccess) still there? Are the ../moodledata/lang/*_utf8_local also still there?
I'll read the FAQ Frank wrote about and see if I still have more questions!
Have a nice weekend!
Regards!
Monica
Thanks for all the good advises!
If we update our Moodle 1.9.3 to 1.9.7 is the local directory (../moodle/local/roomaccess) still there? Are the ../moodledata/lang/*_utf8_local also still there?
I'll read the FAQ Frank wrote about and see if I still have more questions!
Have a nice weekend!
Regards!
Monica
Updating moodle will only change the moodle core files, and the plugins that are packaged with moodle. Your local modifications will remain untouched, as long as you kept them in "local" files and folders.
However, you should always back everything up before upgrading.
Sure! I do that anyway.
Thanks though!
Thanks though!