tcexam
tcexam copied to clipboard
create function and condition to limit frequency of repeatable test
this pull request based on issue number #379
@mamans86 My count user test method:
/**
* Count the number times of retries.<br>
* @param $user_id (int) user ID
* @param $test_id (int) test ID
* @return retried times
*/
function F_getTestRetried($user_id, $test_id){
return F_count_rows(K_TABLE_TEST_USER,'WHERE testuser_test_id='.$test_id.' AND testuser_user_id='.$user_id.' AND testuser_status >= 4');
}
Thank for the rest.
Your method of count user test looks better . Thanks for elaborating my pull request