Integrating Moodle to own systems -- what risks...

Integrating Moodle to own systems -- what risks...

by Monica Franz -
Number of replies: 6
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
Average of ratings: -
In reply to Monica Franz

Re: Integrating Moodle to own systems -- what risks...

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
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.
Average of ratings: Useful (1)
In reply to Monica Franz

Re: Integrating Moodle to own systems -- what risks...

by Frank Ralf -
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
Average of ratings: Useful (1)
In reply to Frank Ralf

Re: Integrating Moodle to own systems -- what risks...

by Monica Franz -
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! lächelnd

Have a nice weekend!

Regards!
Monica
In reply to Monica Franz

Re: Integrating Moodle to own systems -- what risks...

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
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.
Average of ratings: Useful (1)
In reply to Mark Johnson

Re: Integrating Moodle to own systems -- what risks...

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
However, you should always back everything up before upgrading.
In reply to Tim Hunt

Re: Integrating Moodle to own systems -- what risks...

by Monica Franz -
Sure! I do that anyway.
Thanks though! lächelnd