Posts by Hariharan Gnanasekaran

Implementing Auto Submit Assessment on Timer Expiry in Oracle APEX

Introduction / Issue In an online assessment, candidates are given a fixed duration to complete the exam. If the timer expires before the candidate clicks the Submit button, the assessment may remain incomplete and the entered responses may not be saved. To overcome this issue, an automatic submission mechanism can be implemented. Why We Need to Do / Cause of the Issue During an online examination, candidates may forget to submit the assessment, close the browser, or lose track of the remaining time. This can result in incomplete submissions and loss of responses. Implementing an auto-submit feature ensures that all attempted answers are saved and evaluated when the allotted time expires. How Do We Solve Step 1: Create a Timer Region Create a Static Content region to display the countdown timer on the assessment page. The timer becomes visible as soon as the candidate starts the exam. <div class="exam-timer">     ⏳ Time Left :     <span id="timer">02:00</span> </div> Step 2: Start the Countdown Timer On Page Load, use JavaScript to start the timer. Store the remaining time in sessionStorage so that the timer continues correctly even if the page refreshes. var timeLeft = sessionStorage.getItem("examTimer"); if(timeLeft === null){     timeLeft = 120; }else{     timeLeft = parseInt(timeLeft); } Step 3: Save Candidate Answers In the Dynamic Content region, save each selected option using sessionStorage. sessionStorage.setItem(     "Q" + apex.item("P5_CURRENT_QN").getValue(),     optionId ); Step 4: Restore Selected Answers When navigating between questions, retrieve the saved answer from sessionStorage and automatically check the previously selected option. var selectedOption = sessionStorage.getItem("Q" + currentQn); Step 5: Auto Submit on Timer Expiry…

Read More

Building an AI-Powered Question Generator in Oracle APEX

Introduction/ Issue:   Creating interview or assessment questions manually is a time consuming process, especially when maintaining a large question bank for multiple technical skills such as SQL, PL/SQL, Python, Java, and…

Read More