forked from science-ation/science-ation
e7d726355d
- Missing: Having a project judged more than once by different judging teams is untested, I don't htink it'll work properly, still working on that part. - Missing: Auto updating the configuration if any of the variables are missing. - Missing: A way to preserve judging questions (like willing_chair), so the user doesn't delete them and break the scheduler, OR, notice saying that the question has been deleted and the scheduler won't use the chair calculations, then we need a way to add them back in with the click of a button.
115 lines
3.5 KiB
PHP
115 lines
3.5 KiB
PHP
<?
|
|
/*
|
|
This file is part of the 'Science Fair In A Box' project
|
|
SFIAB Website: http://www.sfiab.ca
|
|
|
|
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
|
Copyright (C) 2005 James Grant <james@lightbox.org>
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public
|
|
License as published by the Free Software Foundation, version 2.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this pr<input type=\"submit\" value=\"".i18n("Save Configuration")."\" />\n";
|
|
ogram; see the file COPYING. If not, write to
|
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA.
|
|
*/
|
|
?>
|
|
<?
|
|
require("../common.inc.php");
|
|
require("../config_editor.inc.php");
|
|
auth_required('admin');
|
|
require("judges.inc.php");
|
|
require("judges_schedulerconfig_check.inc.php");
|
|
|
|
send_header("Administration - Judge Scheduler Configuration");
|
|
|
|
echo "<a href=\"index.php\"><< ".i18n("Back to Administration")."</a>\n";
|
|
echo "<a href=\"judges.php\"><< ".i18n("Back to Judges")."</a>\n";
|
|
|
|
config_editor("JSCHEDULER_", $config['FAIRYEAR'], "var", $_SERVER['PHP_SELF']);
|
|
|
|
echo "<hr />";
|
|
$ok = 1;
|
|
|
|
echo "<table class='headertable'><tr><td><h3>Timeslots</h3></td>";
|
|
echo "<td> - <a href=\"judges_timeslots.php\">".i18n("Timeslot Manager")."</a>";
|
|
echo "</td></tr></table>";
|
|
|
|
$timeslots = judges_scheduler_check_timeslots();
|
|
if($timeslots > 0) {
|
|
echo happy(i18n("There are %1 timeslot(s) defined for divisional judging, good", array($timeslots)));
|
|
} else {
|
|
echo error(i18n("There are no timeslots defined for divisional judging"));
|
|
$ok = 0;
|
|
}
|
|
|
|
echo "<table class='headertable'><tr><td><h3>Awards</h3></td>";
|
|
echo "<td> - <a href=\"awards.php\">".i18n("Awards Manager")."</a>";
|
|
echo "</td></tr></table>";
|
|
|
|
$missing_awards = judges_scheduler_check_awards();
|
|
if(count($missing_awards) == 0) {
|
|
echo happy(i18n("There is a divisional award for each division, good"));
|
|
} else {
|
|
echo "<br />The following awards are missing:<br /><ul>";
|
|
for($x=0; $x<count($missing_awards); $x++) {
|
|
print($missing_awards[$x]."<br />");
|
|
}
|
|
echo "</ul>";
|
|
echo error(i18n("There are missing divisional awards"));
|
|
$ok = 0;
|
|
}
|
|
|
|
echo "<table class='headertable'><tr><td><h3>Divisional Judging Groupings</h3></td>";
|
|
echo "<td> - <a href=\"judges_jdiv.php\">".i18n("Divisional Judging Groupings Manager")."</a>";
|
|
echo "</td></tr></table>";
|
|
|
|
$jdivs = judges_scheduler_check_jdivs();
|
|
if($jdivs > 0) {
|
|
echo happy(i18n("There are %1 divisional groups defined for divisional judging, good", array($jdivs)));
|
|
} else {
|
|
echo error(i18n("There are no divisional groups defined for divisional judging"));
|
|
$ok = 0;
|
|
}
|
|
|
|
echo "<h3>Projects and Judges</h3><br />";
|
|
|
|
$k=judges_scheduler_check_judges();
|
|
|
|
if(!$k) $ok=0;
|
|
|
|
if($ok)
|
|
{
|
|
echo i18n("Everything looks in order, we're ready to create the
|
|
divisional awards judging teams. Click 'Create Divisional Awards
|
|
Judging Teams' below to start the scheduler. Please be patient as it
|
|
may take several minutes find an good solution to the judging team
|
|
assignments.");
|
|
|
|
echo "<br />";
|
|
echo "<br />";
|
|
|
|
echo "<a href=\"judges_sa.php\">".i18n("Create Divisional Awards Judging Teams")."</a>";
|
|
|
|
|
|
|
|
}
|
|
|
|
echo "</b>";
|
|
echo "<br />";
|
|
echo "<br />";
|
|
echo "<br />";
|
|
|
|
send_footer();
|
|
|
|
|
|
?>
|