Dani Vilardell | aae4e2d | 2020-09-22 17:33:39 +0200 | [diff] [blame^] | 1 | |
| 2 | function completaLink() { |
| 3 | if(linkOutput == "") linkOutput = "https://docs.google.com/forms/d/e/1FAIpQLSfT9o287VqLyhwR8LPdloAQWhuqCgA3NfdhgP5vb9_sVQHL-g/viewform"; |
| 4 | for (i = 0; i < mydata.length; i++) { |
| 5 | var h = mydata[i].hora.split(":"); |
| 6 | if(h[0] == (hora_actual.getHours() - 7).toString()) { |
| 7 | console.log("trobat"); |
| 8 | document.getElementById("assignatura").innerHTML = mydata[i].nom; |
| 9 | document.getElementById("aula").innerHTML = "Aula " + mydata[i].aula; |
| 10 | |
| 11 | var datamap=[ |
| 12 | "entry.1063142948=" + mydata[i].aula, |
| 13 | "entry.1749141911=" + (hora_actual.getHours().toString() - 11) +":00", |
| 14 | "entry.1827359679=" + (hora_actual.getHours().toString() - 10) +":00", |
| 15 | "entry.2115504093=" + any.toString() + '-' + mes.toString() + '-' + dia.toString(), |
| 16 | "entry.1077148310=Columna+" + document.getElementById("seientInput").value |
| 17 | ]; |
| 18 | linkOutput += "?"+ datamap[1] + "&" + datamap[2] + "&" + datamap[3] + "&" + datamap[0] + "&" + datamap[4]; |
| 19 | linkOutput += "&entry." + codisFiles[document.getElementById("seientInput").value.toUpperCase().charCodeAt(0) - 65] + "=Columna+" + document.getElementById("seientInput").value.charAt(1); |
| 20 | } |
| 21 | } |
| 22 | console.log(linkOutput); |
| 23 | } |