MDL-34164 quiz reports: only try to show graphs if GD is installed.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Sat, 14 Jul 2012 08:06:07 +0000 (09:06 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Sat, 14 Jul 2012 08:21:00 +0000 (09:21 +0100)
commit04de7affb6f43aaea6f14e1d25ed9872860bb430
tree19136283807ae2a9df189e211e03364139e2e2c3
parent3b52187e251b910e14dc21d9a379d6c5cc63c290
MDL-34164 quiz reports: only try to show graphs if GD is installed.

if (empty($CFG->gdversion)) { seems to be the common idiom for this.
I refactored the graph output into the renderer, to avoid having to
duplicate that test three times.
mod/quiz/renderer.php
mod/quiz/report/overview/report.php
mod/quiz/report/statistics/report.php