forked from science-ation/science-ation
Update more communication emails (teachers, principals)
Tweak award eligibility display Add "Account" info to student reports (email, username, pendingemail) Move some project identification stuff around and fix the groupings
This commit is contained in:
parent
3af6933f73
commit
98f6a9f76d
@ -750,7 +750,7 @@ $(document).ready(function() {
|
||||
$cq=mysql_query("SELECT * FROM projectcategories WHERE conferences_id='{$conference['id']}' ORDER BY mingrade");
|
||||
echo mysql_error();
|
||||
while($cr=mysql_fetch_object($cq)) {
|
||||
echo "<input type=\"checkbox\" id=\"eligibility_categories_{$cr->id}\" name=\"categories[]\" value=\"$cr->id\" />".i18n($cr->category)."<br />";
|
||||
echo "<input type=\"checkbox\" id=\"eligibility_categories_{$cr->id}\" name=\"categories[]\" value=\"$cr->id\" /> ".i18n($cr->category)."<br />";
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
@ -760,7 +760,7 @@ $(document).ready(function() {
|
||||
$dq=mysql_query("SELECT * FROM projectdivisions WHERE conferences_id='{$conference['id']}' ORDER BY division");
|
||||
echo mysql_error();
|
||||
while($dr=mysql_fetch_object($dq)) {
|
||||
echo "<input type=\"checkbox\" id=\"eligibility_divisions_{$dr->id}\" name=\"divisions[]\" value=\"$dr->id\" />".i18n($dr->division)."<br />";
|
||||
echo "<input type=\"checkbox\" id=\"eligibility_divisions_{$dr->id}\" name=\"divisions[]\" value=\"$dr->id\" /> ".i18n($dr->division)."<br />";
|
||||
}
|
||||
// if(count($currentcategories)==0 || count($currentdivisions)==0)
|
||||
// echo "<tr><td colspan=\"2\" class=\"error\">".i18n("At least one age category and one division must be selected")."</td></tr>";
|
||||
|
@ -159,42 +159,35 @@
|
||||
|
||||
*/
|
||||
"school_principals"=>array("name"=>"School principals this conference","query"=>
|
||||
"SELECT school, accounts.email, users.firstname, users.lastname FROM schools
|
||||
JOIN users ON users.id=schools.principal_uid
|
||||
JOIN accounts ON users.accounts_id=accounts.id
|
||||
"SELECT principal_uid AS id FROM schools
|
||||
WHERE schools.conferences_id='".$conference['id']."'
|
||||
AND accounts.email!=''
|
||||
AND principal_uid>0
|
||||
"),
|
||||
|
||||
"school_scienceheads"=>array("name"=>"School science heads this conference","query"=>
|
||||
"SELECT school, accounts.email, users.firstname, users.lastname FROM schools
|
||||
JOIN users ON users.id=schools.sciencehead_uid
|
||||
JOIN accounts ON users.accounts_id=accounts.id
|
||||
"SELECT sciencehead_uid AS id FROM schools
|
||||
WHERE schools.conferences_id='".$conference['id']."'
|
||||
AND accounts.email!=''
|
||||
AND sciencehead_uid>0
|
||||
"),
|
||||
|
||||
"teachers_with_school"=>array("name"=>"Teachers with a confirmed school this conference","query"=>
|
||||
"SELECT schools.school, accounts.email, users.firstname, users.lastname
|
||||
"teachers_with_school"=>array("name"=>"Teachers with a school in this conference","query"=>
|
||||
"SELECT users.id
|
||||
FROM users
|
||||
JOIN schools ON users.schools_id=schools.id
|
||||
JOIN accounts ON users.accounts_id=accounts.id
|
||||
JOIN user_roles ON users.id=user_roles.users_id
|
||||
JOIN roles ON user_roles.roles_id=roles.id
|
||||
WHERE schools.conferences_id='".$conference['id']."'
|
||||
AND roles.type='teacher'
|
||||
AND accounts.email!=''
|
||||
"),
|
||||
|
||||
"teachers_without_school"=>array("name"=>"Teachers without a confirmed school this conference","query"=>
|
||||
"SELECT accounts.email, users.firstname, users.lastname
|
||||
"teachers_without_school"=>array("name"=>"Teachers without a school in this conference","query"=>
|
||||
"SELECT users.id
|
||||
FROM users
|
||||
JOIN accounts ON users.accounts_id=accounts.id
|
||||
JOIN user_roles ON users.id=user_roles.users_id
|
||||
JOIN roles ON user_roles.roles_id=roles.id
|
||||
WHERE roles.type='teacher'
|
||||
AND users.conferences_id='".$conference['id']."'
|
||||
AND (users.schools_id='' OR users.schools_id=0)
|
||||
AND accounts.email!=''
|
||||
"),
|
||||
|
||||
/*
|
||||
|
@ -106,9 +106,10 @@ function reports_students_school_principal(&$report, $field, $text)
|
||||
|
||||
$report_students_fields = array(
|
||||
'pn' => array(
|
||||
'start_option_group' => 'Project Identification',
|
||||
'name' => 'Project Number',
|
||||
'header' => '#',
|
||||
'width' => 15.24 /*mm*/,
|
||||
'width' => 18 /*mm*/,
|
||||
'table' => 'projects.projectnumber',
|
||||
'table_sort' => 'projects.projectsort, projects.projectnumber'),
|
||||
|
||||
@ -120,6 +121,41 @@ $report_students_fields = array(
|
||||
'table_sort' => 'projects.projectsort, projects.projectnumber',
|
||||
),
|
||||
|
||||
'registrations_num' => array(
|
||||
'name' => 'Registration Number',
|
||||
'header' => 'RegNum',
|
||||
'width' => 16 /*mm*/,
|
||||
'table' => 'registrations.num' ),
|
||||
|
||||
'paid' => array(
|
||||
'name' => 'Paid',
|
||||
'header' => 'Paid',
|
||||
'width' => 10 /*mm*/,
|
||||
'table' => 'registrations.status',
|
||||
'value_map' => array ('complete' => '', 'paymentpending' => 'No')),
|
||||
|
||||
'email' => array(
|
||||
'start_option_group' => 'Account Information',
|
||||
'name' => 'Account -- Email',
|
||||
'header' => 'Email',
|
||||
'width' => 60 /*mm*/,
|
||||
'scalable' => true,
|
||||
'table' => 'accounts.email'),
|
||||
|
||||
'pendingemail' => array(
|
||||
'name' => 'Account -- Pending Email',
|
||||
'header' => 'Email',
|
||||
'width' => 60 /*mm*/,
|
||||
'scalable' => true,
|
||||
'table' => 'accounts.pendingemail'),
|
||||
|
||||
'username' => array(
|
||||
'name' => 'Account -- Username',
|
||||
'header' => 'Username',
|
||||
'width' => 60 /*mm*/,
|
||||
'scalable' => true,
|
||||
'table' => 'accounts.username'),
|
||||
|
||||
'last_name' => array(
|
||||
'start_option_group' => 'Student Name Information',
|
||||
'name' => 'Student -- Last Name',
|
||||
@ -188,14 +224,6 @@ $report_students_fields = array(
|
||||
'width' => 50.8 /*mm*/,
|
||||
'table' => 'users.pronunciation'),
|
||||
|
||||
'email' => array(
|
||||
'start_option_group' => 'Student Contact Information',
|
||||
'name' => 'Student -- Email',
|
||||
'header' => 'Email',
|
||||
'width' => 57.15 /*mm*/,
|
||||
'scalable' => true,
|
||||
'table' => 'accounts.email'),
|
||||
|
||||
'phone' => array(
|
||||
'name' => 'Student -- Phone',
|
||||
'header' => 'Phone',
|
||||
@ -289,20 +317,6 @@ $report_students_fields = array(
|
||||
'width' => 50.8 /*mm*/,
|
||||
'table' => 'users.foodreq'),
|
||||
|
||||
'registrations_num' => array(
|
||||
'start_option_group' => 'Student Registration Information',
|
||||
'name' => 'Student -- Registration Number',
|
||||
'header' => 'RegNum',
|
||||
'width' => 16 /*mm*/,
|
||||
'table' => 'registrations.num' ),
|
||||
|
||||
'paid' => array(
|
||||
'name' => 'Paid',
|
||||
'header' => 'Paid',
|
||||
'width' => 10.1 /*mm*/,
|
||||
'table' => 'registrations.status',
|
||||
'value_map' => array ('complete' => '', 'paymentpending' => 'No')),
|
||||
|
||||
/* Project Information */
|
||||
'title' => array(
|
||||
'start_option_group' => 'Project Information',
|
||||
@ -1019,6 +1033,7 @@ $report_students_fields = array(
|
||||
$q = " FROM users
|
||||
JOIN user_roles ON users.id=user_roles.users_id
|
||||
JOIN roles ON user_roles.roles_id=roles.id
|
||||
JOIN accounts ON users.accounts_id=accounts.id
|
||||
LEFT JOIN registrations ON registrations.id=users.registrations_id
|
||||
LEFT JOIN schools ON schools.id=users.schools_id
|
||||
LEFT JOIN projects ON projects.registrations_id=users.registrations_id
|
||||
@ -1032,10 +1047,10 @@ $report_students_fields = array(
|
||||
$fairs_join
|
||||
WHERE
|
||||
users.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'
|
||||
AND (projects.conferences_id='$conferences_id' OR projects.conferences_id IS NULL)
|
||||
AND (registrations.conferences_id='$conferences_id' OR registrations.conferences_id IS NULL)
|
||||
AND (projectcategories.conferences_id='$conferences_id' OR projectcategories.conferences_id IS NULL)
|
||||
AND (projectdivisions.conferences_id='$conferences_id' OR projectdivisions.conferences_id IS NULL)
|
||||
AND roles.type='participant'
|
||||
$reg_where
|
||||
$mentor_where
|
||||
|
Loading…
Reference in New Issue
Block a user