Commit 16b3f7a5 authored by Samarth Joshi's avatar Samarth Joshi

window.replace to avoid back button hell loop

parent 019cb406
......@@ -93,6 +93,7 @@
.list_quiz_info {
text-decoration: none;
margin-top: 10px;
cursor: pointer;
display: block;
height: 70px;
width: 100%;
......@@ -196,7 +197,7 @@
<h2>Quiz list:</h2>
<ul>
{%for q in all_quizes %}
<li><a href="/instructor/?quiz_id={{quiz.quizId}}" class="list_quiz_info">
<li><a onclick="switch_quiz({{q.quizId}})" class="list_quiz_info">
<h1>{{q.quizInfo}}</h1>
<h3>{{q.quizCode}}</h3>
</a>
......@@ -263,6 +264,9 @@
return this.style.display === 'table-row' ? 'none' : 'table-row';
});
});
function switch_quiz(x) {
window.location.replace('/instructor/?quiz_id='+x);
}
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment