forked from science-ation/science-ation
Check for special award timeslots if the scheduler is configured to
schedule special award judges
This commit is contained in:
parent
9afcd82523
commit
5052234670
@ -70,6 +70,16 @@ if($config['judge_scheduler_percent']=="-1")
|
|||||||
$ok = 0;
|
$ok = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($config['scheduler_enable_sa_scheduling'] == 'yes') {
|
||||||
|
$timeslots = judges_scheduler_check_timeslots_sa();
|
||||||
|
if($timeslots > 0) {
|
||||||
|
echo happy(i18n("There are %1 timeslot(s) defined for special awards judging, good", array($timeslots)));
|
||||||
|
} else {
|
||||||
|
echo error(i18n("There are no timeslots defined for special awards judging (but the scheduler is configured to do special awards judigng)"));
|
||||||
|
$ok = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo "<table class='headertable'><tr><td><h3>Awards</h3></td>";
|
echo "<table class='headertable'><tr><td><h3>Awards</h3></td>";
|
||||||
echo "<td> - <a href=\"awards.php\">".i18n("Awards Manager")."</a>";
|
echo "<td> - <a href=\"awards.php\">".i18n("Awards Manager")."</a>";
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
|
@ -16,6 +16,23 @@ function judges_scheduler_check_timeslots()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function judges_scheduler_check_timeslots_sa()
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
$rows = 0;
|
||||||
|
|
||||||
|
$q=mysql_query("SELECT * FROM judges_timeslots WHERE ".
|
||||||
|
" year='".$config['FAIRYEAR']."'".
|
||||||
|
" AND `type`='special'" );
|
||||||
|
if(mysql_num_rows($q)) {
|
||||||
|
while(( $round=mysql_fetch_object($q))) {
|
||||||
|
$rq=mysql_query("SELECT * FROM judges_timeslots WHERE round_id='$round->id' AND type='timeslot'");
|
||||||
|
$rows += mysql_num_rows($rq);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $rows;
|
||||||
|
}
|
||||||
|
|
||||||
function judges_scheduler_check_awards()
|
function judges_scheduler_check_awards()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
Loading…
Reference in New Issue
Block a user