gabnet,
Make these changes:
File: wp-survey-and-quiz-tool\includes\site\quiz.php
Line 73:
Change:
$wpdb->prepare("SELECT COUNT(*) FROM ".WPSQT_RESULTS_TABLE." WHERE ipaddress = %s and quizid = %d", array($_SERVER['REMOTE_ADDR'],$_SESSION['wpsqt']['current_id']))
To:
$wpdb->prepare("SELECT COUNT(*) FROM ".WPSQT_RESULTS_TABLE." WHERE ipaddress = %s and quizid = %d", array($current_user->user_login,$_SESSION['wpsqt']['current_id']))
Line 318:
Change:
array($personName,$_SERVER['REMOTE_ADDR'],serialize($_SESSION['wpsqt'][$quizName]['person']),serialize($_SESSION['wpsqt'][$quizName]['quiz_sections']),$timeTaken,$_SESSION['wpsqt'][$quizName]['quiz_details']['id']) ) );
To:
array($personName,$current_user->user_login,serialize($_SESSION['wpsqt'][$quizName]['person']),serialize($_SESSION['wpsqt'][$quizName]['quiz_sections']),$timeTaken,$_SESSION['wpsqt'][$quizName]['quiz_details']['id']) ) );
Basically you need to change $_SERVER[‘REMOTE_ADDR’] to $current_user->user_login
[]’s
[Please post code snippets between backticks or use the code button.]