]> git.treefish.org Git - banana.git/blobdiff - admin/blackboard.php
...
[banana.git] / admin / blackboard.php
index b683221cf84298dcb8426dcc9030c49157004f24..4066f84d4249fb5cdd61cca6e4a341d556d8e62a 100644 (file)
@@ -8,6 +8,11 @@
     block("lightgreen", "added blackboard");
   }
 
     block("lightgreen", "added blackboard");
   }
 
+  if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) {
+    block("red", "no students registered");
+    break;
+  }
+
   block("black", "add blackboard");
 ?>
 
   block("black", "add blackboard");
 ?>