You need to show me the screens from quiz result + the notifications above.
No, not that way, sorry. DB tables can be manipulated. Why? See:
Bruno should be the first, due to time, but he is the second in the table.
So no. Anyway, I'll keep an eye on this and I ask all other users to do the same.
I can't see an error:
/* Calculate the score */
$length = count( $questions );
$right = count( $correctAnswers );
$score = ( $right * 100 ) / $length;
$score = intval( $score );
/* Notification */
if( $this->quiz->type == 'gradeone' )
{
$notification = new \IPS\Notification( \IPS\Application::load( 'quizzes' ), 'game_finished', $this->quiz, array( $this->quiz, \IPS\Member::loggedIn()->name, $score ), array( 'member' => \IPS\Member::loggedIn()->member_id, 'score' => $score ) );
$notification->recipients->attach( $this->quiz->author() );
$notification->send();
}
I don't see how this can send different values. If there was an error in the calculation, both values should be sent wrongly, not one only. There's no other interaction in $score between calculating it and sending the notification.
Tks.
EDIT: @Himadri Goswami @Gabriel Torres, have you noticed different values like the user above in your boards?
EDIT: @xtech, create one account for me + a quiz category + a forum where only us both (or any other user in your board) can view so I can make tests.