forked from science-ation/science-ation
Added teacher interface in olympics
UI touch ups
This commit is contained in:
parent
4a3ea7dba9
commit
01d70abf74
@ -311,7 +311,14 @@ if(array_key_exists('users_id', $_SESSION)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main" class="clear">
|
<div id="main" class="clear">
|
||||||
<div id="topic-menu">
|
<?
|
||||||
|
if($_SESSION['nav']['tertiary']) {
|
||||||
|
$workAreaStyle = 'style="margin-left:230px;"';
|
||||||
|
}else{
|
||||||
|
$topicMenuStyle = 'style="display:none;"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="topic-menu" <?=$topicMenuStyle?>>
|
||||||
<?
|
<?
|
||||||
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='{$_SESSION['nav']['secondary']}' AND level=2 AND conferencetype='{$conference['type']}' ORDER By ord,task");
|
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='{$_SESSION['nav']['secondary']}' AND level=2 AND conferencetype='{$conference['type']}' ORDER By ord,task");
|
||||||
echo "<ul class=\"topic-menu sfiab-menu\">";
|
echo "<ul class=\"topic-menu sfiab-menu\">";
|
||||||
@ -347,9 +354,12 @@ if(array_key_exists('users_id', $_SESSION)) {
|
|||||||
if(!$_SESSION['nav']['secondary']) {
|
if(!$_SESSION['nav']['secondary']) {
|
||||||
echo "$(\"#division-menu\").hide();\n";
|
echo "$(\"#division-menu\").hide();\n";
|
||||||
}
|
}
|
||||||
if(!$_SESSION['nav']['tertiary']) {
|
/*
|
||||||
|
if($_SESSION['nav']['tertiary']) {
|
||||||
|
echo '$("#work-area").css({"margin-left":"230px"});';
|
||||||
|
}else{
|
||||||
echo "$(\"#topic-menu\").hide();\n";
|
echo "$(\"#topic-menu\").hide();\n";
|
||||||
}
|
}*/
|
||||||
?>
|
?>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -389,7 +399,7 @@ if(substr(getcwd(),-6)!="/admin" && substr(getcwd(),-7)!="/config" && substr(get
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div id="work-area">
|
<div id="work-area" <?=$workAreaStyle?>>
|
||||||
<div id="main-title">
|
<div id="main-title">
|
||||||
<?
|
<?
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
214
|
215
|
||||||
|
17
db/db.update.215.sql
Normal file
17
db/db.update.215.sql
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
INSERT INTO `config` (
|
||||||
|
`var` ,
|
||||||
|
`val` ,
|
||||||
|
`category` ,
|
||||||
|
`type` ,
|
||||||
|
`type_values` ,
|
||||||
|
`ord` ,
|
||||||
|
`description` ,
|
||||||
|
`year` ,
|
||||||
|
`conferences_id` ,
|
||||||
|
`section` ,
|
||||||
|
`conferencetypes`
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
'teacher_registration_type', 'invite', 'Teacher Registration', 'enum', 'open=Open|invite=Invite', '100', 'The type of Teacher Registration to use', '-1', '-1', 'conference', 'sciencefair,scienceolympics'
|
||||||
|
);
|
||||||
|
|
@ -751,6 +751,10 @@ function user_volunteer_registration_status()
|
|||||||
return "open";
|
return "open";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function user_teacher_registration_status(){
|
||||||
|
return "open";
|
||||||
|
}
|
||||||
|
|
||||||
function user_judge_registration_status()
|
function user_judge_registration_status()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -214,7 +214,6 @@ function draw_roles(){
|
|||||||
<button style="width: 100px;" id="activate_<?=$role?>" <?=$a?> onclick="activate('<?=$role?>');return false;" ><?=i18n("Activate")?></button>
|
<button style="width: 100px;" id="activate_<?=$role?>" <?=$a?> onclick="activate('<?=$role?>');return false;" ><?=i18n("Activate")?></button>
|
||||||
<button style="width: 100px;" id="deactivate_<?=$role?>" <?=$d?> onclick="deactivate('<?=$role?>');return false;" ><?=i18n("Deactivate")?></button>
|
<button style="width: 100px;" id="deactivate_<?=$role?>" <?=$d?> onclick="deactivate('<?=$role?>');return false;" ><?=i18n("Deactivate")?></button>
|
||||||
<button style="width: 100px;" id="remove_<?=$role?>" <?=$d?> onclick="remove('<?=$role?>');return false;" ><?=i18n("Remove")?></button>
|
<button style="width: 100px;" id="remove_<?=$role?>" <?=$d?> onclick="remove('<?=$role?>');return false;" ><?=i18n("Remove")?></button>
|
||||||
<button style="width: 100px;" id="settings_<?=$role?>" <?=$d?> onclick="location.href='user_edit.php?tab=<?=$role?>';return false;" ><?=i18n("Settings")?></button>
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
@ -263,6 +262,10 @@ function draw_signup_form($type){
|
|||||||
$welcome_email = false;
|
$welcome_email = false;
|
||||||
break;
|
break;
|
||||||
*/
|
*/
|
||||||
|
case 'teacher':
|
||||||
|
$reg_open = user_teacher_registration_status();
|
||||||
|
$reg_mode = $config['teacher_registration_type'];
|
||||||
|
break;
|
||||||
case 'judge':
|
case 'judge':
|
||||||
$reg_open = user_judge_registration_status();
|
$reg_open = user_judge_registration_status();
|
||||||
$reg_mode = $config['judge_registration_type'];
|
$reg_mode = $config['judge_registration_type'];
|
||||||
@ -280,20 +283,22 @@ function draw_signup_form($type){
|
|||||||
break;
|
break;
|
||||||
*/
|
*/
|
||||||
default:
|
default:
|
||||||
echo "Not handled";
|
echo "Role type '$type' is not handled";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($reg_open == 'open'){
|
if($reg_open == 'open'){
|
||||||
switch($reg_mode){
|
switch($reg_mode){
|
||||||
case 'open':
|
case 'open':
|
||||||
echo "\"$reg_mode\" registration is not yet handled";
|
echo '<p>' . i18n("Registration is open. Please click the 'Register' button if you wish to register.");
|
||||||
|
echo " <button onclick=\"register('" . $type . "');\">" . i18n('Register') . "</button>";
|
||||||
|
echo '</p>';
|
||||||
break;
|
break;
|
||||||
case 'singlepassword':
|
case 'singlepassword':
|
||||||
echo '<p>';
|
echo '<p>';
|
||||||
echo i18n("{$roles[$type]['name']} Registration is protected by a password. You must know the <b>{$roles[$type]['name']} Registration Password</b> in order to register for this role. 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 <b>{$roles[$type]['name']} Registration Password</b> in order to register for this role. Please contact the committee to obtain the password if you wish to register.");
|
||||||
echo "</p><p>";
|
echo "</p><p>";
|
||||||
echo i18n("{$roles[$type]['name']} Password").":<input type=\"password\" size=\"20\" id=\"{$type}_password\" />";
|
echo i18n("{$roles[$type]['name']} Password").":<input type=\"password\" size=\"20\" id=\"{$type}_password\" />";
|
||||||
echo "<button onclick=\"register('" . $type . "');\">Register</button>";
|
echo "<button onclick=\"register('" . $type . "');\">" . i18n('Register') . "</button>";
|
||||||
echo "</p>";
|
echo "</p>";
|
||||||
break;
|
break;
|
||||||
case 'schoolpassword':
|
case 'schoolpassword':
|
||||||
|
@ -80,6 +80,7 @@ $translations = array(
|
|||||||
eval(response);
|
eval(response);
|
||||||
if(schoolInfo != null){
|
if(schoolInfo != null){
|
||||||
$('#infobox').html(schoolInfo);
|
$('#infobox').html(schoolInfo);
|
||||||
|
$('#infobox').css({'border':'solid'});
|
||||||
$('#instructions').html("<?=$translations['if_incorrect'];?>");
|
$('#instructions').html("<?=$translations['if_incorrect'];?>");
|
||||||
}else{
|
}else{
|
||||||
$('#instructions').html("<?=$translations['incorrect'];?>");
|
$('#instructions').html("<?=$translations['incorrect'];?>");
|
||||||
@ -94,7 +95,7 @@ $translations = array(
|
|||||||
// draw the info area
|
// draw the info area
|
||||||
echo "<h4>" . i18n("School Information") . "</h4>";
|
echo "<h4>" . i18n("School Information") . "</h4>";
|
||||||
$currentSchool = $u['schools_id'];
|
$currentSchool = $u['schools_id'];
|
||||||
if($currentSchool != null){
|
if($currentSchool){
|
||||||
echo i18n("You are currently listed as a member of") . "<br/>";
|
echo i18n("You are currently listed as a member of") . "<br/>";
|
||||||
echo '<div id="infobox" style="margin:10px;padding:5px;border:solid;border-width:1px;font-weight:bold">';
|
echo '<div id="infobox" style="margin:10px;padding:5px;border:solid;border-width:1px;font-weight:bold">';
|
||||||
$schoolData = mysql_fetch_assoc(mysql_query("SELECT school, address, city, province_code, postalcode, phone FROM schools WHERE id='$currentSchool'"));
|
$schoolData = mysql_fetch_assoc(mysql_query("SELECT school, address, city, province_code, postalcode, phone FROM schools WHERE id='$currentSchool'"));
|
||||||
@ -102,7 +103,7 @@ if($currentSchool != null){
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<p id="instructions">' . $translations['if_incorrect'] . "</p>";
|
echo '<p id="instructions">' . $translations['if_incorrect'] . "</p>";
|
||||||
}else{
|
}else{
|
||||||
echo '<div id="infobox" style="margin:10px;padding:5px;border:solid;border-width:1px;font-weight:bold"></div>';
|
echo '<div id="infobox" style="margin:10px;padding:5px;border:none;border-width:1px;font-weight:bold"></div>';
|
||||||
echo '<p id="instructions">' . $translations['not_associated'] . "</p>";
|
echo '<p id="instructions">' . $translations['not_associated'] . "</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user