@@ -376,19 +376,24 @@ <h3 class="mb-3">Test details</h6>
376376
377377 < div
378378 style ="margin-bottom: 1.5rem; display: flex; gap: 0.5rem; justify-content: end; flex-wrap: wrap; ">
379- < button class ="btn btn-primary button " id ="start-test-btn ">
380- < i class ="bi bi-play-fill me-1 "> </ i >
381- Start Test
382- </ button >
383- < button class ="btn btn-outline-secondary me-2 button " id ="view-submission-btn ">
379+
380+
381+ < button class ="btn me-2 button " id ="view-submission-btn ">
384382 View Submission
385383 </ button >
386- < button class ="btn btn-outline-secondary me-2 button " id ="hide-submission-btn ">
384+ < button class ="btn me-2 button " id ="hide-submission-btn ">
387385 Hide Submission
388386 </ button >
389- < button class ="btn btn-primary button " id ="retry-test-btn ">
387+ < button class ="btn btn-outline-secondary button " id ="retry-test-btn ">
390388 < i class ="bi bi-arrow-clockwise me-1 "> </ i >
391- Retry
389+ Retake Test
390+ </ button >
391+ < button class ="btn btn-outline-secondary button " id ="go-to-overview-btn ">
392+ Go to Overview
393+ </ button >
394+ < button class ="btn btn-primary button " id ="start-test-btn ">
395+ < i class ="bi bi-play-fill me-1 "> </ i >
396+ Start Test
392397 </ button >
393398
394399 </ div >
@@ -489,6 +494,7 @@ <h3 class="mb-3">Test details</h6>
489494 case 'new_test' :
490495 document . querySelector ( '.overview-card' ) . style . display = 'block' ;
491496 document . getElementById ( 'start-test-btn' ) . style . display = 'block' ;
497+
492498 break ;
493499
494500 case 'taking_test' :
@@ -510,6 +516,10 @@ <h3 class="mb-3">Test details</h6>
510516 document . getElementById ( 'retry-test-btn' ) . style . display = 'block' ;
511517 document . getElementById ( 'view-submission-btn' ) . style . display = 'block' ;
512518
519+ // set oveview-btn as primary button
520+ document . getElementById ( 'go-to-overview-btn' ) . classList . add ( 'btn-primary' ) ;
521+ document . getElementById ( 'go-to-overview-btn' ) . classList . remove ( 'btn-outline-secondary' ) ;
522+
513523
514524 RenderSubmissionResult ( data ) ;
515525 break ;
@@ -742,12 +752,13 @@ <h3 class="mb-3">Test details</h6>
742752 alert ( "Error submitting quiz: " + err . message ) ;
743753 } finally {
744754 HideLoadingState ( loadingEl , submitBtn ) ;
755+ window . academyContext ?. refreshData ( ) ;
745756 }
746757 }
747758
748759 // Event Listeners
749760 function HandleGoBack ( ) {
750- window . history . back ( ) ;
761+ window . academyContext ?. Router ? .back ( ) ;
751762 }
752763
753764 document . getElementById ( "go-back" ) . addEventListener ( "click" , HandleGoBack ) ;
@@ -761,6 +772,10 @@ <h3 class="mb-3">Test details</h6>
761772 showState ( 'submitted_test' ) ;
762773 } ) ;
763774
775+ document . getElementById ( "go-to-overview-btn" ) . addEventListener ( "click" , ( ) => {
776+ window . academyContext ?. Router ?. back ( ) ;
777+ } ) ;
778+
764779
765780 // get the prod build param
766781 const isProdBuild = build === "production"
0 commit comments