Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't show overall graph when no students have completed survey

  • Loading branch information...
commit 77f4a40bbb54b8a0d4247a2fb93d0ffd3a55d3dd 1 parent b416a1c
martin authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/survey/report.php
View
6 mod/survey/report.php
@@ -71,7 +71,11 @@
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;
Please sign in to comment.
Something went wrong with that request. Please try again.