貼文的作者是 Tim Hunt

Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
It is possible to create questions with PHP code - Moodle does that when the user submits the edit question form.

I would not try to do that by directly inserting data into the database. Many tables are invovled (depending on question type).

To see the required code, probably the simplest example is the code used to generate test data for automated tests: https://github.com/moodle/moodle/blob/main/question/tests/generator/lib.php#L97. (Do not use that test code directly in your real code, but you can learn form it.)