How can i integrate the Quiz module of Moodle in Cakephp?

How can i integrate the Quiz module of Moodle in Cakephp?

by baya singh -
Number of replies: 8

Hello,


The version of Moodle that we are using is 3.0.


1) How can i integrate quiz module of Moodle in Cakephp site? So that, user logged in Cakephp site can easily take part in quiz without knowing that quiz module is handled by different site. 


2) API on moodle site require Web-service to be created by the developer for getting quiz detail like questions and its options. If it is so then please guide us how can i create Web service? As documentations is not very fruitful.

3) API of Quiz module does not allow the user of other site to submit there responses. Is it true? If yes, then what are the alternatives.

Waiting for your response...


With Regards,

Baya Singh

Average of ratings: -
In reply to baya singh

Re: How can i integrate the Quiz module of Moodle in Cakephp?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Does Cakephp support the LTI standard? If so, the best solution would be to use the LTI provider part of Moodle to make the Quiz accessible to other systems.

If Cakephp does not yet support LTI, the best solution might to be implement the LTI consumer part in Cakephp. (https://en.wikipedia.org/wiki/Learning_Tools_Interoperability)

Average of ratings: Useful (2)
In reply to Tim Hunt

Re: How can i integrate the Quiz module of Moodle in Cakephp?

by baya singh -

Hello Tim,

Thank you for your valuable response.

From your reply i have learn the new thing i.e., LTI (Learning Tools Interoperability).

Following are the queries regarding the LTI and web-services in Moodle: 


1) Is it possible via local plugins to integrate Quiz module of Moodle in Cakephp like fetching details related to the Quiz its associated questions and options as Moodle gave only the web-services that will helpful only in case of fetching details 

https://docs.moodle.org/dev/Quiz_web_services

On Moodle site, i didn't find web-services that will useful in submitting the response of Quiz.


2) As i am a newbie to LTI, please elaborate how can i use LTI between Moodle and normal PHP site. 

Along with this, please share if you have any references and examples that will useful in integrating the quiz module of Moodle in normal PHP site. 


Waiting for your reponse....


With Regards, 

Baya Singh


In reply to baya singh

Re: How can i integrate the Quiz module of Moodle in Cakephp?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

1) The web services are enough that the mobile app lets users attempt quizzes, but it would be a lot of work.

2) That is not really a Moodle-specific question. LTI is an open standard. Here are two links:

https://www.imsglobal.org/activity/learning-tools-interoperability

https://gist.github.com/matthanger/1171921

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: How can i integrate the Quiz module of Moodle in Cakephp?

by baya singh -

Hello Tim,


As i am a newbie to LTI so it takes a time to understand the flow of LTI. 

So, please share the Web-services code that allow the users to simply attempt the quiz, fetch quiz results and statistics, and get certificate. Sharing session between the two sites is done. Next i want to simply integrate a Quiz module via Web-Services.


With Regards,

Baya Singh


 

 




In reply to Tim Hunt

Re: How can i integrate the Quiz module of Moodle in Cakephp?

by baya singh -

Hello Tim,


Thank you for your guidance as it is very useful in fetching course details using Local plugins via command line.


With Regards,

Baya Singh




In reply to Tim Hunt

Re: How can i integrate the Quiz module of Moodle in Cakephp?

by baya singh -

Hello Tim,


All services defined in "services.php" are workable but services mentioned in below link

https://docs.moodle.org/dev/Quiz_web_services

are missing which results in not getting the details of quiz related questions and options.


Via command line,  view_quiz API returns 1 instead of returning the details of quiz related questions and options.   


How can i proceed further in integrating quiz module of Moodle in other website?  


With Regards,

Baya Singh

In reply to baya singh

Re: How can i integrate the Quiz module of Moodle in Cakephp?

by Rahul Chakraborty -

HI Baya, 

Did you got any solution for your problem. Actually I am too looking for the same functionality. I want to fetch course/quiz/questions and related students of moodle using web-service api's but unable to succeed.

It is quite easy in Canvas as they have very rich API's. Not sure if moodle supports this.

I have used LTI to connect my application with Moodle and I am able to launch my application inside Moodle Course.

But now I am stuck in fetching quizzes ans quiz questions of a course.

Thanks in anticipation.


Regards

Rahul