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

window.replace to avoid back button hell loop

parent 019cb406
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
.list_quiz_info { .list_quiz_info {
text-decoration: none; text-decoration: none;
margin-top: 10px; margin-top: 10px;
cursor: pointer;
display: block; display: block;
height: 70px; height: 70px;
width: 100%; width: 100%;
...@@ -196,7 +197,7 @@ ...@@ -196,7 +197,7 @@
<h2>Quiz list:</h2> <h2>Quiz list:</h2>
<ul> <ul>
{%for q in all_quizes %} {%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> <h1>{{q.quizInfo}}</h1>
<h3>{{q.quizCode}}</h3> <h3>{{q.quizCode}}</h3>
</a> </a>
...@@ -263,6 +264,9 @@ ...@@ -263,6 +264,9 @@
return this.style.display === 'table-row' ? 'none' : 'table-row'; return this.style.display === 'table-row' ? 'none' : 'table-row';
}); });
}); });
function switch_quiz(x) {
window.location.replace('/instructor/?quiz_id='+x);
}
</script> </script>
</body> </body>
</html> </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