-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnavigateur-js-3.html
More file actions
242 lines (215 loc) · 7.26 KB
/
Copy pathnavigateur-js-3.html
File metadata and controls
242 lines (215 loc) · 7.26 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<html>
<head>
<style>
body {
background-color: lightblue;
}
h1 {
color: black;
text-align: center;
}
p {
color: black;
font-family: Courier;
font-size: 20px;
}
button {
background-color: black;
border: gray;
color: white;
padding: 15px 15px;
font-size: 20px;
cursor: pointer;
font-family: courier;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
width: 25%
display: block;
margin:0 auto;
}
button:hover{
background-color: white;
color: black
}
</style>
<script>
function change_coef(comp)
{
coef1 = document.getElementById(comp).textContent;
coef1++;
if (coef1 == 4) coef1 = 0;
app_coef.innerHTML = coef1
}
function change_note(comp)
{
note1 = document.getElementById(comp).textContent; //'app_note'
if (note1 == 'A') app_note.innerHTML = 'B';
if (note1 == 'B') app_note.innerHTML = 'C';
if (note1 == 'C') app_note.innerHTML = 'D';
if (note1 == 'D') app_note.innerHTML = 'A';
}
function choose0123(e){return"0"==e?0:"1"==e?1:"2"==e?2:"3"==e?3:404}
coef1 = app_coef
val_coef_app=choose0123(coef1)
function chooseABCD(e){
return"A"==e?2:"B"==e?1:"C"==e?-1:"D"==e?-2:404
}
note1 = document.getElementById(comp).textContent
val_note_app= chooseABCD(note1)
</script>
</head>
<body>
<h1>Calculer la note d'un candidat pour les ECE</h1><br>
<p>Saisir A, B, C ou D pour la compétence "s'approprier" en cliquant sur le bouton:</p>
<button type="button" onclick="change_coef('app_coef')">
<div class="container">
<a id="app_coef" onclick="change_coef('app_coef')" class="waves-effect waves-light btn">0</a>
</button>
<button type="button" onclick="change_note('app_note')">
<div class="container">
<a id="app_note" onclick="change_note('app_note')" class="waves-effect waves-light btn">A</a>
</button>
<p id="val"></p>
<script>
function change_coef1()
{
coef1 = document.getElementById('app_coef').textContent;
coef1++;
if (coef1 == 4) coef1 = 0;
app_coef.innerHTML = coef1
}
function change_note1()
{
note1 = document.getElementById('app_note').textContent;
if (note1 == 'A') app_note.innerHTML = 'B';
if (note1 == 'B') app_note.innerHTML = 'C';
if (note1 == 'C') app_note.innerHTML = 'D';
if (note1 == 'D') app_note.innerHTML = 'A';
}
function choose0123(e){return"0"==e?0:"1"==e?1:"2"==e?2:"3"==e?3:404}
coef1 = app_coef
val_coef_app=choose0123(coef1)
function chooseABCD(e){
return"A"==e?2:"B"==e?1:"C"==e?-1:"D"==e?-2:404
}
note1 = document.getElementById('app_note').textContent
val_note_app= chooseABCD(note1)
</script>
<p>Saisir A, B, C ou D pour la compétence "valider" en cliquant sur le bouton:</p>
<button type="button" onclick="change_coef()">
<div class="container">
<a id="val_coef" onclick="change_coef()" class="waves-effect waves-light btn">0</a>
</button>
<button type="button" onclick="change_note()">
<div class="container">
<a id="val_note" onclick="change_note()" class="waves-effect waves-light btn">A</a>
</button>
<script>
function change_coef()
{
var coef = document.getElementById('val_coef').textContent;
coef++;
if (coef == 4) coef = 0;
val_coef.innerHTML = coef;
}
function change_note()
{
var note = document.getElementById('val_note').textContent;
if (note == 'A') val_note.innerHTML = 'B';
if (note == 'B') val_note.innerHTML = 'C';
if (note == 'C') val_note.innerHTML = 'D';
if (note == 'D') val_note.innerHTML = 'A';
}
</script>
<p>Saisir A, B, C ou D pour la compétence "analyser" en cliquant sur le bouton:</p>
<button type="button" onclick="change_coef2()">
<div class="container">
<a id="ana_coef" onclick="change_coef2()" class="waves-effect waves-light btn">0</a>
</button>
<button type="button" onclick="change_note2()">
<div class="container">
<a id="ana_note" onclick="change_note2()" class="waves-effect waves-light btn">A</a>
</button>
<script>
function change_coef2()
{
var coef = document.getElementById('ana_coef').textContent;
coef++;
if (coef == 4) coef = 0;
ana_coef.innerHTML = coef;
}
function change_note2()
{
var note = document.getElementById('ana_note').textContent;
if (note == 'A') ana_note.innerHTML = 'B';
if (note == 'B') ana_note.innerHTML = 'C';
if (note == 'C') ana_note.innerHTML = 'D';
if (note == 'D') ana_note.innerHTML = 'A';
}
</script>
<p>Saisir A, B, C ou D pour la compétence "réaliser" en cliquant sur le bouton:</p>
<button type="button" onclick="change_coef3()">
<div class="container">
<a id="rea_coef" onclick="change_coef3()" class="waves-effect waves-light btn">0</a>
</button>
<button type="button" onclick="change_note3()">
<div class="container">
<a id="rea_note" onclick="change_note3()" class="waves-effect waves-light btn">A</a>
</button>
<script>
function change_coef3()
{
var coef = document.getElementById('rea_coef').textContent;
coef++;
if (coef == 4) coef = 0;
rea_coef.innerHTML = coef;
}
function change_note3()
{
var note = document.getElementById('rea_note').textContent;
if (note == 'A') rea_note.innerHTML = 'B';
if (note == 'B') rea_note.innerHTML = 'C';
if (note == 'C') rea_note.innerHTML = 'D';
if (note == 'D') rea_note.innerHTML = 'A';
}
</script>
<p>Saisir A, B, C ou D pour la compétence "communiquer" en cliquant sur le bouton:</p>
<button type="button" onclick="change_coef4()">
<div class="container">
<a id="com_coef" onclick="change_coef4()" class="waves-effect waves-light btn">0</a>
</button>
<button type="button" onclick="change_note4()">
<div class="container">
<a id="com_note" onclick="change_note4()" class="waves-effect waves-light btn">A</a>
</button>
<script>
function change_coef4()
{
var coef = document.getElementById('com_coef').textContent;
coef++;
if (coef == 4) coef = 0;
com_coef.innerHTML = coef;
}
function change_note4()
{
var note = document.getElementById('com_note').textContent;
if (note == 'A') com_note.innerHTML = 'B';
if (note == 'B') com_note.innerHTML = 'C';
if (note == 'C') com_note.innerHTML = 'D';
if (note == 'D') com_note.innerHTML = 'A';
}
</script>
<p>La note finale est:</p>
<button type="button" onclick="notefinale()">Calculer!</button>
<p id="notefinale"></p>
<script>
function notefinale(){
//test:
alert(val_note_app)
//notefin=val_coef_app*val_note_app
// vrai calcul:
//notefin=Math.round(25*(val_coef_app*val_note_app+val_coef_val*val_note_val+val_coef_com*val_note_com+val_coef_rea*val_note_rea+val_coef_ana*val_note_ana+8)/20+0.5/20);
// document.getElementById("notefinale").innerHTML="La note du candidat est égal à "+notefin+" ."
}
</script>
</body>
</html>