forked from science-ation/science-ation
Group invitations list query by registration number so it only gets ONE student per project.
This commit is contained in:
parent
1d2755601a
commit
f56d8f576c
@ -96,7 +96,8 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
|
|||||||
$datecheck=mysql_fetch_object($q);
|
$datecheck=mysql_fetch_object($q);
|
||||||
|
|
||||||
|
|
||||||
$q=mysql_query("SELECT students.*,
|
$q=mysql_query("SELECT
|
||||||
|
students.*,
|
||||||
registrations.num,
|
registrations.num,
|
||||||
registrations.emailcontact
|
registrations.emailcontact
|
||||||
FROM
|
FROM
|
||||||
@ -106,13 +107,13 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
|
|||||||
students.schools_id='".$school->id."'
|
students.schools_id='".$school->id."'
|
||||||
AND students.year='".$config['FAIRYEAR']."'
|
AND students.year='".$config['FAIRYEAR']."'
|
||||||
AND students.registrations_id=registrations.id
|
AND students.registrations_id=registrations.id
|
||||||
|
GROUP BY registrations.num
|
||||||
ORDER BY
|
ORDER BY
|
||||||
lastname,
|
lastname,
|
||||||
firstname");
|
firstname");
|
||||||
$currentinvited=mysql_num_rows($q);
|
$currentinvited=mysql_num_rows($q);
|
||||||
|
|
||||||
if($datecheck!=0)
|
if($datecheck!=0) {
|
||||||
{
|
|
||||||
echo i18n("In order for your school's students to register for the fair, you will need to invite them to register. Simply enter their email address below to invite them to register. <b>Important</b>: for group projects, only add one of the participants, that participant will then add the other group member(s) to the project");
|
echo i18n("In order for your school's students to register for the fair, you will need to invite them to register. Simply enter their email address below to invite them to register. <b>Important</b>: for group projects, only add one of the participants, that participant will then add the other group member(s) to the project");
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
@ -150,6 +151,7 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
|
|||||||
AND students.grade<='$catr->maxgrade'
|
AND students.grade<='$catr->maxgrade'
|
||||||
AND students.year='".$config['FAIRYEAR']."'
|
AND students.year='".$config['FAIRYEAR']."'
|
||||||
AND students.registrations_id=registrations.id
|
AND students.registrations_id=registrations.id
|
||||||
|
GROUP BY registrations.num
|
||||||
");
|
");
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
$r2=mysql_fetch_object($q2);
|
$r2=mysql_fetch_object($q2);
|
||||||
@ -226,6 +228,7 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
|
|||||||
echo "<th>".i18n("Grade")."</th>";
|
echo "<th>".i18n("Grade")."</th>";
|
||||||
echo "<th>".i18n("Registration Number")."</th>";
|
echo "<th>".i18n("Registration Number")."</th>";
|
||||||
echo "<th colspan=\"2\">".i18n("Actions")."</th></tr>";
|
echo "<th colspan=\"2\">".i18n("Actions")."</th></tr>";
|
||||||
|
|
||||||
while($r=mysql_fetch_object($q)) {
|
while($r=mysql_fetch_object($q)) {
|
||||||
echo "<tr><td>$r->lastname</td><td>$r->firstname</td>";
|
echo "<tr><td>$r->lastname</td><td>$r->firstname</td>";
|
||||||
echo "<td>$r->email";
|
echo "<td>$r->email";
|
||||||
|
Loading…
Reference in New Issue
Block a user