Picture of Matt Leathes
Re: Database Connectivity
by Matt Leathes - Wednesday, 5 July 2017, 9:01 AM
 

Hi Ravindra

I want to fetch questions from database, so quiz can be completely dynamic, questions can be different each time, can we do this?

All the Adapt content is held in JSON files so you could just generate those from your database. That would be the easiest route as you wouldn't have to change Adapt in any way, just publish data in the format it understands.

Also I want give the access to Admin to add new questions as well. Please suggest on the same

This sounds less like a question about Adapt and more like a question about how to engineer your back-end service, which is beyond the scope of this forum.

A suggestion: your database is always going to have a finite amount of questions - in which case the only benefit of making it database-driven is that you can update/amend/delete the questions without having to republish the course. Might it not make more sense to instead use the Adapt Authoring Tool to create the list of questions (Adapt can present a random selection). Yes, you would have to republish the course every time you want to change it - but how often are you really going do that? Even if every day, it's still quite a quick thing to do. So, unless you plan to have a huge number of questions in your database, the authoring tool is probably a better route.