tcexam icon indicating copy to clipboard operation
tcexam copied to clipboard

create function and condition to limit frequency of repeatable test

Open mamans86 opened this issue 4 years ago • 2 comments

this pull request based on issue number #379

mamans86 avatar Apr 24 '21 17:04 mamans86

@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.

teddyvn avatar Apr 25 '21 14:04 teddyvn

Your method of count user test looks better . Thanks for elaborating my pull request

mamans86 avatar Apr 25 '21 23:04 mamans86