From f84960326a9825ef69a9b1a393a2deab6963102a Mon Sep 17 00:00:00 2001 From: Ruben Ramirez Date: Fri, 4 Apr 2025 07:43:25 -0500 Subject: [PATCH] FIX: Ensure assessment.js loads by uncommenting wp_footer() in assessment-shell.php --- public/js/assessment.js | 10 ---------- public/templates/assessment-shell.php | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/public/js/assessment.js b/public/js/assessment.js index 2a2f27f..5f2fc9b 100644 --- a/public/js/assessment.js +++ b/public/js/assessment.js @@ -6,11 +6,9 @@ */ (function($) { 'use strict'; - console.log('assessment.js loaded'); // Added for debugging $(function() { // Document Ready console.log('Assessment script loaded.'); - console.log('Localized Vars Check:', typeof quiztech_assessment_vars); // Added for debugging // Check if localized data is available if (typeof quiztech_assessment_vars === 'undefined') { @@ -88,7 +86,6 @@ * Transitions the UI from the landing/pre-screening view to the assessment view. */ function startAssessmentUI() { - console.log('startAssessmentUI() function entered.'); // Added for debugging $landingSection.slideUp(); $assessmentSection.slideDown(); if (totalQuestions > 0) { @@ -109,17 +106,12 @@ // --- Event Handlers --- // Handle "Begin Assessment" button click - console.log('Attaching click handler to #quiztech-begin-assessment'); // Added for debugging $beginAssessmentButton.on('click', function() { - console.log('Begin Assessment button clicked.'); // Added for debugging - console.log('Localized Vars Content:', quiztech_assessment_vars); // Added for debugging var $button = $(this); clearMessage($landingMessages); // Clear previous messages // Check if pre-screening form exists and is visible - console.log('Checking pre-screening needed...'); // Added for debugging var needsPreScreening = $prescreeningForm.length > 0 && $prescreeningSection.is(':visible'); - console.log('Pre-screening check result:', needsPreScreening); // Added for debugging if (needsPreScreening) { // Validate pre-screening form before submitting @@ -175,9 +167,7 @@ }); } else { - console.log('Entering direct assessment start logic (else block)...'); // Added for debugging // No pre-screening needed, directly start the assessment UI - console.log('Attempting to call startAssessmentUI() from else block...'); // Added for debugging startAssessmentUI(); } }); diff --git a/public/templates/assessment-shell.php b/public/templates/assessment-shell.php index 4f0e620..c6108ea 100644 --- a/public/templates/assessment-shell.php +++ b/public/templates/assessment-shell.php @@ -234,6 +234,6 @@ $show_pre_screening = ! empty( $pre_screening_questions ) && is_array( $pre_scre - + \ No newline at end of file