-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexampleAssessments.php
executable file
·66 lines (52 loc) · 1.58 KB
/
exampleAssessments.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
<?php
# Class implementing an example assessment system
require_once ('reviewable-assessments/reviewableAssessments.php');
class exampleAssessments extends reviewableAssessments
{
# Function to assign defaults additional to the general application defaults
public function defaults ()
{
# Add implementation defaults
$defaults = array (
'applicationName' => 'Example assessments',
'database' => 'exampleassessments',
'description' => 'example assessment',
'descriptionPlural' => 'example assessments',
'directorDescription' => 'Example Assessments Officer',
);
# Merge in the default defaults
$defaults += parent::defaults ();
# Return the defaults
return $defaults;
}
# Database structure
public function databaseStructureSpecificFields ()
{
# Return the SQL
return $sql = "
/* Domain-specific fields to be added here, if any */
";
}
# Submission form
public function submissionForm ($data)
{
return parent::submissionForm ($data);
}
# Function to define the asssessment form template
public function formTemplateLocal ($data, $watermark)
{
$html = '<h3>Section B – Questionnaire</h3>';
$html .= $watermark;
# Final confirmation
$html .= '
<h3 class="pagebreak">Confirmation</h3>
<div class="graybox">
<p>All issues, however trivial they may seem, should be reported. I agree that if an incident occurs during the matters covered by this assessment, I will report this.</p>
<p><strong>Tick to confirm: {confirmation}</strong></p>
</div>
';
# Return the HTML
return $html;
}
}
?>