These changes were done by Richard Sin

Increase the number of sorting and grouping fiels in the Reports Editor
Fix display list when emailing schools
Add "Judge -- Other Expertise" to Reports Editor
Add "Award -- Script Order" to allow student reports to be sorted the same way they appear on the "Award Ceremony Script"
This commit is contained in:
idziak 2015-03-20 19:24:37 +00:00
parent b095c5d5db
commit 9ec497df9f
5 changed files with 24 additions and 5 deletions

View File

@ -183,8 +183,12 @@
"SELECT schools.sciencehead_uid AS uid, schools.school, users.firstname AS firstname, users.lastname AS lastname, users.email AS email FROM schools
JOIN users ON schools.sciencehead_uid=users.uid AND users.id=(SELECT id FROM users WHERE users.uid=schools.sciencehead_uid ORDER BY `year` DESC LIMIT 1)
WHERE schools.year='".$config['FAIRYEAR']."' AND users.email!=''"),
"school_thisyear"=>array("name"=>"School this year","query"=>
"SELECT board, schoolemail FROM `schools` WHERE `year` ='".$config['FAIRYEAR']."' GROUP BY schoolemail"),
"school_with_project_thisyear"=>array("name"=>"Schools with projects this year","query"=>
"SELECT DISTINCT(sc.schoolemail) AS email, sc.school AS firstname FROM students AS st LEFT JOIN schools AS sc ON sc.id = st.schools_id WHERE st.year = ".$config['FAIRYEAR']." AND LENGTH( sc.schoolemail ) !=0 ORDER BY email
"),
"school_thisyear"=>array("name"=>"Schools this year","query"=>
"SELECT school AS firstname, schoolemail AS email FROM `schools` WHERE `year` ='".$config['FAIRYEAR']."' GROUP BY schoolemail"),
"school_teachers_thisyear"=>array("name"=>"Teachers (as entered by students) this year","query"=>
"SELECT teachername AS firstname, teacheremail AS email FROM students WHERE year = '".$config['FAIRYEAR']."' GROUP BY teacheremail"),

View File

@ -251,7 +251,7 @@ function countwords()
<?
if($config['project_type'] == 'yes'){
$q=mysql_query("SELECT * FROM projecttypes ORDER BY type");
echo "<tr><td>".i18n("Select Project Type").": </td><td>";
echo "<tr><td>".i18n("Project Type").": </td><td>";
echo "<select name=\"projecttype\">\n";
echo "<option value=\"\">".i18n("Select a project type")."</option>\n";
//FIXME: need to fix the loading glitch

View File

@ -580,14 +580,14 @@ $doCanvasSampletcpdf = false;
}
echo "</table>\n";
echo "<h4>Grouping</h4>";
for($x=0;$x<2;$x++) {
for($x=0;$x<3;$x++) {
echo "Group By".($x + 1).": ";
$f = $report['group'][$x]['field'];
field_selector("group[$x]", "group$x", $f);
echo "<br />";
}
echo "<h4>Sorting</h4>";
for($x=0;$x<3;$x++) {
for($x=0;$x<5;$x++) {
echo "Sort By".($x + 1).": ";
$f = $report['sort'][$x]['field'];
field_selector("sort[$x]", "sort$x",$f);

View File

@ -454,6 +454,13 @@ $report_judges_fields = array(
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */
'components' => array('users_judge')),
'other_exp' => array(
'name' => 'Judge -- Other Expertise',
'header' => 'Expertise Other',
'width' => 2,
'table' => 'users_judge.expertise_other',
'components' => array('users_judge')),
/* Fill these in below, they're all the same */
'div_exp_1' => array(), 'div_exp_2' => array(), 'div_exp_3' => array(), 'div_exp_4' => array(), 'div_exp_5' => array(),
'div_exp_6' => array(), 'div_exp_7' => array(), 'div_exp_8' => array(), 'div_exp_9' => array(), 'div_exp_10' => array(),

View File

@ -695,6 +695,14 @@ $report_students_fields = array(
'table_sort' => 'award_awards.order',
'components' => array('awards')),
'award_prize_script_order' => array(
'name' => 'Award -- Script Order',
'header' => 'Prize Script Order',
'width' => 4,
'table' => 'award_prizes.id',
'table_sort' => 'award_prizes.id DESC',
'components' => array('awards')),
'award_type' => array(
'name' => 'Award -- Type (Divisional, Special, etc.)',
'header' => 'Award Type',