Take Moodle Quiz from laravel

Take Moodle Quiz from laravel

by Pradip Jadhav -
Number of replies: 9

Is there any way I can take Quiz from laravel through some apis? I didnt find any relevant api which can be called from laravel to moodle and start the quiz. I dont want the user to visit moodle to take that quiz. Anyone knows how can this be achieved? 

Average of ratings: -
In reply to Pradip Jadhav

Re: Take Moodle Quiz from laravel

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Web services
In reply to Marcus Green

Re: Take Moodle Quiz from laravel

by Pradip Jadhav -
Can you help me with which web service this can be achieved? I had gone through the list and couldnt find such
In reply to Pradip Jadhav

Re: Take Moodle Quiz from laravel

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I don't know much about this area but I know the mobile app uses web services for all its functionality including quiz, so you may find out more there.
In reply to Pradip Jadhav

Re: Take Moodle Quiz from laravel

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Not quite sure what you mean by 'Take Quiz from Laravel'.

Depending on what that is, some other options:

You could configure Moodle as an LTI provider, https://moodle.org/plugins/local_ltiprovider and then configure your thing as an LTI consumer.

Or, the docs https://docs.moodle.org/dev/Using_the_question_engine_from_module might help you understand how Moodle works.
Average of ratings: Useful (2)
In reply to Tim Hunt

Re: Take Moodle Quiz from laravel

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Because Laraval is a PHP framework I assumed the question was about making api calls like mobile does. If that is correct, then it will require a large amount of development to achieve this. Pradip you need to provide a lot more information on what you are trying to achieve to get useful responses.
In reply to Marcus Green

Re: Take Moodle Quiz from laravel

by Pradip Jadhav -
Sorry to be not clear at first. I am having a laravel framework interacting with moodle to get all courses and displaying them on laravel front end. Both systems work with SSO and they have unique users. Now I want the user to attempt the course quiz from laravel interface but shouldn't be redirected to moodle. It should be rather calling some api to get the quiz questions, attempt them and send response back to moodle with the status via api. In this case, user (on laravel system) won't be able to see anything related to moodle and will stay on laravel interface itself. Basically I need to interact with moodle for whole Quiz module. Let me know if I am clear.
In reply to Pradip Jadhav

Re: Take Moodle Quiz from laravel

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
In that case you will need to call web services in the same way that the mobile app does.
https://github.com/moodlehq/moodleapp
I have no idea of the details however.
In reply to Marcus Green

Re: Take Moodle Quiz from laravel

by Pradip Jadhav -
Can I create my own moodle plugin with a new webservice(will develop) in it which will return me the quiz data from Quiz module. So laravel will communicate with moodle via that new webservice and get quiz details. I can then work on some html to display that quiz in laravel?