Php obtained the content of the previous page. I made an online Q & A System. for a small problem, the user answered the question and [click to submit]. after the system corrected the question, I am not sure how to mark the correct and wrong questions on the examination paper submitted by the user, how can I upload the answer page intact? & lt ;? Phpclass & nb php get the content of the previous page
I have an online Q & A system with a small question. after the user answers the question, click Submit. after the system corrects the question, I am not sure how to mark the correct and wrong questions on the examination paper submitted by the user, how to pass the answer page intact,
Class shijuan_controller extends base_controller {
Public function index_action (){
Rendering exam A for user A (any user's exam is randomly generated)
}
Public function submit_action (){
After obtaining the POST [] answer from exam,
Take the rendered exam A in index_action and paste it on it.
Mark right or wrong, and then render it to user A Again
}
}
I don't know how to implement it. Do I have to read and modify the file in submit_action after generating A file for exam ?? Is there any way to share it:
------ Solution --------------------
After the system completes the correction, ajax returns json in real time and then marks each result based on the result.
------ Solution --------------------
"Random generation" is not completely random, right?
I mean, there will always be a question bank. isn't it even possible to randomly create interesting texts on the question?
If you have a question bank, you have an id. if you select a random id, you must record it.
When it is displayed again, it is "not random". Instead, it is read according to the record id.
In fact, this is a consistent practice of the Q & A system, including market research, logical games, psychological testing, and electronic examinations ......
In principle, both the questionnaire and the answer should be retained at the same time for future statistical use, but some questions and answers should be discarded only once completed in pure entertainment.
You did not follow this practice.