forked from science-ation/science-ation
- Add an option to print ALL student names for a project (will work for more
than 2 students).
This commit is contained in:
parent
49a19c9d44
commit
6c61595cb9
@ -528,6 +528,7 @@ foreach($report_stock as $n=>$v) {
|
||||
$sel = array();
|
||||
$x=0;
|
||||
$group_by = array();
|
||||
$post_group_by = array();
|
||||
$components = array();
|
||||
$order = array();
|
||||
|
||||
@ -539,8 +540,9 @@ foreach($report_stock as $n=>$v) {
|
||||
$table['dataalign'][] = 'left';
|
||||
$sel[] = "{$fields[$f]['table']} AS C$x";
|
||||
$fieldname[$f] = "C$x";
|
||||
/* We want to add these to group by, but AFTER all the other group bys */
|
||||
if(is_array($fields[$f]['group_by']))
|
||||
$group_by = array_merge($group_by, $fields[$f]['group_by']);
|
||||
$post_group_by = array_merge($group_by, $fields[$f]['group_by']);
|
||||
|
||||
if(is_array($fields[$f]['components'])) {
|
||||
$components = array_merge($components,
|
||||
@ -607,6 +609,7 @@ foreach($report_stock as $n=>$v) {
|
||||
$report['year'] = $config['FAIRYEAR'];
|
||||
}
|
||||
|
||||
$group_by = array_merge($group_by, $post_group_by);
|
||||
$group_query = "";
|
||||
if(count($group_by)) {
|
||||
$group_query = "GROUP BY ".implode(",", $group_by);
|
||||
|
@ -69,6 +69,13 @@ $report_students_fields = array(
|
||||
'table_sort' => 'students.lastname',
|
||||
'components' => array('partner') ),
|
||||
|
||||
'allnames' => array(
|
||||
'name' => "Student -- All Student Names (REQUIRES MYSQL 5.0) ",
|
||||
'header' => 'Student(s)',
|
||||
'width' => 3.0,
|
||||
'table' => "GROUP_CONCAT(students.firstname, ' ', students.lastname ORDER BY students.lastname SEPARATOR ', ')",
|
||||
'group_by' => array('students.registrations_id')),
|
||||
|
||||
'email' => array(
|
||||
'name' => 'Student -- Email',
|
||||
'header' => 'Email',
|
||||
|
Loading…
x
Reference in New Issue
Block a user