/
DailySummary.php
58 lines (48 loc) · 1.17 KB
/
DailySummary.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* Merge Attendance Chart & Absence Summary
*
* @package RosarioSIS
* @subpackage Attendance
*/
DrawHeader( ProgramTitle() );
$_REQUEST['report'] = issetVal( $_REQUEST['report'], '' );
$report_link = PreparePHP_SELF(
[],
[ 'report', 'attendance' ]
) . '&report=';
$tmp_allow_edit = false;
if ( ! AllowEdit() )
{
// Temporary AllowEdit for non admin users for SelectIpnut display.
$_ROSARIO['allow_edit'] = true;
$tmp_allow_edit = true;
}
$report_select = SelectInput(
$_REQUEST['report'],
'report',
'',
[
'' => ( User( 'PROFILE' ) === 'admin' || User( 'PROFILE' ) === 'teacher' ?
_( 'Attendance Chart' ) :
_( 'Daily Summary' ) ),
'absence' => _( 'Absence Summary' ),
],
false,
'onchange="' . AttrEscape( 'ajaxLink(' . json_encode( $report_link ) . ' + this.value);' ) . '" autocomplete="off"',
false
);
if ( $tmp_allow_edit )
{
// Remove temporary AllowEdit for non admin users for SelectIpnut display.
$_ROSARIO['allow_edit'] = false;
}
DrawHeader( $report_select );
if ( $_REQUEST['report'] === 'absence' )
{
require_once 'modules/Attendance/includes/StudentSummary.php';
}
else
{
require_once 'modules/Attendance/includes/DailySummary.php';
}