forked from science-ation/science-ation
- Add an option to the award ceremony script to show the pronunciation key (if
the students entered it) - Add an option to the award ceremony script to filter the awards by age category (the GVRSF needs one script for juniors, and another for intermediate/senior :)
This commit is contained in:
parent
3a1b4cca15
commit
2d052c056f
@ -18,6 +18,18 @@
|
||||
if($_GET['show_unawarded_prizes']=="on") $show_unawarded_prizes="yes";
|
||||
else $show_unawarded_prizes="no";
|
||||
|
||||
$show_pronunciation= ($_GET['show_pronunciation'] == 'on') ? TRUE : FALSE;
|
||||
|
||||
if(is_array($_GET['show_category'])) {
|
||||
$show_category = array();
|
||||
foreach($_GET['show_category'] as $id=>$val) {
|
||||
$show_category[] = "projects.projectcategories_id='$id'";
|
||||
}
|
||||
$and_categories = join(' OR ', $show_category);
|
||||
} else {
|
||||
$and_categories = '1';
|
||||
}
|
||||
|
||||
$type=$_GET['type'];
|
||||
if(!$type) $type="pdf";
|
||||
|
||||
@ -72,6 +84,7 @@
|
||||
winners.projects_id,
|
||||
projects.projectnumber,
|
||||
projects.title,
|
||||
projects.projectcategories_id,
|
||||
projects.registrations_id AS reg_id
|
||||
FROM
|
||||
award_prizes
|
||||
@ -81,6 +94,7 @@
|
||||
award_awards_id='$r->id'
|
||||
AND award_prizes.year='$foryear'
|
||||
AND award_prizes.excludefromac='0'
|
||||
AND ($and_categories)
|
||||
ORDER BY
|
||||
`order`");
|
||||
echo mysql_error();
|
||||
@ -142,6 +156,7 @@
|
||||
|
||||
$sq=mysql_query("SELECT students.firstname,
|
||||
students.lastname,
|
||||
students.pronunciation,
|
||||
students.schools_id,
|
||||
schools.school
|
||||
FROM
|
||||
@ -154,17 +169,25 @@
|
||||
|
||||
$students=" Students: ";
|
||||
$studnum=0;
|
||||
$pronounce = "";
|
||||
while($studentinfo=mysql_fetch_object($sq))
|
||||
{
|
||||
if($studnum>0) $students.=", ";
|
||||
$students.="$studentinfo->firstname $studentinfo->lastname";
|
||||
|
||||
if($studnum>0) $pronounce .= ", ";
|
||||
$pronounce .= "\"{$studentinfo->pronunciation}\"";
|
||||
|
||||
$studnum++;
|
||||
|
||||
//we will assume that they are coming from the same school, so lets just grab the last students school
|
||||
//and use it.
|
||||
$school=$studentinfo->school;
|
||||
}
|
||||
|
||||
$rep->addText($students);
|
||||
if(trim($pronounce) != '' && $show_pronunciation == TRUE)
|
||||
$rep->addText("Pronunciation: $pronounce");
|
||||
$rep->addText(" School: $school");
|
||||
}
|
||||
else
|
||||
|
@ -68,6 +68,17 @@
|
||||
echo "<td><input name=\"show_unawarded_awards\" type=\"checkbox\" ".($config['reports_show_unawarded_awards'] == 'yes' ? "checked" : "")."/></td></tr>";
|
||||
echo "<tr><td colspan=3><b>".i18n("Show prizes without winners").":</b></td>";
|
||||
echo "<td><input name=\"show_unawarded_prizes\" type=\"checkbox\" ".($config['reports_show_unawarded_prizes'] == 'yes' ? "checked" : "")."/></td></tr>";
|
||||
echo "<tr><td colspan=3><b>".i18n("Show student name pronunciation").":</b></td>";
|
||||
echo "<td><input name=\"show_pronunciation\" type=\"checkbox\" /></td></tr>";
|
||||
|
||||
echo "<tr><td colspan=\"3\"><b>".i18n("Include the following age categories").":</b></td>";
|
||||
echo "<td>";
|
||||
$q=mysql_query("SELECT * FROM projectcategories WHERE year='{$config['FAIRYEAR']}' ORDER BY id");
|
||||
while($r=mysql_fetch_object($q)) {
|
||||
echo "<input name=\"show_category[{$r->id}]\" type=\"checkbox\" checked=\"checked\" />";
|
||||
echo "".i18n($r->category)."<br />";
|
||||
}
|
||||
|
||||
|
||||
echo "</table>";
|
||||
echo "<input type=\"submit\" value=\"".i18n("Generate Script")."\" />";
|
||||
|
Loading…
x
Reference in New Issue
Block a user