forked from science-ation/science-ation
- Fix the total count on the cat/div summary. Several fairs have emailed me to
say the count is wrong. It's not wrong, it's just not printing the number they expect. This fixes that. - Make it more obvious what status the stats are being displayed for.
This commit is contained in:
parent
343d777aab
commit
10bf90f0db
@ -65,22 +65,19 @@ function openstudentinfo(id)
|
|||||||
echo "<form name=\"statuschangerform\" method=\"get\" action=\"registration_list.php\">";
|
echo "<form name=\"statuschangerform\" method=\"get\" action=\"registration_list.php\">";
|
||||||
echo "<select name=\"showstatus\" onchange=\"document.forms.statuschangerform.submit()\">";
|
echo "<select name=\"showstatus\" onchange=\"document.forms.statuschangerform.submit()\">";
|
||||||
|
|
||||||
if($_GET['showstatus']=="") $sel="selected=\"selected\""; else $sel="";
|
$status_str = array();
|
||||||
echo "<option $sel value=\"\">".i18n("Any Status")."</option>\n";
|
$status_str[''] = i18n("Any Status");
|
||||||
if($_GET['showstatus']=="complete") $sel="selected=\"selected\""; else $sel="";
|
$status_str['complete'] = i18n("Complete");
|
||||||
echo "<option $sel value=\"complete\">".i18n("Complete")."</option>\n";
|
|
||||||
|
|
||||||
//if there is no reg fee, then we dont need to show this status, because nobody will ever be in this status
|
//if there is no reg fee, then we dont need to show this status, because nobody will ever be in this status
|
||||||
if($config['regfee']>0)
|
if($config['regfee']>0) $status_str['paymentpending'] = i18n("Payment Pending");
|
||||||
{
|
$status_str['open'] = i18n("Open");
|
||||||
if($_GET['showstatus']=="paymentpending") $sel="selected=\"selected\""; else $sel="";
|
$status_str['new'] = i18n("New");
|
||||||
echo "<option $sel value=\"paymentpending\">".i18n("Payment Pending")."</option>\n";
|
|
||||||
}
|
|
||||||
if($_GET['showstatus']=="open") $sel="selected=\"selected\""; else $sel="";
|
|
||||||
echo "<option $sel value=\"open\">".i18n("Open")."</option>\n";
|
|
||||||
if($_GET['showstatus']=="new") $sel="selected=\"selected\""; else $sel="";
|
|
||||||
echo "<option $sel value=\"new\">".i18n("New")."</option>\n";
|
|
||||||
|
|
||||||
|
$showstatus = ($_GET['showstatus'] == '') ? '' : $_GET['showstatus'] ;
|
||||||
|
foreach($status_str as $s=>$str) {
|
||||||
|
$sel = ($showstatus==$s) ? "selected=\"selected\"" : '';
|
||||||
|
echo "<option $sel value=\"$s\">$str</option>\n";
|
||||||
|
}
|
||||||
echo "</select>";
|
echo "</select>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
@ -222,7 +219,7 @@ else $wherestatus="";
|
|||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
echo "<table style=\"margin-left: 50px;\">";
|
echo "<table style=\"margin-left: 50px;\">";
|
||||||
echo "<tr><td colspan=\"2\"><h3>".i18n("Students / projects per age category / division")."</h3></td></tr>";
|
echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - ".i18n("Students / projects per age category / division")."</h3></td></tr>";
|
||||||
echo "<tr><td colspan=\"2\">";
|
echo "<tr><td colspan=\"2\">";
|
||||||
echo "<table class=\"tableview\" width=\"100%\">";
|
echo "<table class=\"tableview\" width=\"100%\">";
|
||||||
echo "<tr><td width=\"50%\"></td>";
|
echo "<tr><td width=\"50%\"></td>";
|
||||||
@ -256,17 +253,21 @@ else $wherestatus="";
|
|||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
echo "<tr><td><b>".i18n("Total")."</b></td>";
|
echo "<tr><td><b>".i18n("Total")."</b></td>";
|
||||||
|
$tstud=0;
|
||||||
|
$tproj=0;
|
||||||
foreach($cats AS $c=>$cn) {
|
foreach($cats AS $c=>$cn) {
|
||||||
echo "<td align=\"center\"><b>";
|
echo "<td align=\"center\"><b>";
|
||||||
echo ($tstudcat[$c]?$tstudcat[$c]:0);
|
echo ($tstudcat[$c]?$tstudcat[$c]:0);
|
||||||
echo " ";
|
echo " ";
|
||||||
echo ($tprojcat[$c]?$tprojcat[$c]:0);
|
echo ($tprojcat[$c]?$tprojcat[$c]:0);
|
||||||
echo "</b></td>";
|
echo "</b></td>";
|
||||||
|
$tstud+=$tstudcat[$c];
|
||||||
|
$tproj+=$tprojcat[$c];
|
||||||
}
|
}
|
||||||
echo "<td align=\"center\"><b>";
|
echo "<td align=\"center\"><b>";
|
||||||
echo ($stats_totalstudents?$stats_totalstudents:0);
|
echo ($tstud);
|
||||||
echo " ";
|
echo " ";
|
||||||
echo ($stats_totalprojects?$stats_totalprojects:0);
|
echo ($tproj);
|
||||||
echo "</b></td>";
|
echo "</b></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
@ -274,7 +275,7 @@ else $wherestatus="";
|
|||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "<tr><td colspan=\"2\"><br /></td></tr>";
|
echo "<tr><td colspan=\"2\"><br /></td></tr>";
|
||||||
echo "<tr><td colspan=\"2\"><h3>".i18n("Students / projects per age category / school")."</h3></td></tr>";
|
echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - ".i18n("Students / projects per age category / school")."</h3></td></tr>";
|
||||||
echo "<tr><td colspan=\"2\">";
|
echo "<tr><td colspan=\"2\">";
|
||||||
echo "<table class=\"tableview\" width=\"100%\">";
|
echo "<table class=\"tableview\" width=\"100%\">";
|
||||||
echo "<tr><td width=\"50%\"></td>";
|
echo "<tr><td width=\"50%\"></td>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user