Multiple choice Data for Moodle database - database

Does anyone know where the Moodle multiple choice data is ? like the data of letter A , B , C etc.? because I really want to know where it stores. I hope someone can help me for the Thesis project making.

I think you are looking for (mdl)_qtype_multichoice_options.
You can find which database tables particular question (or even module) is using inside question subfolder, "db" folder.
See here for example: https://github.com/moodle/moodle/blob/master/question/type/multichoice/db/install.xml
EDIT:
My bad, mentioned table points to single, multichoice questions options, not real answers (if that is what you are looking for).
You are looking for (mdl)_question_answers (where mdl_question_anwsers.question points to mdl_question.id (and mdl_qtype_multichoice_options.questionid).

After studying the Moodle database for hours, the multiple choice data ,like a. Alpga, b. Bravo etc., are stored in the moodle.mdl_question_answers. Except for the essay type which has a different storage as well.

You didn't specify what exactly you're researching and which technology you're using, but you can easily extract some quiz data from Moodle with R, I use the moodler package. If you're connecting to the Moodle database from R, then give it a go. The author is quite responsive, so he may be able to accommodate your requests.
https://channel9.msdn.com/Events/useR-international-R-User-conferences/useR-International-R-User-2017-Conference/moodler-A-new-R-package-to-easily-fetch-data-from-Moodle

Related

Flutter offline database

I am beginner in python and Flutter (4 months that i actually code) self-taught . There is a lot of information and I am facing a problem. I don't know how to go about it.
I am building a dictionary app in Flutter. I extracted all the words and definitions from the French Wiktionary with Scrapy and I processed all the data with pyspark. All data was inserted into an ObjectBox database with python and which has a final size of 460 mb for 355,000 elements. I compressed it with Brotli and its final size is 65 mb. So I end up with a compress mdb file. And now I'm stuck.
I thought of extracting the database to read it live with ObjectBox in Flutter but it does not read the mdb files directly and it gets complicated, I can't find any documentation on the subject. Moreover I tell myself that if the live extraction is not done on the internal memory, it will reserve ram? (If I understood correctly) This will not lead to a crash?
Or is it possible to extract it when installing the App so that objectBox can read it directly?
Or maybe I'm scratching my head over nothing. Directly read a Json but I'm afraid that the queries will be long because the word search is live for the user That this one writes a letter, my program must return me the words beginning with this one.
What would you do to maximize performance in the background ? Thanks for your help .
welcome on StackOverflow! :)
I think your question is a duplicate of this one:
How setup dart objectbox with a local database pre-populated?
as long as you refer to this NoSQL database by ObjectBox in both python and flutter and you're trying to use this package in the former and this in the latter.
Is that the case? Does the answer on the other question help you? If not, can you pls. elaborate what's missing/failing?
In general if you add a few links/references + narrow down the number of things/topics you ask might help (you can ask follow-up questions in comments later on answers or just post a new question if you still need infos). Not that I'm a pro here, could just make it easier for others to answer IMHO.

How are stored handwritten notes from apps in databases?

At the beggining I'd like to say it's not an emergency :D
I was thinking about project ideas recently. Projects that I could try to create to learn something more, something new or just to leave my comfort zone. I've picked notes app project that support handwritten notes. And here's the first problem, my little knowledge can't come up with idea how to store these handwritten notes in database.
Database or other technologies haven't been picked yet so there is no "How to store it in MySQL?" and so on... just theoretically thinking how it could be done. I was looking in google and here on stackoverflow but didn't get nothing similar, just some questions how to verify or recognize handwritten notes.
Has anybody any idea or lead I could go by?
Here I am assuming your "handwritten notes" are images. A simple solution might be uploading your images somewhere (e.g. Amazon S3, but there are countless options out there). Then, in some database you might have a reference to the URL of the image. In your code you can then download the images using the URL and process them as you see fit.
Note: I am making many assumptions here but I hope this helps.

How is ElasticSearch supposed to work in CakePHP 3?

