Retrevings Specic Grades

Retrevings Specic Grades

by Brendon Lamb -
Number of replies: 0
I am trying to make a way to insert the grade of a specific quiz within that confirmation email that goes out.

First I have modified the locallib.php file- I added to the "$a" variable and tested it something like this:

$testVar = "test";
$a->grade = $testVar;

This worked and displayed as part of the confirmation email I now see "test".
(I also edited the "quiz.php" language file to include "$a->grade" as part of the email body)

Now I have been trying for 4 or 5 hours to track down a way to grab that specific quiz grade.

One way I found was within the review.php file- after chopping it up a bit i had it just displaying the grade by going to a url like this:

...mod/quiz/review.php?attempt=4

This does work fantastically however whenever I try to import that variable from the review.php file over to the locallib file (specifically to the $a->grade variable) I end up with nothing in my email... just a blank space.

There must be a simple line (or 3) of code i could use to pull the grade of a specific quiz from the database correct?

What is it ! sad

Really frustrated here
-Brendon

Average of ratings: -