]> git.mjollnir.org Git - moodle.git/commitdiff
Don't show overall graph when no students have completed survey
authormartin <martin>
Tue, 25 Jun 2002 07:17:51 +0000 (07:17 +0000)
committermartin <martin>
Tue, 25 Jun 2002 07:17:51 +0000 (07:17 +0000)
mod/survey/report.php

index 7829211aaf6b83f2cc951e3103e6a47b69b6eb9c..9a9b252a201b555fef9f7df8318bffafcc42d237 100644 (file)
 
         print_heading("All scales, all students");
 
-        echo "<P ALIGN=CENTER><A HREF=\"report.php?action=scales&id=$id\"><IMG HEIGHT=$GHEIGHT WIDTH=$GWIDTH ALT=\"Click here to see the scales in more detail\" BORDER=0 SRC=\"graph.php?id=$id&type=overall.png\"></A>";
+        if (count_completed_surveys($survey->id)) {
+            echo "<P ALIGN=CENTER><A HREF=\"report.php?action=scales&id=$id\"><IMG HEIGHT=$GHEIGHT WIDTH=$GWIDTH ALT=\"Click here to see the scales in more detail\" BORDER=0 SRC=\"graph.php?id=$id&type=overall.png\"></A>";
+        } else {
+            echo "<P ALIGN=CENTER>Nobody has yet completed this survey</P>";
+        }
         print_footer($course);
         break;