I've been trying my very best not to ask any nosy question here in stackoverflow, but it has been almost one week since I got stuck in this problem and I couldn't find any solution.
I already have my working website built with CakePHP 3.2. What the website basically does is scrape Twitter for tweets containing a given search term, check if it's already in my database, and store it if it doesn't yet exist. Twitter's JSON response has this "tweet_id" property, and I've been using that value to check for whether I should ignore or append a specific tweet to my DB. While this might be okay while my database is small, I suspect it's going to slow things down considerably when my tables grow bigger. Thus my need for ElasticSearch.
My ElasticSearch server is running on my Arch Linux install, and I've configured my app to point to the said server. Also, I have my "Type" object named the same way as my "Tweets" table (I followed the documentation until the overview part http://book.cakephp.org/3.0/en/elasticsearch.html). This craps out an "Unknown method "alias" error, and following Google searches led me to creating an alternate pagination class since that was what some found to be the cause of the error (https://github.com/lorenzo/audit-stash/issues/4), which still doesn't fix things.
I'm not sure if I got this right. I installed the ElasticSearch plugin with the assumption that all I have to do is name the Types the same name as my tables, since to me the documentation "implies" that this should be done on top of the Blog Tutorial they did to "improve query performance".
TLDR, how is this supposed to work? Is my above assumption right? Do I name the Types differently and index everything myself? I'm not sure if there's just too much automagic, or I'm just poor at these sort of things. And yes, I'm new to frameworks (but not PHP, among other languages)
Thanks in advance!

How do websites use information on a database to create pages?

Sorry about the broad question. I'm just curious if someone could point me in the right direction.
Say there's a database of contact information, and there's a site where you can input a persons name and it brings you to a page with all of their information on that database. How does this happen exactly? The server would have to dynamically create this page, but does it have a generic format that it just fills with the information? And how does this happen?
Like you said, this is a an extremely broad question. It could be either way. The server could generate the entire contents dinamically, or it could be "filling the blanks" into a preformatted layout.
Google some PHP basic tutorials. That should give you a good idea about how this "dynamism" works. Sorry but your question is too broad to ellaborate more.
The server would dynamically create the page using PHP and SQL. There is a quick tutorial at http://www.mysqltutorial.org/php-querying-data-from-mysql-table/ that shows how it would be setup.
If I understood your question right, you are asking things like how this page was created, for example, in which case it can be as simple as a basic PHP and SQL combination. You can check an example on the w3sschools website:
Try it yourself example
There would be special place holders for the data and a query will extract the data and put it into the given place holders, please note, you can also use loops to add things like tables, fetch through multiple rows and so on.

Are most LDAP administrators creating LDIFs by hand?

Are there tools that make the job easier? If command-line only tools exist, then can anyone speculate if there is a market for a GUI tool? For example, you can create a relational database by modeling visually. Should the same notion exist for LDAP?
Apache Directory Studio includes an ldif-Editor. It is still a text editor but with syntax highlighting, autocompletion and group collapsing for ldif files:
http://directory.apache.org/studio/
I don't know if there are any tools but it isn't that hard to create them by hand.
If you are using IPlanet LDAP then they had a nice interface for creating and modifying schemas though. :)
I don't know if you would consider that to be by hand otherwise that is one tool to use.
I've done some LDIF handling using Perl and the Net::LDAP::LDIF module and it made scripting custom LDAP conversions very easy.
Have you looked at the command-line tool, LDIFDE.exe? Should be on your domain controller.
Business people give me Excel spreadsheets with inconsistent formatting of user and group data and want it loaded right away (then they come back with a new version and tell me they've only added some new users, but some are missing, some data is now invalid, there's a missing column etc.) They want unique passwords assigned, group memberships set up based on department id fields, and so forth.
Then they come back two weeks later and want to know about the differences between that spreadsheet and one from six months ago. Sigh.
I generally just do it all with a few hand-crafted Python scripts.
A lot of times you may be copying objects from one tree to another. Or backing them up. In that case, most LDAP tools have some way of exporting as LDIF. Then you can easily modify the files as needed.
Or copy examples to reuse.
I have seen a number of tools that will do tasks and output the results as LDIF, which can be handy, but they are basically point usage tools.

Resources