From a87175912970a3cec23c8c18ad59d7f2b515ec39 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 25 Oct 2006 02:41:41 +0000 Subject: [PATCH] Add the judges scheduler status page, updated automagically using AJAX Redirect the scheduler link to a launcher link that lauches the scheduler then goes to the status page --- admin/judges_scheduler_status.php | 119 +++++++++++++++++++++++ admin/judges_scheduler_status_output.php | 14 +++ admin/judges_schedulerconfig.php | 11 +-- 3 files changed, 137 insertions(+), 7 deletions(-) create mode 100644 admin/judges_scheduler_status.php create mode 100644 admin/judges_scheduler_status_output.php diff --git a/admin/judges_scheduler_status.php b/admin/judges_scheduler_status.php new file mode 100644 index 0000000..7aa9ab5 --- /dev/null +++ b/admin/judges_scheduler_status.php @@ -0,0 +1,119 @@ + + Copyright (C) 2005 James Grant + + 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\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. +*/ +?> + + + + +"; + echo "
"; + echo "".i18n("Judges Scheduler Configuration").""; + +} +else +{ + echo ""; + echo ""; + echo ""; + echo "
".i18n("Scheduler status").":
".i18n("Scheduler percent").":
"; +?> + + diff --git a/admin/judges_scheduler_status_output.php b/admin/judges_scheduler_status_output.php new file mode 100644 index 0000000..d2d1bc4 --- /dev/null +++ b/admin/judges_scheduler_status_output.php @@ -0,0 +1,14 @@ +val; + +$q=mysql_query("SELECT val FROM config WHERE year='0' AND var='judge_scheduler_activity'"); +$r=mysql_fetch_object($q); +$status=$r->val; + +echo "$percent:$status\n"; +?> diff --git a/admin/judges_schedulerconfig.php b/admin/judges_schedulerconfig.php index ded5883..c631504 100644 --- a/admin/judges_schedulerconfig.php +++ b/admin/judges_schedulerconfig.php @@ -97,17 +97,14 @@ ogram; see the file COPYING. If not, write to 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."); + divisional awards judging teams. Click link below to start the scheduler. + Please be patient as it may take several minutes find an good solution to + the judging team assignments."); echo "
"; echo "
"; - echo "".i18n("Create Divisional Awards Judging Teams").""; - - + echo "".i18n("Start the judging scheduler to create divisional awards judging teams and team project assignments").""; }