-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdbwebb2-inspect-htmlphp.bash
167 lines (117 loc) · 2.86 KB
/
dbwebb2-inspect-htmlphp.bash
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
#---------------------------- INSPECT HTMLPHP START --------------------------
#
# Test general
#
function htmlphp()
{
TREE_OPTIONS="-d"
inspectIntro
local meDir=
meDir="$( echo "$KMOM" | sed 's/kmom0/me/g' | sed 's/kmom/me/g' )"
METARGET="me/$KMOM/$meDir"
}
#
# Test general, last in sequence
#
function htmlphplast()
{
:
}
#
# REPLACE with inspectLab
#
function htmlphplab()
{
local lab="$1"
local target="me/$KMOM/$lab"
headerForTest "-- Lab" "-- ${DBW_WWW}$DBW_COURSE/$lab"
openFilesInEditor "$target"
checkKmomDir "$target"
printUrl "" "$target"
inspectCommand "answer.php" "$EXEC_DIR/$KMOM/$lab" "php answer.php"
}
#
# REPLACE with inspectLab
#
function htmlphpsqllab()
{
local lab="$1"
local target="me/$KMOM/$lab"
headerForTest "-- Lab" "-- ${DBW_WWW}$DBW_COURSE/$lab"
openFilesInEditor "$target"
checkKmomDir "$target"
printUrl "" "$target"
inspectCommand "answer.bash" "$EXEC_DIR/$KMOM/$lab" "./answer.bash"
}
#
# Test kmom
#
function htmlphpkmom01()
{
inspectMe "$METARGET" "me.php" "report.php" "uppgift/skapa-en-me-sida-i-kursen-htmlphp"
}
#
# Test kmom
#
function htmlphpkmom02()
{
inspectMe "$METARGET" "me.php" "report.php" "uppgift/bygg-ut-din-htmlphp-me-sida-till-version-2"
htmlphplab "lab1"
}
#
# Test kmom
#
function htmlphpkmom03()
{
inspectMe "$METARGET" "me.php" "report.php" "uppgift/bygg-ut-din-htmlphp-me-sida-till-version-3"
viewFileContent "multipage.php" "$METARGET"
htmlphplab "lab2"
inspectExercise "multi" "uppgift/bygg-en-multisida-och-testa-arrayer"
}
#
# Test kmom
#
function htmlphpkmom04()
{
TREE_OPTIONS="-d"
inspectMe "$METARGET" "me.php" "report.php" "uppgift/bygg-ut-din-me-sida-till-version-4"
viewFileContent "config.php" "$METARGET" "incl/config.php"
viewFileContent "stylechooser.php" "$METARGET"
htmlphplab "lab3"
inspectExercise "stylechooser" "uppgift/bygg-en-stylevaljare-till-din-webbplats"
}
#
# Test kmom
#
function htmlphpkmom05()
{
TREE_OPTIONS="-d"
inspectMe "$METARGET" "me.php" "report.php" "htmlphp/proj5"
viewFileContent "jetty.php" "$METARGET"
viewFileContent "search.php" "$METARGET"
viewFileContent "config.php" "$METARGET"
htmlphplab "lab4"
htmlphpsqllab "sql1"
inspectExercise "jetty" "uppgift/bygg-en-multisida-for-att-soka-i-en-databas"
}
#
# Test kmom
#
function htmlphpkmom06()
{
TREE_OPTIONS="-d"
inspectMe "$METARGET" "me.php" "report.php" "htmlphp/proj6"
viewFileContent "admin.php" "$METARGET"
htmlphplab "lab5"
}
#
# Test kmom
#
function htmlphpkmom10()
{
TREE_OPTIONS="-d"
inspectMe "me/kmom06/me6" "me.php" "report.php" ""
TREE_OPTIONS="-d"
inspectExercise "bmo" "htmlphp/kmom10" "" "" "-"
}
#---------------------------- INSPECT HTMLPHP END ----------------------------