how can i get the marks of student for each attempt through code

how can i get the marks of student for each attempt through code

by Ravishankar Somasundaram -
Number of replies: 1
Hi all,
i have a quiz and students can attend it multiple times..

Question :

how can i get the marks of student for each attempt through code
i mean by using which function..


In reply to Ravishankar Somasundaram

Re: how can i get the marks of student for each attempt through code

by Ravishankar Somasundaram -
i got it...

even though no body replied for this i write my solution for people who want the same thing to happen with their work..

i got the marks through
$attempts = quiz_get_user_attempts($quiz->id, $USER->id);

here $attempts is an associative array containing contents of user with regard to that quiz..
you can extract the required fields