How does moodle store the response of a user - moodle

I am trying to build my own application in Java which displays the option chosen by the user for a question in a quiz. Which database table stores that information?
Thanks!

Schema and ERD for quiz here: http://docs.moodle.org/dev/Quiz_database_structure or more precisely http://docs.moodle.org/dev/Question_database_structure
The answers are stored in questions_answers

Related

How to integrate existing mongodb database to current project?

I am trying to create a workout app api using express, and mongodb. I plan on creating a list of exercises so the users can see all of them on the app, but the exercises can also be part of a workout created by the user. Users could also add their own exercises, but these will not be added to the default list of exercises created by me. My question is. If an user is creating a workout, how do I add an exercise from the exercises list database to their own custom workout. I am sorry if this does not make sense, please ask me any questions and I could clarify more.
At a high level, I would suggest that you create a database for all standard workouts that you have. Besides that you will create a database for each user in which you can add the custom workouts that he/she choose. Databases will have the exercises as records.

Web Chatbot that can save location to database

I am just newbie in chatbot here, so I don't know any programming language that can create chatbot, and I am sorry If I just make you confuse
My question is I want to make a chatbot, anything programming language is welcome, and I will learn it. But the problem is this chatbot can save response from user that has kind of location. I know that the location can be saved in postgis database system. So I want every respon from user can be inserted to database wheter it is mysql or posgresql in server automatically.
From that database I just want to export it become geoJSON format and upload it on cloud. So I can update my online map with specific time
Thank you from your answer

Is it a bad design to store all of my user's data in a single document when using a document database?

I am creating an Android flash card app and I am thinking about using a document db, like MongoDB Stitch, to store my user's information. So far, I have thought about storing the following in a single document per user:
username
hashed password
some unique identifier for the user
an undetermined list of objects that will contain data for the front and back part of the flash card
I have do not have any experience working with no-SQL db's so I am not sure if this would be a good approach or not and would greatly appreciate some constructive feedback on whether this is poor design choice or not.

Update and Insert Bulk XML Data into my SQLite Database

I want to download a hosted XML document into my app's bundled SQLite database, updating existing rows, or inserting new rows of data as necessary.
My thoughts as far as app design are this:
App loads.
App looks for a connection to XML Host.
If connection exists, App consumes the hosted XML document, updating row and column data in the bundled SQLite database, adding any new rows if new rows exist in the XML document. If no connection exists, App uses the previously stored data in the SQLite database.
User has a merry time using the app, oblivious to the state of the data.
Is this the right approach? Is there a better way to do this? How do I do bulk inserts and updates from an XML document into my SQLite database. I've only seen examples of how to do this row by row. My data is hundreds of rows by 10 columns.
Any insight is greatly appreciated.
lq
I found a link that answers my question and provides a working example of taking an XML document and inserting it into a SQLite database: http://blog.sallarp.com/iphone-core-data-uitableview-drill-down/
I think your idea is ok.. I have developed "Movie Vault for iPad" app and its doing the exactly same thing. This app also have lot of movies data to download and its working quite well. You can also do one thing you can give a "Refresh" button and when user click/tap on this button you can download the xml and insert it in database in a secondary thread.

K2 Blackpearl - populating SmartObject attributes

I'm very new to learning how to use K2 Blackpearl and am trying to understand how to effectively use SmartObjects.
Basically I have a list of questions I want to ask a user so currently I've created a smartObject with 2 attributes (Question, Answer). I have a list of all the questions I want to ask stored in a SQL server db.
Is it possible to auto-create either an InfoPath form or as ASP.NET page (At this stage I'm not too bothered which one I use - just want to see something working so please feel free to recommend which one is easiest) which will get the questions from the database and auto-create the 'fields' which the user will need to place an answer to the question... Then save this back to the smart object?
Thanks in advance for any help, much appreciated!
I see this question is very old and the suggestion of using InfoPath was probably good back then. For the record, as of today, InfoPath is no longer the recommended option.
Today, using SmartForms, I would create one SmartObject (smo) for your question/answer table (assuming there is a single answer per question, one table it enough). In your table, don´t forget colums to store whether the question is answered or not, by whom and when.
I would then suggest making 2 views: one list view to see all the questions and one item view mainly to answer a question.
When the user clicks on a question in the list view, you load it into the item view. The user can type/select and answer in the item view and click a button to 'send the answer' which effectively calls the update method of the smo.
This is s standard pattern, similar to listing updating users or pretty much any data in your DB. You just need to think about your data model to ensure you won´t stuck later on.
InfoPath is easiest to go, there's no real development, just clicking.
You can use a smartObject on the SQL database (using the Dynamic SQL Service Broker) to get the questions and load them in the InfoPath form. On the submit of the form, you can push the questions and answers to the SmartObject.
I would suggest making the 'answer' smartobject also based on a sql table, so you're data is nicely placed together.