diff --git a/admin/judges_schedulerconfig.php b/admin/judges_schedulerconfig.php
index 3a6c44a..b8c4131 100644
--- a/admin/judges_schedulerconfig.php
+++ b/admin/judges_schedulerconfig.php
@@ -70,6 +70,16 @@ if($config['judge_scheduler_percent']=="-1")
$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 "
";
diff --git a/admin/judges_schedulerconfig_check.inc.php b/admin/judges_schedulerconfig_check.inc.php
index c8c482c..0dc8742 100644
--- a/admin/judges_schedulerconfig_check.inc.php
+++ b/admin/judges_schedulerconfig_check.inc.php
@@ -16,6 +16,23 @@ function judges_scheduler_check_timeslots()
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()
{
global $config;