From e6243d0ab98bdb0cbf1841c28e05264541e1cffd Mon Sep 17 00:00:00 2001 From: james Date: Mon, 27 Feb 2012 20:33:15 +0000 Subject: [PATCH] And highlight the error if it happens! --- schoolinvite.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/schoolinvite.php b/schoolinvite.php index 3491849..6341205 100644 --- a/schoolinvite.php +++ b/schoolinvite.php @@ -120,11 +120,14 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode']) if($config['participant_registration_type']=="invite") { if($school->projectlimitper=="total") { if($school->projectlimit) { - echo i18n("You have invited %1 of %2 total projects for your school",array($currentinvited,$school->projectlimit)); if($currentinvited<$school->projectlimit) { + echo i18n("You have invited %1 of %2 total projects for your school",array($currentinvited,$school->projectlimit)); for($a=$config['mingrade'];$a<=$config['maxgrade'];$a++) $okaygrades[]=$a; } + else { + echo error(i18n("You have invited %1 of %2 total projects for your school",array($currentinvited,$school->projectlimit))); + } } else { echo i18n("You have invited %1 project(s) for your school",array($currentinvited,$school->projectlimit));