-
Notifications
You must be signed in to change notification settings - Fork 0
/
parental.php
71 lines (55 loc) · 2.82 KB
/
parental.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
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//check if a not applicable flag has been set and if so don't show the parental block
// process the remove button
$query = "SELECT * FROM parental WHERE student_id='" . $student_number . "' AND not_applicable='1'";
//echo $query;
$result = $mysqli->query($query);
if ($result->num_rows == 0) {
// try {
// $parentalSigned = $client->getParentalById($student_number);
// }
//
// catch (SoapFault $e) {
// // handle issues returned by the web service
// echo '<br/>';
// echo " No parental record found either the there is a problem with MIS or more likely the Student isn't enrolled for this year";
// echo '<br/>Please wait a few moments and refresh the page';
// }
$parentalSigned = $client->__soapCall("getParentalById",array($student_number));
if ($parentalSigned['Signed'] == '0') {
echo '<h2>Guardian/ Employer Agreement not signed <img src="./templates/custom/pix/delete-icon.png" width="32" height="32"/></h2>';
echo '<a href="' . $CFG->wwwroot . '/blocks/ilp/templates/custom/Parent_Carer_support_agreement_Revision_10.pdf" ><img src="' . $CFG->wwwroot . '/blocks/ilp/templates/custom/pix/download_icon.png" width="32" height="32" > Download a copy of the parental agreement for signing</a><br/>';
echo '<a href="' . $CFG->wwwroot . '/blocks/ilp/templates/custom/Employer_contract.pdf" ><img src="' . $CFG->wwwroot . '/blocks/ilp/templates/custom/pix/download_icon.png" width="32" height="32" > Download a copy of the employer agreement for signing</a>';
if (has_capability('block/ilp_student_info:viewclass', $context)) { ?>
<form method="post"
action="/blocks/ilp/templates/custom/parental_process.php?student=<?php echo $student_number; ?>&stunum=<?php echo $studentid; ?>&courseid=<?php echo $courseid; ?>">
<input type="hidden" id="studentnum" name="studentnum" value="<?php echo $student_number; ?>">
<div id="parental">Click the red cross below if the Parental/ employer agreement isn't applicable for this student</p>
<input id="removeParental" type="submit" name="removeParental" value="submit_change"/>
</div>
</form>
<?php
}
} elseif ($parentalSigned['Signed'] == 'yes') {
// echo 'yes';
echo '<h2>Guardian/ Employer Agreement signed<img src="./templates/custom/pix/tick-icon.png" width="32" height="32" /></h2>';
}
?>
</br>
<?php
}
?>
<!--Script to run the submit button graphic - doesn't work when added to the main js script files-->
<script type="text/javascript">
$(document).ready(function() {
$('#removeParental').hover(function() {
$(this).addClass('mhover')
}, function() {
$(this).removeClass('mhover');
});
});
</script>