-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintresult.php
230 lines (171 loc) · 5.51 KB
/
printresult.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css">
<script language="javascript">
function Clickheretoprint()
{
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting+="scrollbars=yes,width=700, height=400, left=100, top=25";
var content_vlue = document.getElementById("content").innerHTML;
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('</head><body onLoad="self.print()" style="width: 700px; font-size:11px; font-family:arial; font-weight:normal;">');
docprint.document.write(content_vlue);
docprint.document.close();
docprint.focus();
}
</script>
<a href="javascript:Clickheretoprint()"><i class="fa fa-print"> Print</i></a>
<div id="content">
<div class="result-header">
<h3 style="text-align: center; color:brown;">Provisional statement of Result</h3><hr>
</div>
<div>
<?php
foreach($this->getstudentpersonaldata() as $data)
{
$stdname = $data['fullname'];
$stdmatno = $data['student_matric_no'];
$stddept = $data['department_name'];
$stdlevel = $data['level'];
}
$sql="SELECT session from session where session_id=$sessionid";
$query=$this->calldb()->query($sql);
foreach ($query as $data) {
$session=$data['session'];
}
if($semesterid==1)
{
$semester="first semester";
}
else
{
$semester="second semester";
}
?>
<table>
<tr> <td width="50%"> Name: <br> </td> <td> <?php echo $stdname;?><br></td></tr>
<tr><td width="50%"> Matric Number: <br></td> <td> <?php echo $stdmatno;?><br></td><tr>
<tr><td width="50%"> Programme: <br></td> <td> <?php echo $stddept;?><br></td> </tr>
<tr><td width="50%"> Level:<br> </td> <td> <?php echo $stdlevel;?><br></td></tr>
<tr><td width="50%"> Session(Semester):<br></td><td><?php echo "$session ($semester)" ?><br></td></tr>
</table>
</div>
<table class="table span12 table-stripped" width="100%">
<thead>
<tr>
<th>Course Code</th>
<th>Course title</th>
<th>Course Unit</th>
<th>Score</th>
<th>Grade</th>
</tr>
</thead>
<tbody>
<?php
foreach ($this->getresultdetail($semesterid,$sessionid,$studentid) as $data):
?>
<tr>
<td align="center"><?php echo $data['course_code']?></td>
<td align="center"><?php echo $data['course_name']?></td>
<td align="center"><?php echo $data['course_unit']?></td>
<td align="center"><?php echo $data['total']?></td>
<td align="center"><?php echo $data['grade']?></td>
</tr>
<br>
<?php endforeach;?>
</tbody><br><br>
</table>
<table class="table span12 table-stripped" width="100%">
<h3><b>Outstanding Courses</b></h3>
<thead>
<tr>
<th>Course Code</th>
<th>Course title</th>
<th>Course Unit</th>
<th>Score</th>
<th>Grade</th>
</tr>
</thead>
<?php
foreach ($this->getoutstandingcourses($semesterid,$sessionid,$studentid) as $data):
?>
<tr>
<td align="center"><?php echo $data['course_code']?></td>
<td align="center"><?php echo $data['course_name']?></td>
<td align="center"><?php echo $data['course_unit']?></td>
<td align="center"><?php echo $data['total']?></td>
<td align="center"><?php echo $data['grade']?></td>
</tr>
<?php endforeach;?>
</table>
<br><br><br>
<div class="row">
<div class="col-md-6">
<?php $gpa = $this->calculateGPA($studentid,$semesterid,$sessionid)?>
<table width="50%" align="left">
<h3 >Grade</h3>
<tr> <td width="50%"> TCP: <br> </td> <td> <?php echo $this->calculateTCP($studentid,$semesterid,$sessionid)?><br></td></tr>
<tr><td width="50%"> TNU: <br></td> <td> <?php echo $this->calculateTNU($studentid,$semesterid,$sessionid)?><br></td><tr>
<tr><td width="50%"> GPA: <br></td> <td><?php echo $this->calculateGPA($studentid,$semesterid,$sessionid)?><br></td> </tr>
<tr><td width="50%"> REMARK:<br> </td> <td><?php echo $this->GPAstatus($gpa)?><br></td></tr>
</table>
<br><br><br><br><br>
</div>
<div class="col-md-6">
<table width="50%" align="right">
<thead>
<h3 style="text-align:center;" align="left">Grading System</h3>
<th width="25%">Mark(%)</th>
<th width="25%">Grade Point</th>
<th width="25%">Grade letter</th>
<th width="25%">Level of Achievement</th>
</thead>
<tbody>
<tr>
<td align="center">75-100</td>
<td align="center">5</td>
<td align="center">A</td>
<td align="center">Excellent</td>
</tr>
<tr>
<td align="center">65-75</td>
<td align="center">4</td>
<td align="center">B</td>
<td align="center">Very good</td>
</tr>
<tr>
<td align="center">55-65</td>
<td align="center">3</td>
<td align="center">C</td>
<td align="center">Good</td>
</tr>
<tr>
<td align="center">50-55</td>
<td align="center">2</td>
<td align="center">D</td>
<td align="center">Fairly good</td>
</tr>
<tr>
<td align="center">45-50</td>
<td align="center">1</td>
<td align="center">E</td>
<td align="center">Poor</td>
</tr>
<tr>
<td align="center"><45</td>
<td align="center">0</td>
<td align="center">F</td>
<td align="center">Fail</td>
</tr>
</tbody>
</table><br><br>
</div>
</div>
<br><br><br>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
____________________________________<br>
<p>HOD'S Signature</p>
</div>
</div>
</div>