forked from science-ation/science-ation
Fix for bug number 471. Tallies weren't adding up on the user list summary table at the bottom.
This commit is contained in:
parent
951b7209d9
commit
e2b5208aee
@ -261,6 +261,8 @@ function neweditor()
|
||||
echo "<td $span>{$r['year']}</td>";
|
||||
|
||||
$first = true;
|
||||
$complete = false;
|
||||
$incomplete = false;
|
||||
foreach($types as $t) {
|
||||
if(!$first) echo '</tr><tr>';
|
||||
echo "<td>{$user_what[$t]}</td>";
|
||||
@ -277,13 +279,13 @@ function neweditor()
|
||||
|
||||
echo "<td>";
|
||||
if(in_array($t, array('parent','committee','alumni','mentor','fair'))) {
|
||||
/* Do nothing, there's nothign to complete */
|
||||
/* Do nothing, there's nothing to complete */
|
||||
} else if($r["{$t}_complete"] == 'yes') {
|
||||
echo "<div class=\"happy\" align=\"center\">".i18n("yes")."</div>";
|
||||
$tally[$userstate]['complete']++;
|
||||
$complete = true;
|
||||
} else {
|
||||
echo "<div class=\"error\" align=\"center\">".i18n("no")."</div>";
|
||||
$tally[$userstate]['incomplete']++;
|
||||
$incomplete = true;
|
||||
}
|
||||
echo "</td>";
|
||||
|
||||
@ -298,6 +300,12 @@ function neweditor()
|
||||
$first = false;
|
||||
}
|
||||
echo '</tr>';
|
||||
|
||||
if($complete){
|
||||
$tally[$userstate]['complete']++;
|
||||
}else if($incomplete){
|
||||
$tally[$userstate]['incomplete']++;
|
||||
}
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
|
Loading…
Reference in New Issue
Block a user