I am working on a module where a candidate appears for a quiz for 5 chapters. There are cases based on which a candidate can appear for quiz. If a candidate's quiz appearing validity date is over, he gets an alert box stating his validity is over and he is asked to send request to admin for validity extension. There are different conditions for which this alert box pops up. Now if a candidate has not appeared for any chapter's quiz till validity date and he requests permission from admin, and the admin gives him permission he can appear for quizzes. Here in this case even after getting permission for validity extension alert box pops up because he has not passed in any quiz. How can the given below condition be modified so that the candidate doesn't gets alert box even after getting permission whether he has passed in any quiz or not. Here is my code and I am stuck in this condition only for the above said case.
if((strtotime($today_date) >= strtotime($end_date) || ($pass_count == 0))) {
echo ("<SCRIPT LANGUAGE='JavaScript'>
mess1= 'Your exam validity date has been expired. Click OK to request for extending your Quiz validity or you can ignore by clicking Cancel.'
x = confirm(mess1);
if (x == true) {
window.location = 'validity_request_mail.php?userid=$userid ';
}
</SCRIPT>");
}
Help or advice will be highly appreciated. Thanks.
Aucun commentaire:
Enregistrer un commentaire