diff --git a/db/db.code.version.txt b/db/db.code.version.txt
index cd7da05..dba40af 100644
--- a/db/db.code.version.txt
+++ b/db/db.code.version.txt
@@ -1 +1 @@
-210
+211
diff --git a/db/db.update.211.sql b/db/db.update.211.sql
new file mode 100644
index 0000000..370bfea
--- /dev/null
+++ b/db/db.update.211.sql
@@ -0,0 +1,6 @@
+CREATE TABLE `schedule_users_availability_link` (
+`schedule_id` INT NOT NULL ,
+`users_id` INT NOT NULL ,
+`roles_id` INT NOT NULL ,
+PRIMARY KEY ( `schedule_id` , `users_id` , `roles_id`)
+) ENGINE = MYISAM ;
diff --git a/judge.inc.php b/judge.inc.php
index cd36e18..65bfde7 100644
--- a/judge.inc.php
+++ b/judge.inc.php
@@ -74,6 +74,14 @@ function judge_status_other(&$u)
return 'complete';
}
+function so_judge_status_other(&$u)
+{
+ global $config;
+
+ /* They must select a language to judge in */
+ if(count($u['languages']) < 1) return 'incomplete';
+ return 'complete';
+}
function judge_status_special_awards(&$u)
diff --git a/judge_other.php b/judge_other.php
index 5678f13..2bcc624 100644
--- a/judge_other.php
+++ b/judge_other.php
@@ -41,7 +41,7 @@ $u = user_load($edit_id);
/* Load the judging rounds */
$times = array();
-$q = mysql_query("SELECT date,starttime,endtime,name FROM judges_timeslots WHERE round_id='0' AND year='{$config['FAIRYEAR']}' ORDER BY starttime,type");
+$q = mysql_query("SELECT date,starttime,endtime,name FROM judges_timeslots WHERE round_id='0' AND conferences_id='{$conference['id']}' ORDER BY starttime,type");
$x = 0;
while($r = mysql_fetch_object($q)) {
$found = false;
@@ -61,8 +61,6 @@ while($r = mysql_fetch_object($q)) {
}
}
-
-
switch($_GET['action']) {
case 'save':
if(!is_array($_POST['languages'])) $_POST['languages']=array();
diff --git a/so_judge_other.php b/so_judge_other.php
new file mode 100644
index 0000000..9c8c388
--- /dev/null
+++ b/so_judge_other.php
@@ -0,0 +1,204 @@
+
+ Copyright (C) 2005 James Grant =i18n("Judge Information")?> -
+
+
+
+
+
diff --git a/user.inc.php b/user.inc.php
index c67336b..e2fca4b 100644
--- a/user.inc.php
+++ b/user.inc.php
@@ -755,8 +755,14 @@ function user_judge_registration_status()
{
global $config;
$now = date('Y-m-d H:i:s');
- if($now < $config['dates']['judgeregopen']) return "notopenyet";
- if($now > $config['dates']['judgeregclose']) return "closed";
+ if(array_key_exists('judgeregopen', $config['dates'])){
+ if($now < $config['dates']['judgeregopen']) return "notopenyet";
+ if($now > $config['dates']['judgeregclose']) return "closed";
+ }
+ if(array_key_exists('regopen', $config['dates'])){
+ if($now < $config['dates']['regopen']) return "notopenyet";
+ if($now > $config['dates']['regclose']) return "closed";
+ }
return "open";
}
diff --git a/user_edit.inc.php b/user_edit.inc.php
index 216fe43..cef83e3 100644
--- a/user_edit.inc.php
+++ b/user_edit.inc.php
@@ -95,7 +95,7 @@ function user_edit_item(&$u, $label, $fname, $type='textbox', $data1=NULL, $data
foreach($data1 AS $key=>$txt) {
$ch = (in_array($key,$data2)) ? 'checked="checked"' : '';
if($x) echo '
';
- echo "$txt";
+ echo "$txt";
$x=1;
}
echo "";
diff --git a/user_edit.php b/user_edit.php
index b22d8ee..2add0ac 100644
--- a/user_edit.php
+++ b/user_edit.php
@@ -111,6 +111,14 @@ $tabs = array( 'fairinfo' => array(
'types' => array('judge'),
'file' => 'judge_other.php',
'status_func' => 'judge_status_other',
+ 'conference_types' => array('sciencefair'),
+ ),
+ 'sojudge' => array(
+ 'label' => 'Judge',
+ 'types' => array('judge'),
+ 'file' => 'so_judge_other.php',
+ 'status_func' => 'so_judge_status_other',
+ 'conference_types' => array('scienceolympics'),
),
'judgeexpertise' => array(
'label' => 'Expertise',
@@ -172,7 +180,7 @@ if(!array_key_exists($selected, $tabs)) {
if(in_array('fair', $types) )
$selected = 'fairinfo';
else
- $selected = 'personal';
+ $selected = '';
}
$fields = array();
@@ -204,6 +212,14 @@ $selected_index = 0;
foreach($tabs as $k=>$t) {
/* Make sure the tab is enabled */
if($t['disabled'] == true) continue;
+
+ // Make sure the tab is applicable to this conference
+ if(array_key_exists('conference_types', $t)){
+ if(!in_array($conference['type'], $t['conference_types'])){
+ continue;
+ }
+ }
+
/* Make sure the user has the right type to see the tab */
$i = array_intersect($t['types'], $types);
if(count($i) == 0) {
@@ -242,6 +258,13 @@ foreach($tabs as $k=>$t) {
continue;
}
+ // Make sure the tab is applicable to this conference
+ if(array_key_exists('conference_types', $t)){
+ if(!in_array($conference['type'], $t['conference_types'])){
+ continue;
+ }
+ }
+
/* Get the status */
if(is_callable($t['status_func'])) {
$s = call_user_func($t['status_func'], &$u);
@@ -308,7 +331,7 @@ foreach($tabs as $k=>$t) {
$(document).ready(function() {
$("#tabs").tabs({
-// selected: =$selected_index?>
+ selected: =$selected_index?>
});
/* Update each tab for complete/incomplete */
@@ -347,7 +370,7 @@ function user_update_tab_status(tabkey,newstatus)
* of each tab doesn't get out of sync) */
var overall = 'complete';
for(var key in stat) {
- if(stat[key] != 'complete') {
+ if(stat[key] != '' && stat[key] != 'complete') {
overall = 'incomplete';
}
}
diff --git a/user_main.php b/user_main.php
index ef2a355..db250c2 100644
--- a/user_main.php
+++ b/user_main.php
@@ -214,7 +214,8 @@ function draw_roles(){
-
+
+
';
- echo i18n("{$roles[$type]['name']} Registration is protected by a password. You must know the {$roles[$type]['name']} Registration Password in order to create an account. Please contact the committee to obtain the password if you wish to register.");
+ echo i18n("{$roles[$type]['name']} Registration is protected by a password. You must know the {$roles[$type]['name']} Registration Password in order to register for this role. Please contact the committee to obtain the password if you wish to register.");
echo "
"; echo i18n("{$roles[$type]['name']} Password").":"; echo "";