/
reportbook.php
105 lines (97 loc) · 3.01 KB
/
reportbook.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/** reportbook.php
* This is the hostpage for the reportbook.
*/
$host='reportbook.php';
$book='reportbook';
include('scripts/head_options.php');
include('scripts/set_book_vars.php');
?>
<div id="bookbox" class="reportcolor">
<?php
/**
* All scripts except report_reports is sensitive to whether an
* academic responsibility is selected, if it is students can be
* listed by cohort, otherwise by pastoral groups.
*/
$rforms=array();
$rhouses=array();
$ryids=array();
if($r>-1 and $current!='report_reports.php' and $current!='report_attendance.php'
and $current!='report_merits.php' and $current!='report_comments.php' and $current!='report_incidents.php'){
$rcrid=$respons[$r]['course_id'];
$rbid=$respons[$r]['subject_id'];
$ryid=$respons[$r]['yeargroup_id'];
if($ryid==''){$ryid='%';}
$listgroup='list_cohort.php';
$reportpubs='no';
}
else{
$pastorals=(array)list_pastoral_respon();
$rforms=$pastorals['forms'];
$rhouses=$pastorals['houses'];
$ryids=$pastorals['years'];
$listgroup='list_pastoralgroup.php';
$reportpubs='yes';
}
if(sizeof($rforms)==0 and sizeof($ryids)==0 and sizeof($rhouses)==0 and $r=='-1' and $_SESSION['role']!='admin'){
/* Could not find any responsibility for this user which gives them access to a group. */
$error[]=get_string('selectresponsibility');
include('scripts/results.php');
$current='';
$choice='';
}
if($current!=''){
include($book.'/'.$current);
}
?>
</div>
<div style="visibility:hidden;" id="hiddenbookoptions">
<form id="reportchoice" name="reportchoice" method="post" action="reportbook.php" target="viewreportbook">
<fieldset class="reportbook selery">
<legend><?php print_string('reporton');?></legend>
<?php
$choices=array(
'' => 'reporton'
,'report_comments.php' => 'comments'
,'report_incidents.php' => 'incidents'
,'report_assessments.php' => 'assessments'
,'report_merits.php' => 'merits'
,'report_attendance.php' => 'attendance'
,'report_reports.php' => 'subjectreports'
//,'report_results.php' => 'finalresults'
);
selery_select_stick($choices,$choice,$book);
?>
</fieldset>
</form>
<?php
if($_SESSION['role']=='admin'){
$choices=array(
'' => 'manage'
,'manage_homework.php' => 'homework'
,'new_stats.php' => 'newstatistics'
,'new_estimate.php' => 'newestimates'
,'new_assessment.php' => 'newassessments'
,'new_report.php' => 'subjectreports'
);
}
else{
$choices=array(
'manage_homework.php' => 'homework'
,'new_assessment.php' => 'newassessments'
);
}
?>
<form id="reportadminchoice" name="reportadminchoice" method="post" action="reportbook.php" target="viewreportbook">
<fieldset class="reportbook selery">
<legend><?php print_string('manage');?></legend>
<?php
selery_select_stick($choices,$choice,$book);
?>
</fieldset>
</form>
</div>
<?php
include('scripts/end_options.php');
?>