Hello guys iam working with a online exam project
i have a question_table which has topic_id as foreign key with questions in it
and i have a assessment table. once a student creates assessment for a given topic with question count like 20 means it will be created and saved in this assessment table
whats my doubt is
i have a form that allows students to choose N number of topics like 2 or 3 or so on.. and question count also he will choose that we have option 10,20,30..
Now what i expect is from the choosen topic assessment should be created, say for example if student choose 4 topics and 30 question count means it should be equally take questions from each topic from question_table like 7 questions from each topic (4 tpoics ) and 2 question can be taken randomly so it will be 30 count. and also it need to check in the assessment table that those questions should not be there.. that means if the student wrote exam in the same topic yesterday means those questions will be saved in assessment table, those questions should be neglected and new questions should be fetched from those 4 topics equally each more or less..
Kindly provide a solutions totally 3 conditions
- question count and topic count is fixed by student
- based on the total question count questions must be fetched equally with the selected topics
- those questions must not be there in assessment table for that auth->user
How i can achieve this.
and i wrote a long code for this and achived. but the code is too long , so when student try to write exam its loading loading loading taking too long time to generate the question mean while student pressing the submit button multiple times, so lots of request issued to the server..
Kindly provide a query and also for this multiple pressing of student