-
Notifications
You must be signed in to change notification settings - Fork 3
/
dbwebb2-inspect-javascript1.bash
136 lines (102 loc) · 2.71 KB
/
dbwebb2-inspect-javascript1.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
#---------------------- INSPECT JAVASCRIPT1 START -----------------------
#
# Test javascript1 me
# TODO rearrange structure of me in js1 and remove this function
#
javascript1me()
{
headerForTest "-- me-page" "-- ${DBW_WWW}${DBW_COURSE}$KMOM#resultat_redovisning"
openFilesInEditor "me"
checkKmomDir "me"
printUrl "me.html" "me"
printUrl "redovisning.html" "me"
}
#
# Test javascript1 general
#
javascript1()
{
inspectIntro
}
#
# Test general, last in sequence
#
function javascript1last()
{
javascript1me
#inspectMe "me" "me.html" "redovisning.html"
}
#
# Test javascript1 sandbox
# REPLACE with inspectLab
#
javascript1exercise()
{
local lab="$1"
local main="$2"
local url="$3"
local target="me/$KMOM/$lab"
headerForTest "-- $lab" "-- ${DBW_WWW}$url"
openFilesInEditor "$target"
checkKmomDir "$target"
fileIsReadable "$target/$main"
printUrl "$main" "$target"
}
#
# Test javascript1 kmom01
#
javascript1kmom01()
{
javascript1exercise "sandbox" "index.html" "uppgift/skapa-din-egen-sandbox-for-javascript-testprogram"
}
#
# Test javascript1 kmom02
#
javascript1kmom02()
{
javascript1exercise "lab1" "answer.html" "uppgift/javascript-med-variabler-loopar-och-inbyggda-funktioner"
javascript1exercise "flag1" "index.html" "uppgift/gor-svenska-flaggan-i-html-och-css"
javascript1exercise "baddie1" "index.html" "uppgift/flytta-runt-en-baddie-pa-webbsidan"
}
#
# Test javascript1 kmom03
#
javascript1kmom03()
{
javascript1exercise "lab2" "answer.html" "uppgift/javascript-med-funktioner"
javascript1exercise "flag2" "index.html" "uppgift/gor-svenska-flaggan-med-javascript-html-och-css"
javascript1exercise "baddie2" "index.html" "uppgift/flytta-baddie-pa-webbsida-2"
}
#
# Test javascript1 kmom04
#
javascript1kmom04()
{
javascript1exercise "lab3" "answer.html" "uppgift/javascript-och-arrayer"
javascript1exercise "lab4" "answer.html" "uppgift/javascript-och-objekt"
javascript1exercise "flag3" "index.html" "uppgift/gor-svenska-flaggan-med-javascript-och-objekt"
javascript1exercise "baddie3" "index.html" "uppgift/flytta-baddie-pa-webbsida-3"
}
#
# Test javascript1 kmom
#
javascript1kmom05()
{
javascript1exercise "lab5" "index.html" "uppgift/javascript-dom-och-events"
javascript1exercise "flag4" "index.html" "uppgift/memory-rita-flaggor-med-javascript-och-dom"
}
#
# Test javascript1 kmom
#
javascript1kmom06()
{
javascript1exercise "hangman" "index.html" "uppgift/hanga-gubben-som-modul-i-javascript"
}
#
# Test javascript1 kmom
#
javascript1kmom10()
{
javascript1exercise "intelligence" "index.html" "javascript1/kmom10"
}
#---------------------- INSPECT JAVASCRIP1 END ----------------------------