Search code examples
javaangularmoodlemoodle-apilti

Moodle integration with angular application


I am new to moodle ,just started now. i am trying to integrate moodle with my application (angular 4) . my basic idea is to use moodel as content source and i have separate application through user can launch the course . and i have to get the response from moodle web service (course progress) .

i just stated the documentation .using LTI i done some poc to launch the course externally(silent url).but unfortunately it logging the moodle application too. i don't want to login moodle application . i just want to launch course from my another app .

Please share your thoughts for above approach


Solution

  • Old question, not sure if this still matters, but If your courses are set to public, you can load the course using an i-frame within your application. Depending on the plugins/modules used in the course, not everything might work though. Some blocks/mods are contextual and specific to users logged in.

    Option 2 is to use web services and make calls to pull data and build the parts you need from the course in your application.

    Option 3 you can create a moodle user on the fly using web services and then automatically log them from your application (maybe embed the course using an iframe). I built a local plugin that lets you pass in a web service token and URL to redirect to once logged in. example: my-moodle-site.com/local/token_auth/redirect.php?token=REPLACE_ME_WITH_TOKEN&url=REPLACE_ME_WITH_URL

    Example: http://moodle35.dev/local/token_auth/redirect.php?token=8sdf9sdj33&url=/calendar/export.php