Add the ability for a teacher thats logged into the school account and inviting students to easily "login" as any of those students to fill out the student's information.

This commit is contained in:
james 2007-10-26 16:57:14 +00:00
parent 31898032c5
commit b1bc95af95
2 changed files with 10 additions and 1 deletions

View File

@ -54,6 +54,8 @@
}
else if($_POST['action']=="continue")
{
if($_POST['email'])
$_SESSION['email']=stripslashes(mysql_escape_string($_POST['email']));
$q=mysql_query("SELECT registrations.id AS regid, registrations.num AS regnum, students.id AS studentid, students.firstname FROM registrations,students ".
"WHERE students.email='".$_SESSION['email']."' ".

View File

@ -232,7 +232,7 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
echo "<th>".i18n("Email Address")."</th>";
echo "<th>".i18n("Grade")."</th>";
echo "<th>".i18n("Registration Number")."</th>";
echo "<th>".i18n("Actions")."</th></tr>";
echo "<th colspan=\"2\">".i18n("Actions")."</th></tr>";
while($r=mysql_fetch_object($q))
{
echo "<tr><td>$r->lastname</td><td>$r->firstname</td>";
@ -240,6 +240,13 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
echo "<td align=\"center\">$r->grade</td>";
echo "<td align=\"center\">$r->num</td>";
echo "<td align=\"center\">";
echo "<form target=\"_blank\" method=\"post\" action=\"register_participants.php\">";
echo "<input type=\"hidden\" name=\"action\" value=\"continue\">";
echo "<input type=\"hidden\" name=\"email\" value=\"$r->email\">";
echo "<input type=\"hidden\" name=\"regnum\" value=\"$r->num\">";
echo "<input type=\"submit\" value=\"".i18n("Login")."\">";
echo "</form>";
echo "</td><td>";
echo "<a onclick=\"return confirmClick('Are you sure you want to uninvite this student?')\" href=\"schoolinvite.php?action=uninvite&uninvite=$r->id\"><img border=0 src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\"></a>";
echo "</td>";
echo "</tr>";