-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasca_es.html
53 lines (50 loc) · 1.93 KB
/
tasca_es.html
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
<!DOCTYPE html>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
<html>
<head>
<base target="_top">
<script>
// Prevent forms from submitting.
function preventFormSubmit() {
var forms = document.querySelectorAll('form');
for (var i = 0; i < forms.length; i++) {
forms[i].addEventListener('submit', function(event) {
event.preventDefault();
});
}
}
window.addEventListener('load', preventFormSubmit);
function handleFormSubmit(formObject) {
google.script.run.withSuccessHandler().accio(formObject);
}
function tornar(formObject) {
google.script.run.withSuccessHandler().barra(formObject);
}
</script>
</head>
<body>
<p>Se creará una nueva tarea en Classroom y se añadirán las calificaciones a los alumnos de la lista de correos</p>
<form id="tasca" onsubmit="handleFormSubmit(this)">
<p>Indica un nombre para la tarea <input type="text" name="titol"></p>
<p>Indica una descripción para la tarea <input type="text" name="descripcio"></p>
<div class="block form-group">Puntuación máxima
<select name="pmax" style="width: 40px;">
<? var punts = [10,20,30,40,50,60,70,80,90,100];
var properties = PropertiesService.getDocumentProperties();
var p_max = properties.getProperty('pmax');
for (var i=0;i<10;i++){
if (i== p_max/10 - 1){ ?>
<option value="<?= punts[i] ?>" selected><?= punts[i] ?></option>
<? }else{ ?>
<option value="<?= punts[i] ?>"><?= punts[i] ?></option>
<?}?>
<? } ?>
</select> </div>
<p><input class="action" id="boto" type="submit" value="Exportar a Classroom"></p>
</form>
<p>
<form id="tasca" onsubmit="tornar(this)">
<p><input id="boto2" type="submit" value="Anterior" onclick=tornar()></p>
</form>
</body>
</html>