php - If you build an online examination system, how should you store indefinite multiple-choice questions?
phpcn_u1582
phpcn_u1582 2017-05-17 09:55:53
0
4
1063

I am currently working on an online examination system. The test questions are very open. Multiple-choice questions not only have options, but also open options

For example, in a question, ABCDE option E is, do you have any other good ideas for options like ________, and this option is also indefinite. Is there any suitable storage method? I plan to use json to store it.

phpcn_u1582
phpcn_u1582

reply all(4)
过去多啦不再A梦

The key fields are as follows:

Field name Field type Instructions
id integer Question id
question varchar(100) Title
answer_options text Answer configuration items, such as single choice, multiple choice, what are the options, or fill in the blanks
answers text Correct answer

Just use json to store it. This is how I made an exam system before

仅有的幸福

You can also just split it with commas and save it

为情所困

json structure storage [{"question_id":"1","answer":"A,B,C"},{"question_id":"2","answer":"B,C,D"}]

黄舟

It feels easy to just divide it up

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template