2007-03-18 07:10:54 +00:00
|
|
|
<?
|
|
|
|
/*
|
|
|
|
This file is part of the 'Science Fair In A Box' project
|
|
|
|
SFIAB Website: http://www.sfiab.ca
|
|
|
|
|
|
|
|
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
|
|
|
Copyright (C) 2005 James Grant <james@lightbox.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public
|
|
|
|
License as published by the Free Software Foundation, version 2.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; see the file COPYING. If not, write to
|
|
|
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2010-02-02 18:19:11 +00:00
|
|
|
function report_students_i18n_fr(&$report, $field, $text)
|
2007-12-25 05:13:42 +00:00
|
|
|
{
|
|
|
|
return i18n($text, array(), array(), 'fr');
|
|
|
|
}
|
|
|
|
|
2010-02-02 18:19:11 +00:00
|
|
|
function reports_students_numstudents(&$report, $field, $text)
|
2007-12-30 21:05:54 +00:00
|
|
|
{
|
2010-11-02 20:35:47 +00:00
|
|
|
$conferences_id = $report['conferences_id'];
|
2007-12-30 21:05:54 +00:00
|
|
|
$q = mysql_query("SELECT students.id FROM students
|
|
|
|
WHERE students.registrations_id='$text'
|
2010-11-02 20:35:47 +00:00
|
|
|
AND students.conferences_id='$conferences_id'");
|
2007-12-30 21:05:54 +00:00
|
|
|
return mysql_num_rows($q);
|
|
|
|
}
|
|
|
|
|
2010-02-02 18:19:11 +00:00
|
|
|
function reports_students_award_selfnom_num(&$report, $field, $text, $n)
|
2008-01-23 18:32:31 +00:00
|
|
|
{
|
2010-11-02 20:35:47 +00:00
|
|
|
$conferences_id = $report['conferences_id'];
|
2008-01-23 18:32:31 +00:00
|
|
|
$q = mysql_query("SELECT award_awards.name FROM
|
|
|
|
projects
|
|
|
|
LEFT JOIN project_specialawards_link ON project_specialawards_link.projects_id=projects.id
|
|
|
|
LEFT JOIN award_awards ON award_awards.id=project_specialawards_link.award_awards_id
|
|
|
|
WHERE projects.id='$text'
|
2010-11-02 20:35:47 +00:00
|
|
|
AND projects.conferences_id='$conferences_id'
|
|
|
|
AND project_specialawards_link.conferences_id='$conferences_id'
|
2008-01-23 18:40:59 +00:00
|
|
|
LIMIT $n,1");
|
2008-01-23 18:32:31 +00:00
|
|
|
echo mysql_error();
|
|
|
|
$i = mysql_fetch_assoc($q);
|
|
|
|
return $i['name'];
|
|
|
|
}
|
2010-02-02 18:19:11 +00:00
|
|
|
function reports_students_award_selfnom_1(&$report, $field, $text)
|
2008-01-23 18:32:31 +00:00
|
|
|
{
|
2010-02-02 18:19:11 +00:00
|
|
|
return reports_students_award_selfnom_num(&$report, $field, $text, 0);
|
2008-01-23 18:32:31 +00:00
|
|
|
}
|
2010-02-02 18:19:11 +00:00
|
|
|
function reports_students_award_selfnom_2(&$report, $field, $text)
|
2008-01-23 18:32:31 +00:00
|
|
|
{
|
2010-02-02 18:19:11 +00:00
|
|
|
return reports_students_award_selfnom_num(&$report, $field, $text, 1);
|
2008-01-23 18:32:31 +00:00
|
|
|
}
|
2010-02-02 18:19:11 +00:00
|
|
|
function reports_students_award_selfnom_3(&$report, $field, $text)
|
2008-01-23 18:32:31 +00:00
|
|
|
{
|
2010-02-02 18:19:11 +00:00
|
|
|
return reports_students_award_selfnom_num(&$report, $field, $text, 2);
|
2008-01-23 18:32:31 +00:00
|
|
|
}
|
2010-02-02 18:19:11 +00:00
|
|
|
function reports_students_award_selfnom_4(&$report, $field, $text)
|
2008-01-23 18:32:31 +00:00
|
|
|
{
|
2010-02-02 18:19:11 +00:00
|
|
|
return reports_students_award_selfnom_num(&$report, $field, $text, 3);
|
2008-01-23 18:32:31 +00:00
|
|
|
}
|
2010-02-02 18:19:11 +00:00
|
|
|
function reports_students_award_selfnom_5(&$report, $field, $text)
|
2008-01-23 18:32:31 +00:00
|
|
|
{
|
2010-02-02 18:19:11 +00:00
|
|
|
return reports_students_award_selfnom_num(&$report, $field, $text, 4);
|
2008-01-23 18:32:31 +00:00
|
|
|
}
|
2010-04-12 00:07:33 +00:00
|
|
|
function reports_students_school_principal(&$report, $field, $text)
|
|
|
|
{
|
|
|
|
if($text > 0) { /* text is the uid */
|
2010-11-02 20:35:47 +00:00
|
|
|
$u = user_load($text);
|
2010-04-12 00:07:33 +00:00
|
|
|
return $u['name'];
|
|
|
|
}
|
|
|
|
return '';
|
|
|
|
}
|
2008-01-23 18:32:31 +00:00
|
|
|
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
$report_students_fields = array(
|
|
|
|
'pn' => array(
|
|
|
|
'name' => 'Project Number',
|
|
|
|
'header' => '#',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 15.24 /*mm*/,
|
2007-12-29 08:46:40 +00:00
|
|
|
'table' => 'projects.projectnumber',
|
2009-03-24 15:08:51 +00:00
|
|
|
'table_sort' => 'projects.projectsort, projects.projectnumber'),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
|
|
|
'last_name' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Student Name Information',
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Student -- Last Name',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Last Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'students.lastname' ),
|
|
|
|
|
|
|
|
'first_name' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Student -- First Name',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'First Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'students.firstname' ),
|
|
|
|
|
|
|
|
'name' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Student -- Full Name (last, first)',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 44.45 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => "CONCAT(students.lastname, ', ', students.firstname)",
|
|
|
|
'table_sort'=> 'students.lastname' ),
|
|
|
|
|
2007-03-19 06:51:44 +00:00
|
|
|
'namefl' => array(
|
|
|
|
'name' => 'Student -- Full Name (first last)',
|
|
|
|
'header' => 'Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 44.45 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-03-19 06:51:44 +00:00
|
|
|
'table' => "CONCAT(students.firstname, ' ', students.lastname)",
|
|
|
|
'table_sort'=> 'students.lastname' ),
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'partner' => array(
|
2007-12-25 05:13:42 +00:00
|
|
|
'name' => 'Student -- Partner Name (last, first)',
|
|
|
|
'header' => 'Partner',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-12-25 05:13:42 +00:00
|
|
|
'table' => "CONCAT(students2.lastname, ', ', students2.firstname)",
|
|
|
|
'components' => array('partner') ),
|
|
|
|
|
|
|
|
'partnerfl' => array(
|
|
|
|
'name' => 'Student -- Partner Name (first last)',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Partner',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-12-30 23:02:41 +00:00
|
|
|
'table' => "CONCAT(students2.firstname, ' ', students2.lastname)",
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'components' => array('partner') ),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
|
|
|
'bothnames' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => "Student -- Both Student Names",
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Student(s)',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => "CONCAT(students.firstname, ' ', students.lastname, IF(students2.lastname IS NULL,'', CONCAT(', ', students2.firstname, ' ', students2.lastname)))",
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'table_sort' => 'students.lastname',
|
|
|
|
'components' => array('partner') ),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2007-12-20 09:43:22 +00:00
|
|
|
'allnames' => array(
|
|
|
|
'name' => "Student -- All Student Names (REQUIRES MYSQL 5.0) ",
|
|
|
|
'header' => 'Student(s)',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-12-20 09:43:22 +00:00
|
|
|
'table' => "GROUP_CONCAT(students.firstname, ' ', students.lastname ORDER BY students.lastname SEPARATOR ', ')",
|
|
|
|
'group_by' => array('students.registrations_id')),
|
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
'pronunciation' => array(
|
|
|
|
'name' => 'Student -- Name Pronunciation',
|
|
|
|
'header' => 'Pronunciation',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => 'students.pronunciation'),
|
|
|
|
|
2007-04-05 21:33:39 +00:00
|
|
|
'email' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Student Contact Information',
|
2007-04-05 21:33:39 +00:00
|
|
|
'name' => 'Student -- Email',
|
|
|
|
'header' => 'Email',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 57.15 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-04-05 21:33:39 +00:00
|
|
|
'table' => 'students.email'),
|
|
|
|
|
|
|
|
'phone' => array(
|
|
|
|
'name' => 'Student -- Phone',
|
|
|
|
'header' => 'Phone',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-04-05 21:33:39 +00:00
|
|
|
'table' => 'students.phone'),
|
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
'address' => array(
|
|
|
|
'name' => 'Student -- Street Address',
|
|
|
|
'header' => 'Address',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => 'students.address'),
|
|
|
|
|
|
|
|
'city' => array(
|
|
|
|
'name' => 'Student -- City',
|
|
|
|
'header' => 'City',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => 'students.city' ),
|
|
|
|
|
|
|
|
'province' => array(
|
|
|
|
'name' => 'Student -- '.$config['provincestate'],
|
|
|
|
'header' => $config['provincestate'],
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 19.05 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => 'students.province' ),
|
|
|
|
|
|
|
|
'postal' => array(
|
|
|
|
'name' => 'Student -- '.$config['postalzip'],
|
|
|
|
'header' => $config['postalzip'],
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 19.05 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => 'students.postalcode' ),
|
|
|
|
|
|
|
|
'address_full' => array(
|
|
|
|
'name' => 'Student -- Full Address',
|
|
|
|
'header' => 'Address',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => "CONCAT(students.address, ', ', students.city, ', ', students.province, ', ', students.postalcode)" ),
|
|
|
|
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'grade' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Other Student Information',
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Student -- Grade',
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'header' => 'Gr.',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 7.62 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'students.grade'),
|
|
|
|
|
2007-12-30 21:20:36 +00:00
|
|
|
'grade_str' => array(
|
|
|
|
'name' => 'Student -- Grade ("Grade x", not just the number)',
|
|
|
|
'header' => 'Gr.',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 7.62 /*mm*/,
|
2007-12-30 21:20:36 +00:00
|
|
|
'table_sort' => 'students.grade',
|
|
|
|
'table' => "CONCAT('Grade ', students.grade)"),
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'gender' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Student -- Gender',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Gender',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'students.sex',
|
|
|
|
'value_map' =>array ('male' => 'Male', 'female' => 'Female')),
|
|
|
|
|
2007-03-18 07:24:52 +00:00
|
|
|
'birthdate' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Student -- Birthdate',
|
2007-03-18 07:24:52 +00:00
|
|
|
'header' => 'Birthdate',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 22.86 /*mm*/,
|
2007-03-18 07:24:52 +00:00
|
|
|
'table' => 'students.dateofbirth'),
|
|
|
|
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'age' => array(
|
|
|
|
'name' => 'Student -- Age (when this report is created)',
|
|
|
|
'header' => 'Age',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 10.16 /*mm*/,
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'table' => "DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(students.dateofbirth)), '%Y')+0",
|
|
|
|
'table_sort' => 'students.dateofbirth'),
|
|
|
|
|
2007-12-30 21:45:04 +00:00
|
|
|
'tshirt' => array(
|
|
|
|
'name' => 'Student -- T-Shirt Size',
|
|
|
|
'header' => 'T-Shirt',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 13.97 /*mm*/,
|
2007-12-30 21:45:04 +00:00
|
|
|
'table' => 'students.tshirt',
|
2010-03-31 04:50:55 +00:00
|
|
|
'value_map' => array ('none' => '', 'xsmall' => 'X-Small', 'small' => 'Small', 'medium' => 'Medium',
|
2007-12-30 21:45:04 +00:00
|
|
|
'large' => 'Large', 'xlarge' => 'X-Large')),
|
|
|
|
|
2008-03-20 02:57:18 +00:00
|
|
|
'medicalalert' => array(
|
|
|
|
'name' => 'Student -- Medical Alert Info',
|
|
|
|
'header' => 'medical',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2008-03-20 02:57:18 +00:00
|
|
|
'table' => 'students.medicalalert'),
|
|
|
|
|
|
|
|
'foodreq' => array(
|
|
|
|
'name' => 'Student -- Food Requirements',
|
|
|
|
'header' => 'Food.Req.',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2008-03-20 02:57:18 +00:00
|
|
|
'table' => 'students.foodreq'),
|
|
|
|
|
2009-09-09 00:26:12 +00:00
|
|
|
'registrations_num' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Student Registration Information',
|
2009-09-09 00:26:12 +00:00
|
|
|
'name' => 'Student -- Registration Number',
|
|
|
|
'header' => 'RegNum',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2009-09-09 00:26:12 +00:00
|
|
|
'table' => 'registrations.num' ),
|
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
'paid' => array(
|
|
|
|
'name' => 'Paid',
|
|
|
|
'header' => 'Paid',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 10.1 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => 'registrations.status',
|
|
|
|
'value_map' => array ('complete' => '', 'paymentpending' => 'No')),
|
|
|
|
|
|
|
|
/* Project Information */
|
2007-03-18 07:10:54 +00:00
|
|
|
'title' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Project Information',
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Project -- Title',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Project Title',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 69.85 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'projects.title' ),
|
|
|
|
|
2008-01-23 05:54:03 +00:00
|
|
|
'shorttitle' => array(
|
|
|
|
'name' => 'Project -- Short Title',
|
|
|
|
'header' => 'Short Title',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2008-01-23 05:54:03 +00:00
|
|
|
'table' => 'projects.shorttitle' ),
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'division' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Project -- Division',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Division',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'projectdivisions.division' ),
|
|
|
|
|
2009-09-09 00:26:12 +00:00
|
|
|
'div' => array(
|
|
|
|
'name' => 'Project -- Division Short Form' ,
|
|
|
|
'header' => 'Div',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 10.16 /*mm*/,
|
2009-09-09 00:26:12 +00:00
|
|
|
'table' => 'projectdivisions.division_shortform' ),
|
|
|
|
|
2007-12-25 05:13:42 +00:00
|
|
|
'fr_division' => array(
|
|
|
|
'name' => 'Project -- Division (French)',
|
|
|
|
'header' => i18n('Division', array(), array(), 'fr'),
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2007-12-25 05:13:42 +00:00
|
|
|
'table' => 'projectdivisions.division',
|
|
|
|
'exec_function' => 'report_students_i18n_fr'),
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'category' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Project -- Category',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Category',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table_sort' => 'projectcategories.id',
|
|
|
|
'table' => 'projectcategories.category' ),
|
|
|
|
|
2009-09-09 00:26:12 +00:00
|
|
|
'cat' => array(
|
|
|
|
'name' => 'Project -- Category Short Form' ,
|
|
|
|
'header' => 'cat',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 10.16 /*mm*/,
|
2009-09-09 00:26:12 +00:00
|
|
|
'table' => 'projectcategories.category_shortform' ),
|
|
|
|
|
2007-12-25 05:13:42 +00:00
|
|
|
'fr_category' => array(
|
|
|
|
'name' => 'Project -- Category (French)',
|
|
|
|
'header' => i18n('Category', array(), array(), 'fr'),
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-12-25 05:13:42 +00:00
|
|
|
'table_sort' => 'projectcategories.id',
|
|
|
|
'table' => 'projectcategories.category',
|
|
|
|
'exec_function' => 'report_students_i18n_fr'),
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'categorydivision' => array(
|
2007-03-19 06:51:44 +00:00
|
|
|
'name' => 'Project -- Category and Division',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Category/Division',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 88.9 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table_sort' => 'projectcategories.id',
|
2007-03-19 06:51:44 +00:00
|
|
|
'table' => "CONCAT(projectcategories.category,' - ', projectdivisions.division)"),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2009-09-09 00:26:12 +00:00
|
|
|
'divisioncategory' => array(
|
|
|
|
'name' => 'Project -- Division and Category',
|
|
|
|
'header' => 'Division/Category',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 88.9 /*mm*/,
|
2009-09-09 00:26:12 +00:00
|
|
|
'table_sort' => 'projectdivisions.id',
|
|
|
|
'table' => "CONCAT(projectdivisions.division,' - ',projectcategories.category)"),
|
|
|
|
|
2007-04-05 21:33:39 +00:00
|
|
|
'summary' => array(
|
|
|
|
'name' => 'Project -- Summary',
|
|
|
|
'header' => 'Project Summary',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
2008-11-20 18:20:04 +00:00
|
|
|
'scalable' => true,
|
2007-04-05 21:33:39 +00:00
|
|
|
'table' => 'projects.summary' ),
|
|
|
|
|
|
|
|
'language' => array(
|
|
|
|
'name' => 'Project -- Language',
|
|
|
|
'header' => 'Lang',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-04-05 21:33:39 +00:00
|
|
|
'table' => 'projects.language' ),
|
|
|
|
|
2007-12-22 19:12:43 +00:00
|
|
|
'numstudents' => array(
|
|
|
|
'name' => 'Project -- Number of Students',
|
|
|
|
'header' => 'Stu.',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-12-30 21:05:54 +00:00
|
|
|
'table' => 'students.registrations_id',
|
|
|
|
'exec_function' => 'reports_students_numstudents'),
|
2010-03-29 19:48:12 +00:00
|
|
|
|
|
|
|
'rank' => array(
|
|
|
|
'name' => 'Project -- Rank (left blank for judges to fill out)',
|
|
|
|
'header' => 'Rank',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2010-03-29 19:48:12 +00:00
|
|
|
'table' => '""' ),
|
2007-12-22 19:12:43 +00:00
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
'req_elec' => array(
|
|
|
|
'name' => 'Project -- If the project requires electricity',
|
|
|
|
'header' => 'Elec',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => "projects.req_electricity",
|
|
|
|
'value_map' => array ('no' => '', 'yes' => 'Yes')),
|
|
|
|
|
|
|
|
'req_table' => array(
|
|
|
|
'name' => 'Project -- If the project requires a table',
|
|
|
|
'header' => 'Table',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => "projects.req_table",
|
|
|
|
'value_map' => array ('no' => '', 'yes' => 'Yes')),
|
|
|
|
|
|
|
|
'req_special' => array(
|
|
|
|
'name' => 'Project -- Any special requirements the project has',
|
|
|
|
'header' => 'Special Requirements',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2010-04-12 00:23:21 +00:00
|
|
|
'table' => "projects.req_special"),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2008-01-26 19:14:24 +00:00
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'school' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'School Information',
|
2007-03-18 07:10:54 +00:00
|
|
|
'name' => 'School -- Name',
|
|
|
|
'header' => 'School Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 57.15 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'schools.school' ),
|
|
|
|
|
|
|
|
'schooladdr' => array(
|
|
|
|
'name' => 'School -- Full Address',
|
|
|
|
'header' => 'School Address',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-26 19:14:24 +00:00
|
|
|
'scalable' => true,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => "CONCAT(schools.address, ', ', schools.city, ', ', schools.province_code, ', ', schools.postalcode)" ),
|
|
|
|
|
|
|
|
'teacher' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'name' => 'School -- Teacher Name (as entered by the student)',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Teacher',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'students.teachername' ),
|
|
|
|
|
|
|
|
'teacheremail' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'name' => 'School -- Teacher Email (as entered by the student)',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Teacher Email',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'students.teacheremail' ),
|
|
|
|
|
|
|
|
'school_phone' => array(
|
|
|
|
'name' => 'School -- Phone',
|
|
|
|
'header' => 'School Phone',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'schools.phone' ),
|
|
|
|
|
|
|
|
'school_fax' => array(
|
|
|
|
'name' => 'School -- Fax',
|
|
|
|
'header' => 'School Fax',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => 'schools.fax' ),
|
|
|
|
|
2007-03-20 06:24:18 +00:00
|
|
|
|
|
|
|
'school_address' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'name' => 'School -- Street Address',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'Address',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2007-03-20 06:24:18 +00:00
|
|
|
'table' => 'schools.address'),
|
|
|
|
|
|
|
|
'school_city' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'name' => 'School -- City',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'City',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2007-03-20 06:24:18 +00:00
|
|
|
'table' => 'schools.city' ),
|
|
|
|
|
|
|
|
'school_province' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'name' => 'School -- '.$config['provincestate'],
|
2008-07-16 17:23:53 +00:00
|
|
|
'header' => $config['provincestate'],
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 19.05 /*mm*/,
|
2007-03-20 06:24:18 +00:00
|
|
|
'table' => 'schools.province_code' ),
|
|
|
|
|
|
|
|
'school_city_prov' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'name' => 'School -- City, '.$config['provincestate'].' (for mailing)',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'City',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2007-03-20 06:24:18 +00:00
|
|
|
'table' => "CONCAT(schools.city, ', ', schools.province_code)" ),
|
|
|
|
|
|
|
|
'school_postal' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'name' => 'School -- '.$config['postalzip'],
|
2008-07-16 17:23:53 +00:00
|
|
|
'header' => $config['postalzip'],
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 19.05 /*mm*/,
|
2007-03-20 06:24:18 +00:00
|
|
|
'table' => 'schools.postalcode' ),
|
|
|
|
|
2010-04-12 00:07:33 +00:00
|
|
|
'school_principal' => array(
|
|
|
|
'name' => 'School -- Principal',
|
|
|
|
'header' => 'Principal',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 31.75 /*mm*/,
|
2010-04-12 00:07:33 +00:00
|
|
|
'table' => 'schools.principal_uid',
|
|
|
|
'exec_function' => 'reports_students_school_principal'),
|
|
|
|
|
2007-03-26 01:54:18 +00:00
|
|
|
'school_board' => array(
|
|
|
|
'name' => 'School -- Board ID',
|
|
|
|
'header' => 'Board',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 19.05 /*mm*/,
|
2007-03-26 01:54:18 +00:00
|
|
|
'table' => 'schools.board' ),
|
2007-03-20 06:24:18 +00:00
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'awards' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Awards assigned to student (warning: duplicates student entries for multiple awards won!)',
|
|
|
|
'name' => 'Award -- Type + Name',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'table' => "CONCAT(IF(award_types.type='Other','Special',award_types.type),' ', award_awards.name)",
|
2007-04-10 15:53:48 +00:00
|
|
|
'table_sort' => 'award_awards.name',
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'components' => array('awards')),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2007-04-10 15:53:48 +00:00
|
|
|
'award_name' => array(
|
|
|
|
'name' => 'Award -- Name',
|
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
2007-04-10 15:53:48 +00:00
|
|
|
'table' => 'award_awards.name',
|
|
|
|
'components' => array('awards')),
|
2007-12-25 05:13:42 +00:00
|
|
|
|
|
|
|
'award_excludefromac' => array(
|
|
|
|
'name' => 'Award -- Exclude from Award Ceremony (Yes/No)',
|
|
|
|
'header' => 'Exclude',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-12-25 05:13:42 +00:00
|
|
|
'table' => "award_awards.excludefromac",
|
|
|
|
'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
|
|
|
|
|
2007-03-28 22:32:57 +00:00
|
|
|
'order' => array(
|
|
|
|
'name' => 'Award -- Order',
|
|
|
|
'header' => 'Award Order',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-03-28 22:32:57 +00:00
|
|
|
'table' => 'award_awards.order',
|
|
|
|
'table_sort' => 'award_awards.order',
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
2007-04-10 15:53:48 +00:00
|
|
|
'award_type' => array(
|
|
|
|
'name' => 'Award -- Type (Divisional, Special, etc.)',
|
|
|
|
'header' => 'Award Type',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-04-10 15:53:48 +00:00
|
|
|
'table' => 'award_types.type',
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
2007-04-05 21:33:39 +00:00
|
|
|
'sponsor' => array(
|
|
|
|
'name' => 'Award -- Sponsor DB ID',
|
|
|
|
'header' => 'Award Sponsor',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2010-03-26 17:41:44 +00:00
|
|
|
'table' => 'award_awards.sponsors_id',
|
|
|
|
'table_sort' => 'award_awards.sponsors_id',
|
2007-04-05 21:33:39 +00:00
|
|
|
'components' => array('awards')),
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
'pn_awards' => array(
|
2007-12-22 19:12:43 +00:00
|
|
|
'name' => 'Award -- Project Num + Award Name (will be unique for each award)',
|
2007-03-18 07:10:54 +00:00
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
2007-03-18 07:10:54 +00:00
|
|
|
'table' => "CONCAT(projects.projectnumber,' ', award_awards.name)",
|
2007-03-26 01:54:18 +00:00
|
|
|
'table_sort' => 'award_awards.order',
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'components' => array('awards')),
|
2007-03-26 01:54:18 +00:00
|
|
|
|
2007-04-10 15:53:48 +00:00
|
|
|
'award_prize_name' => array(
|
|
|
|
'name' => 'Award -- Prize Name',
|
|
|
|
'header' => 'Prize Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2007-04-10 15:53:48 +00:00
|
|
|
'table' => 'award_prizes.prize',
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
2007-12-22 19:12:43 +00:00
|
|
|
'award_prize_cash' => array(
|
|
|
|
'name' => 'Award -- Prize Cash Amount',
|
|
|
|
'header' => 'Cash',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-12-22 19:12:43 +00:00
|
|
|
'table' => 'award_prizes.cash',
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
|
|
|
'award_prize_scholarship' => array(
|
|
|
|
'name' => 'Award -- Prize Scholarship Amount',
|
|
|
|
'header' => 'Scholarship',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 19.05 /*mm*/,
|
2007-12-22 19:12:43 +00:00
|
|
|
'table' => 'award_prizes.scholarship',
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
|
|
|
'award_prize_value' => array(
|
|
|
|
'name' => 'Award -- Prize Value Amount',
|
|
|
|
'header' => 'Value',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-12-22 19:12:43 +00:00
|
|
|
'table' => 'award_prizes.value',
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
2007-04-10 15:53:48 +00:00
|
|
|
'award_prize_fullname' => array(
|
|
|
|
'name' => 'Award -- Prize Name, Category, Division',
|
|
|
|
'header' => 'Prize Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
2007-04-10 15:53:48 +00:00
|
|
|
'table' => "CONCAT(award_prizes.prize,' in ',projectcategories.category,' ', projectdivisions.division)",
|
2007-11-18 23:50:23 +00:00
|
|
|
'table_sort' => 'award_prizes.order',
|
2007-04-10 15:53:48 +00:00
|
|
|
'components' => array('awards')),
|
|
|
|
|
2008-03-12 01:18:29 +00:00
|
|
|
'award_prize_trophy_any' => array(
|
|
|
|
'name' => 'Award -- Trophy (\'Yes\' if the award has a trophy)',
|
|
|
|
'header' => 'Trophy',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2008-03-12 01:18:29 +00:00
|
|
|
'table' => "IF ( award_prizes.trophystudentkeeper=1
|
|
|
|
OR award_prizes.trophystudentreturn=1
|
|
|
|
OR award_prizes.trophyschoolkeeper=1
|
|
|
|
OR award_prizes.trophyschoolreturn=1, 'Yes', 'No')",
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
2009-09-09 00:26:12 +00:00
|
|
|
'award_prize_trophy_return' => array(
|
|
|
|
'name' => 'Award -- Annual Trophy (\'Yes\' if the award has a school or student trophy that isn\'t a keeper)',
|
|
|
|
'header' => 'Trophy',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2009-09-09 00:26:12 +00:00
|
|
|
'table' => "IF ( award_prizes.trophystudentreturn=1
|
|
|
|
OR award_prizes.trophyschoolreturn=1, 'Yes', 'No')",
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
|
|
|
'award_prize_trophy_return_student' => array(
|
|
|
|
'name' => 'Award -- Annual Student Trophy (\'Yes\' if the award has astudent trophy that isn\'t a keeper)',
|
|
|
|
'header' => 'Ind.',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2009-09-09 00:26:12 +00:00
|
|
|
'table' => "IF ( award_prizes.trophystudentreturn=1, 'Yes', 'No')",
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
|
|
|
'award_prize_trophy_return_school' => array(
|
|
|
|
'name' => 'Award -- Annual School Trophy (\'Yes\' if the award has a school trophy that isn\'t a keeper)',
|
|
|
|
'header' => 'Sch.',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2009-09-09 00:26:12 +00:00
|
|
|
'table' => "IF ( award_prizes.trophyschoolreturn=1, 'Yes', 'No')",
|
|
|
|
'components' => array('awards')),
|
|
|
|
|
2007-03-26 01:54:18 +00:00
|
|
|
'nom_awards' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Nominated Awards (warning: duplicates student for multiple awards!)',
|
|
|
|
'name' => 'Award Nominations -- Award Name',
|
2007-03-26 01:54:18 +00:00
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'table' => "CONCAT(award_types.type,' -- ',award_awards.name)",
|
|
|
|
'table_sort' => 'award_awards.name',
|
|
|
|
'components' => array('awards_nominations')),
|
2007-03-26 01:54:18 +00:00
|
|
|
|
|
|
|
'nom_pn_awards' => array(
|
|
|
|
'name' => 'Award Nominations -- Project Num + Award Name(will be unique)',
|
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
2007-03-26 01:54:18 +00:00
|
|
|
'table' => "CONCAT(projects.projectnumber,' ', award_awards.name)",
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'table_sort' => 'award_awards.name',
|
|
|
|
'components' => array('awards_nominations')),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2008-01-23 18:32:31 +00:00
|
|
|
'nom_awards_name_1' => array(
|
|
|
|
'name' => 'Award Nominations -- Self-Nominated Special Award 1',
|
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-23 18:32:31 +00:00
|
|
|
'table' => 'projects.id',
|
|
|
|
'table_sort' => 'projects.id',
|
|
|
|
'exec_function' => 'reports_students_award_selfnom_1'),
|
|
|
|
|
|
|
|
'nom_awards_name_2' => array(
|
|
|
|
'name' => 'Award Nominations -- Self-Nominated Special Award 2',
|
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-23 18:32:31 +00:00
|
|
|
'table' => 'projects.id',
|
|
|
|
'table_sort' => 'projects.id',
|
|
|
|
'exec_function' => 'reports_students_award_selfnom_2'),
|
|
|
|
|
|
|
|
'nom_awards_name_3' => array(
|
|
|
|
'name' => 'Award Nominations -- Self-Nominated Special Award 3',
|
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-23 18:32:31 +00:00
|
|
|
'table' => 'projects.id',
|
|
|
|
'table_sort' => 'projects.id',
|
|
|
|
'exec_function' => 'reports_students_award_selfnom_3'),
|
|
|
|
|
|
|
|
'nom_awards_name_4' => array(
|
|
|
|
'name' => 'Award Nominations -- Self-Nominated Special Award 4',
|
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-23 18:32:31 +00:00
|
|
|
'table' => 'projects.id',
|
|
|
|
'table_sort' => 'projects.id',
|
|
|
|
'exec_function' => 'reports_students_award_selfnom_4'),
|
|
|
|
|
|
|
|
'nom_awards_name_5' => array(
|
|
|
|
'name' => 'Award Nominations -- Self-Nominated Special Award 5',
|
|
|
|
'header' => 'Award Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-23 18:32:31 +00:00
|
|
|
'table' => 'projects.id',
|
|
|
|
'table_sort' => 'projects.id',
|
|
|
|
'exec_function' => 'reports_students_award_selfnom_5'),
|
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
/* Emergency Contact Info */
|
2007-03-18 07:10:54 +00:00
|
|
|
'emerg_name' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Emergency Contact Information',
|
2007-03-18 07:10:54 +00:00
|
|
|
'name' => 'Emergency Contact -- Name',
|
2007-12-30 22:32:58 +00:00
|
|
|
'header' => 'Contact Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2007-03-26 01:54:18 +00:00
|
|
|
'table' => "CONCAT(emergencycontact.firstname, ' ', emergencycontact.lastname)",
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'components' => array('emergencycontacts')),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
|
|
|
'emerg_relation' => array(
|
|
|
|
'name' => 'Emergency Contact -- Relationship',
|
2007-12-30 22:32:58 +00:00
|
|
|
'header' => 'Relation',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-03-26 01:54:18 +00:00
|
|
|
'table' => "emergencycontact.relation",
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'components' => array('emergencycontacts')),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
|
|
|
'emerg_phone' => array(
|
|
|
|
'name' => 'Emergency Contact -- Phone',
|
2007-12-30 22:32:58 +00:00
|
|
|
'header' => 'Emrg.Phone',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2007-03-26 01:54:18 +00:00
|
|
|
'table' => "CONCAT(emergencycontact.phone1, ' ', emergencycontact.phone2, ' ', emergencycontact.phone3, ' ', emergencycontact.phone4)",
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
'components' => array('emergencycontacts')),
|
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
/* Tour Information */
|
2007-04-10 15:53:48 +00:00
|
|
|
'tour_assign_name' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Tour Information',
|
2007-04-10 15:53:48 +00:00
|
|
|
'name' => 'Tours -- Assigned Tour Name',
|
|
|
|
'header' => 'Tour',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
2007-04-10 15:53:48 +00:00
|
|
|
'table' => "tours.name",
|
|
|
|
'components' => array('tours')),
|
2007-12-20 01:05:04 +00:00
|
|
|
|
|
|
|
'tour_assign_num' => array(
|
|
|
|
'name' => 'Tours -- Assigned Tour Number',
|
|
|
|
'header' => 'Tour',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-12-20 01:05:04 +00:00
|
|
|
'table' => "tours.num",
|
|
|
|
'components' => array('tours')),
|
|
|
|
|
|
|
|
'tour_assign_numname' => array(
|
|
|
|
'name' => 'Tours -- Assigned Tour Number and Name',
|
|
|
|
'header' => 'Tour',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 101.6 /*mm*/,
|
2007-12-20 01:05:04 +00:00
|
|
|
'table' => "CONCAT(tours.num,': ', tours.name)",
|
2008-01-30 07:56:47 +00:00
|
|
|
'table_sort' => 'tours.num',
|
2007-12-20 01:05:04 +00:00
|
|
|
'components' => array('tours')),
|
2008-01-26 19:46:16 +00:00
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
/* Mentor Information */
|
2008-01-26 19:46:16 +00:00
|
|
|
'mentor_name_proj' => array(
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Mentor Information',
|
2008-01-26 19:46:16 +00:00
|
|
|
'name' => 'Mentor -- Project and Name (Distinct for each Project+Mentor pair)',
|
|
|
|
'header' => 'Mentor Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 44.45 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => "CONCAT('projects.projectnumber', ' - ', mentors.firstname, ', ', mentors.lastname)",
|
|
|
|
'table_sort'=> 'mentors.lastname',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_last_name' => array(
|
|
|
|
'name' => 'Mentor -- Last Name',
|
|
|
|
'header' => 'Last Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'table' => 'mentors.lastname',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_first_name' => array(
|
|
|
|
'name' => 'Mentor -- First Name',
|
|
|
|
'header' => 'First Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'table' => 'mentors.firstname',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_name' => array(
|
|
|
|
'name' => 'Mentor -- Full Name (last, first)',
|
|
|
|
'header' => 'Mentor Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 44.45 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => "CONCAT(mentors.lastname, ', ', mentors.firstname)",
|
|
|
|
'table_sort'=> 'mentors.lastname',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_namefl' => array(
|
|
|
|
'name' => 'Mentor -- Full Name (first last)',
|
|
|
|
'header' => 'Mentor Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 44.45 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => "CONCAT(mentors.firstname, ' ', mentors.lastname)",
|
|
|
|
'table_sort'=> 'mentors.lastname',
|
|
|
|
'components' => array('mentors')),
|
2007-04-10 15:53:48 +00:00
|
|
|
|
2008-01-26 19:46:16 +00:00
|
|
|
'mentor_email' => array(
|
|
|
|
'name' => 'Mentor -- Email',
|
|
|
|
'header' => 'Mentor Email',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 50.8 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => 'mentors.email',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_phone' => array(
|
|
|
|
'name' => 'Mentor -- Phone',
|
|
|
|
'header' => 'Mentor Phone',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'table' => 'mentors.phone',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_organization' => array(
|
|
|
|
'name' => 'Mentor -- Organization',
|
|
|
|
'header' => 'Mentor Org.',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => 'mentors.organization',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_position' => array(
|
|
|
|
'name' => 'Mentor -- Position',
|
|
|
|
'header' => 'Position',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 25.4 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => 'mentors.position',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
|
|
|
'mentor_description' => array(
|
|
|
|
'name' => 'Mentor -- Description of Help',
|
|
|
|
'header' => 'Description of Help',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2008-01-26 19:46:16 +00:00
|
|
|
'scalable' => true,
|
|
|
|
'table' => 'mentors.description',
|
|
|
|
'components' => array('mentors')),
|
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
/* Fair Information */
|
2010-04-05 19:19:53 +00:00
|
|
|
'feeder_fair_name' => array (
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Fair Information',
|
2010-04-05 19:19:53 +00:00
|
|
|
'name' => 'Feeder Fair -- Name',
|
|
|
|
'header' => 'Fair Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 38.1 /*mm*/,
|
2010-04-05 19:19:53 +00:00
|
|
|
'table' => 'fairs.name',
|
|
|
|
'components' => array('fairs')),
|
|
|
|
|
|
|
|
'feeder_fair_abbrv' => array (
|
|
|
|
'name' => 'Feeder Fair -- Abbreviation',
|
|
|
|
'header' => 'Fair',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 19.05 /*mm*/,
|
2010-04-05 19:19:53 +00:00
|
|
|
'table' => 'fairs.abbrv',
|
|
|
|
'components' => array('fairs')),
|
|
|
|
|
2010-11-02 20:35:47 +00:00
|
|
|
'conference_name' => array (
|
|
|
|
'name' => 'Conference -- Name',
|
|
|
|
'header' => 'Conference Name',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2010-11-02 20:35:47 +00:00
|
|
|
'table' => "'".mysql_real_escape_string($conference['name'])."'"),
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2010-11-02 20:35:47 +00:00
|
|
|
'conference_logo' => array(
|
|
|
|
'name' => 'Conference -- Logo (for Labels only)',
|
2010-06-09 07:43:59 +00:00
|
|
|
'header' => '',
|
|
|
|
'width' => 1 /*mm*/,
|
|
|
|
'table' => "CONCAT(' ')"),
|
|
|
|
|
2010-04-12 00:23:21 +00:00
|
|
|
/* Special/Misc/Other */
|
2007-03-20 06:24:18 +00:00
|
|
|
'static_text' => array (
|
2010-04-12 00:23:21 +00:00
|
|
|
'start_option_group' => 'Special Fields',
|
2008-01-23 18:32:31 +00:00
|
|
|
'name' => 'Label -- Static Text',
|
|
|
|
'header' => '',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 2.54 /*mm*/,
|
2008-01-23 18:32:31 +00:00
|
|
|
'table' => "CONCAT(' ')"),
|
|
|
|
|
|
|
|
'static_box' => array (
|
|
|
|
'name' => 'Label -- Static Box',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => '',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 2.54 /*mm*/,
|
2007-03-20 06:24:18 +00:00
|
|
|
'table' => "CONCAT(' ')"),
|
2007-12-29 09:04:48 +00:00
|
|
|
|
2007-12-20 09:51:08 +00:00
|
|
|
'easyparse_allnames' => array(
|
|
|
|
'name' => "Easy Parse -- All Student Names (REQUIRES MYSQL 5.0) ",
|
|
|
|
'header' => 'Student(s)',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 76.2 /*mm*/,
|
2007-12-20 09:51:08 +00:00
|
|
|
'table' => "GROUP_CONCAT(students.lastname, ',', students.firstname ORDER BY students.lastname SEPARATOR ':')",
|
|
|
|
'group_by' => array('students.registrations_id')),
|
|
|
|
|
2007-12-30 21:45:04 +00:00
|
|
|
'special_tshirt_count' => array(
|
|
|
|
'name' => 'Special -- T-Shirt Size Count',
|
|
|
|
'header' => 'Count',
|
2010-06-08 18:49:14 +00:00
|
|
|
'width' => 12.7 /*mm*/,
|
2007-12-30 21:45:04 +00:00
|
|
|
'table' => 'COUNT(*)',
|
2007-12-30 22:16:34 +00:00
|
|
|
'total' => true,
|
2007-12-30 21:45:04 +00:00
|
|
|
'group_by' => array('students.tshirt')),
|
|
|
|
|
2007-03-18 07:10:54 +00:00
|
|
|
|
|
|
|
);
|
|
|
|
|
2007-03-26 01:54:18 +00:00
|
|
|
function report_students_fromwhere($report, $components)
|
2007-03-18 07:10:54 +00:00
|
|
|
{
|
|
|
|
global $config, $report_students_fields;
|
|
|
|
|
|
|
|
$fields = $report_students_fields;
|
2010-11-02 20:35:47 +00:00
|
|
|
$conferences_id = $report['conferences_id'];
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2007-03-18 19:59:02 +00:00
|
|
|
$awards_join = '';
|
|
|
|
$awards_where = '';
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2007-03-26 01:54:18 +00:00
|
|
|
if(in_array('awards', $components)) {
|
2007-12-22 19:12:43 +00:00
|
|
|
/* This requires some extra gymnastics and will duplicate
|
|
|
|
* students/projects if they have won multiple awards */
|
|
|
|
$awards_join = "LEFT JOIN winners ON winners.projects_id = projects.id
|
|
|
|
LEFT JOIN award_prizes ON award_prizes.id = winners.awards_prizes_id
|
|
|
|
LEFT JOIN award_awards ON award_awards.id = award_prizes.award_awards_id
|
|
|
|
LEFT JOIN award_types ON award_types.id=award_awards.award_types_id";
|
2010-11-02 20:35:47 +00:00
|
|
|
$awards_where = " AND winners.conferences_id='$conferences_id'
|
|
|
|
AND award_awards.conferences_id='$conferences_id'
|
|
|
|
AND award_prizes.conferences_id='$conferences_id'
|
|
|
|
AND award_types.conferences_id='$conferences_id' ";
|
2007-12-22 19:12:43 +00:00
|
|
|
}
|
|
|
|
|
2007-03-26 01:54:18 +00:00
|
|
|
if(in_array('awards_nominations', $components)) {
|
|
|
|
$awards_join = "LEFT JOIN project_specialawards_link
|
|
|
|
ON(projects.id=project_specialawards_link.projects_id),
|
|
|
|
award_awards,award_types";
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
$awards_where = " AND project_specialawards_link.award_awards_id=award_awards.id
|
2007-03-26 01:54:18 +00:00
|
|
|
AND award_types.id=award_awards.award_types_id
|
2010-11-02 20:35:47 +00:00
|
|
|
AND award_awards.conferences_id='$conferences_id'
|
|
|
|
AND award_types.conferences_id='$conferences_id' ";
|
2007-03-26 01:54:18 +00:00
|
|
|
}
|
|
|
|
|
2007-03-18 19:59:02 +00:00
|
|
|
$partner_join = '';
|
- BAM!
- Overhauled the report generator.. It's more versatile now
- Added 'filter' option to the generator, so you can filter any column by (=,
<=, >=, <, >, IS, IS NOT, LIKE, NOT LIKE). It doesn't support AND or OR
combinations, but that should cover what we need for now. Example: We can
filter "Award Name" LIKE "%Gold%" to generate a report of just the Gold medal
projects.
- Wipe out the report database, and create it again from scratch.
update.48.sql contains an example of how to add additional reports to the
system without knowing the report_ids, because after regions start adding
their own reports, we won't be able to just wipe out the whole report system
to add one.
- We handle more reports now, specifically nametags and table labels, so remove
those files, and update the reports.php file to link the old links to the new
report generator (so people don't get too confused in this transition).
- Beginnings of moving the report generator to proper LEFT JOIN style
constructs instead of just one big massive EQUALS JOIN.
2007-03-26 06:15:41 +00:00
|
|
|
if(in_array('partner', $components)) {
|
2007-03-18 07:10:54 +00:00
|
|
|
$partner_join = "LEFT JOIN students AS students2
|
|
|
|
ON(students2.registrations_id=students.registrations_id
|
|
|
|
AND students2.id != students.id)";
|
2007-03-18 19:59:02 +00:00
|
|
|
}
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2007-04-10 15:53:48 +00:00
|
|
|
$tour_join = '';
|
|
|
|
$tour_where = '';
|
|
|
|
if(in_array('tours', $components)) {
|
|
|
|
$tour_join = "LEFT JOIN tours_choice ON (students.id=tours_choice.students_id AND tours_choice.rank=0), tours";
|
2010-11-02 20:35:47 +00:00
|
|
|
$tour_where = "AND tours.conferences_id='$conferences_id'
|
2007-04-10 15:53:48 +00:00
|
|
|
AND tours.id=tours_choice.tour_id";
|
|
|
|
}
|
|
|
|
|
2007-03-26 01:54:18 +00:00
|
|
|
$emergencycontact_join = '';
|
|
|
|
if(in_array('emergencycontacts', $components)) {
|
|
|
|
/* No need to put the year in here, students.id is unique across years */
|
2007-12-20 01:09:16 +00:00
|
|
|
$emergencycontact_join = "LEFT JOIN emergencycontact ON
|
|
|
|
emergencycontact.students_id=students.id ";
|
2007-03-26 01:54:18 +00:00
|
|
|
}
|
|
|
|
|
2008-01-26 19:46:16 +00:00
|
|
|
$mentor_join = '';
|
|
|
|
$mentor_where = '';
|
|
|
|
if(in_array('mentors', $components)) {
|
|
|
|
$mentor_join = "LEFT JOIN mentors ON
|
|
|
|
mentors.registrations_id=students.registrations_id";
|
2010-11-02 20:35:47 +00:00
|
|
|
$mentor_where = "AND mentors.conferences_id='$conferences_id'";
|
2008-01-26 19:46:16 +00:00
|
|
|
}
|
|
|
|
|
2010-04-05 19:19:53 +00:00
|
|
|
$fairs_join = '';
|
|
|
|
if(in_array('fairs', $components)) {
|
|
|
|
$fairs_join = "LEFT JOIN fairs ON fairs.id=projects.fairs_id";
|
|
|
|
}
|
|
|
|
|
2009-11-06 08:57:13 +00:00
|
|
|
if($report['option']['include_incomplete_registrations'] == 'yes')
|
|
|
|
$reg_where = '';
|
|
|
|
else
|
|
|
|
$reg_where = "AND (registrations.status='complete' OR registrations.status='paymentpending')";
|
|
|
|
|
2008-01-26 19:46:16 +00:00
|
|
|
|
2007-12-20 01:05:04 +00:00
|
|
|
$q = " FROM students
|
|
|
|
LEFT JOIN registrations ON registrations.id=students.registrations_id
|
|
|
|
LEFT JOIN schools ON schools.id=students.schools_id
|
|
|
|
LEFT JOIN projects ON projects.registrations_id=students.registrations_id
|
|
|
|
LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id
|
|
|
|
LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id
|
2007-12-20 01:09:16 +00:00
|
|
|
$emergencycontact_join
|
2007-12-20 01:05:04 +00:00
|
|
|
$partner_join
|
2008-01-26 19:46:16 +00:00
|
|
|
$mentor_join
|
2008-03-12 01:18:29 +00:00
|
|
|
$tour_join
|
|
|
|
$awards_join
|
2010-04-05 19:19:53 +00:00
|
|
|
$fairs_join
|
2007-03-18 07:10:54 +00:00
|
|
|
WHERE
|
2010-11-02 20:35:47 +00:00
|
|
|
students.conferences_id='$conferences_id'
|
|
|
|
AND projects.conferences_id='$conferences_id'
|
|
|
|
AND registrations.conferences_id='$conferences_id'
|
|
|
|
AND projectcategories.conferences_id='$conferences_id'
|
|
|
|
AND projectdivisions.conferences_id='$conferences_id'
|
2009-11-06 08:57:13 +00:00
|
|
|
$reg_where
|
2008-03-12 01:18:29 +00:00
|
|
|
$mentor_where
|
2007-03-18 07:10:54 +00:00
|
|
|
$awards_where
|
2007-04-10 15:53:48 +00:00
|
|
|
$tour_where
|
2007-03-18 19:59:02 +00:00
|
|
|
";
|
2007-03-18 07:10:54 +00:00
|
|
|
|
2007-03-18 19:59:02 +00:00
|
|
|
return $q;
|
2007-03-18 07:10:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|