Show the registration number for invited pariticpants on the schoolaccess page.

This is so the school manager (/teacher) can easily tell the students how to login
and also so the teacher can login as the students to confirm theri registration is
complete.
This commit is contained in:
james 2006-01-16 22:25:21 +00:00
parent 0076c5f360
commit 9e70fe11c2

View File

@ -187,12 +187,12 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
echo "<br />"; echo "<br />";
echo "<h4>".i18n("Invited participants from your school")."</h4>"; echo "<h4>".i18n("Invited participants from your school")."</h4>";
$q=mysql_query("SELECT * FROM students WHERE schools_id='".$school->id."' AND year='".$config['FAIRYEAR']."' ORDER BY lastname,firstname"); $q=mysql_query("SELECT students.*,registrations.num FROM students,registrations WHERE schools_id='".$school->id."' AND students.year='".$config['FAIRYEAR']."' AND students.registrations_id=registrations.id ORDER BY lastname,firstname");
echo "<table class=\"summarytable\">"; echo "<table class=\"summarytable\">";
echo "<tr><th>".i18n("Last Name")."</th><th>".i18n("First Name")."</th><th>".i18n("Email Address")."</th></tr>"; echo "<tr><th>".i18n("Last Name")."</th><th>".i18n("First Name")."</th><th>".i18n("Email Address")."</th><th>".i18n("Registration Number")."</th></tr>";
while($r=mysql_fetch_object($q)) while($r=mysql_fetch_object($q))
{ {
echo "<tr><td>$r->lastname</td><td>$r->firstname</td><td>$r->email</td></tr>"; echo "<tr><td>$r->lastname</td><td>$r->firstname</td><td>$r->email</td><td align=\"center\">$r->num</td></tr>";
} }
echo "</table>"; echo "</table>";