-
Notifications
You must be signed in to change notification settings - Fork 0
/
assessment_tracker.php
98 lines (77 loc) · 2.86 KB
/
assessment_tracker.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
<?php
/**
* Created by JetBrains PhpStorm.
* User: DATTWOOD
* Date: 27/07/11
* Time: 08:35
* Shows the current students units and completeness level
*/
$notSet = 0;
// check the student_number isn't blank
if (!empty($student_number)) {
// try {
// $resultAssessment = $client->__soapCall("getAssessmentsById", array($student_number));
// }
//
// catch (SoapFault $e) {
// // handle issues returned by the web service
// echo "<br/>There has been a problem getting the assessments or the assessment tracker hasn't been set up for this course";
// $notSet = 1;
// }
$resultAssessment = $client->__soapCall("getAssessmentsById",array($student_number));
if (empty($resultAssessment)) {
$notSet = 1;
}
if ($notSet != 1) {
accord_first('Assessment Tracker');
//print_r($resultAssessment);
echo 'Hover for unit details and critieria';
$count = 1;
echo '<table><tr>';
$unit = '';
foreach ($resultAssessment as $key => $item) {
if ($unit != $item->unitName) {
$unit = $item->unitName;
?>
<td><b>
<div class="assessment">
<div class="assessmentbox<?php echo $item->unitColour; ?>">
<div class="assessmentboxtext"><?php echo substr($item->unitMark, 0, 1); ?></div>
<div class="assessmentbox"><img src="./templates/custom/pix/InfoIcon2.png"/>
<div class="assessmentinfo"><b>Unit
Description </b></p><?php echo $item->unitDescription; ?></p><b>Critieria on this
unit</b></p>
<table>
<tr>
<th>Name</th>
<th>Mark</th>
</tr>
<?php
foreach ($resultAssessment as $item) {
if ($item->unitName == $unit) {
echo '<tr><td>', $item->critName . '</td><td>', $item->critMark, '</td></tr>';
}
}
?>
</table>
</div>
</div>
</div>
<div class="hiddentext">_ </div> </td>
<?php
// Limit the assessment grid to 5 accross
if ($count == 5) {
echo '</tr><tr>';
$count = 0;
}
$count++;
}
}
?>
</tr></table>
<?php
unset($resultAssessment);
accord_last();
}
}
?>