window.addEventListener("error",function(err){ var str=err.filename+":"+err.lineno+" "+err.error+": "+err.message; var xhr=new XMLHttpRequest(); xhr.open("POST","/zelfoverhoor/error"); xhr.send(str); }); var questionsets=null; var currentlyEditing=null; function getQuestionSets(){ var xhr=new XMLHttpRequest(); xhr.onreadystatechange=function(){ if(xhr.readyState==4){ questionsets=JSON.parse(xhr.responseText); updateQuestionSetsList(); } }; xhr.open("GET","/zelfoverhoor/docent/sets"); xhr.responseType="text"; xhr.send(); } function updateQuestionSetsList(){ var tbody=document.getElementById("qsets"); clearElement(tbody); if(questionsets.length==0){ var tr=document.createElement("tr"); var td=document.createElement("td"); td.appendChild(document.createTextNode("Nog geen vragensets...")); td.setAttribute("colspan","4"); tr.appendChild(td); tbody.appendChild(tr); } for(var i=0;i