{"id":10701,"date":"2025-09-16T20:11:10","date_gmt":"2025-09-16T20:11:10","guid":{"rendered":"https:\/\/mindup.vn\/?page_id=10701"},"modified":"2025-09-16T20:28:47","modified_gmt":"2025-09-16T20:28:47","slug":"disc-test","status":"publish","type":"page","link":"https:\/\/mindup.vn\/vi\/disc-test\/","title":{"rendered":"DISC Test"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"10701\" class=\"elementor elementor-10701\" data-elementor-settings=\"{&quot;element_pack_global_tooltip_width&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_width_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_width_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_padding&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_padding_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_padding_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true}}\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-965e726 e-flex e-con-boxed e-con e-parent\" data-id=\"965e726\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8fe9451 elementor-widget elementor-widget-shortcode\" data-id=\"8fe9451\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><br \/>\n<b>Warning<\/b>:  Undefined variable $requested_type in <b>\/home\/u502250247\/domains\/mindup.vn\/public_html\/wp-content\/plugins\/disc-assessment\/templates\/disc-test.php<\/b> on line <b>240<\/b><br \/>\n\n<div id=\"disc-test-container\" class=\"disc-test-wrapper\">\n    <style>\n        :root { --primary:#264653; --accent:#e9c46a; --text:#000; --bg:#fff; --muted:#6b7280; --border:#e5e7eb; }\n        .disc-test-wrapper { max-width: 800px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); }\n        .disc-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }\n        .disc-progress { width: 100%; height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: 16px 0; }\n        .disc-progress-bar { height: 100%; background: var(--accent); transition: width 0.3s ease; }\n        .disc-question { font-size: 20px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; color: var(--primary); }\n        .disc-description { color: var(--muted); margin-bottom: 24px; }\n        .disc-options { display: flex; flex-direction: column; gap: 16px; }\n        .disc-option { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; background: var(--bg); }\n        .disc-option:hover { border-color: var(--primary); background: rgba(233,196,106,0.12); }\n        .disc-option.selected { border-color: var(--primary); background: rgba(233,196,106,0.18); }\n        .disc-option input[type=\"radio\"] { margin: 0; }\n        .disc-option-content { flex: 1; }\n        .disc-option-title { font-weight: 600; margin-bottom: 4px; }\n        .disc-option-desc { font-size: 14px; color: var(--muted); }\n        .disc-navigation { display: flex; justify-content: space-between; margin-top: 24px; }\n        .disc-btn { padding: 12px 24px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s; }\n        .disc-btn-primary { background: var(--primary); color: #fff; }\n        .disc-btn-primary:hover:not(:disabled) { background: #1f3e48; }\n        .disc-btn-secondary { background: #fff; color: var(--primary); border: 1px solid var(--primary); }\n        .disc-btn-secondary:hover:not(:disabled) { background: rgba(233,196,106,0.12); }\n        .disc-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n        .disc-complete { text-align: center; }\n        .disc-complete h2 { color: var(--primary); margin-bottom: 16px; }\n        .disc-error { background: #fff0f0; color: #000; padding: 16px; border-radius: 12px; margin: 20px 0; }\n        .disc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }\n        .disc-counter { color: var(--muted); font-size: 14px; }\n        .disc-media { margin-bottom: 16px; }\n        .disc-media img { max-width: 100%; height: auto; display: block; border-radius: 12px; }\n    <\/style>\n\n    <div id=\"disc-test-content\">\n                    <div class=\"disc-card\">\n                <h2>Assessment<\/h2>\n                <p>Please provide your invitation link to access the assessment.<\/p>\n            <\/div>\n            <\/div>\n\n    <script>\n        let currentQuestion = 0;\n        let responses = [];\n        let questions = [];\n        let invitationId = 0;\n        let hasFailed = false;\n        let proctorActive = false;\n        let assessmentType = 'DISC';\n        let overviewUrl = \"https:\/\/mindup.vn\/vi\/disc-test\/?invitation=0\";\n        function deviceFingerprint() {\n            try {\n                const parts = [navigator.userAgent, navigator.platform, navigator.language, screen.width + 'x' + screen.height, String(screen.colorDepth)];\n                return btoa(unescape(encodeURIComponent(parts.join('|'))));\n            } catch(e) { return String(Date.now()); }\n        }\n        function bindDevice() {\n            if (!invitationId) return;\n            if (typeof window.disc_ajax === 'undefined' || !disc_ajax.ajax_url) { return; }\n            const fd = new FormData();\n            fd.append('action','disc_bind_device');\n            fd.append('invitation_id', invitationId);\n            fd.append('fp', deviceFingerprint());\n            fd.append('nonce', disc_ajax.nonce);\n            fetch(disc_ajax.ajax_url, { method:'POST', body: fd })\n              .then(r => r.json()).then(data => {\n                if (!data.success && data.data === 'failed') { showFailed('Failed \u2013 Unauthorized Activity: Test opened from another device'); }\n              }).catch(()=>{});\n        }\n        function failAssessment(reason) {\n            if (hasFailed || !invitationId) return;\n            hasFailed = true;\n            const url = disc_ajax.ajax_url;\n            const fd = new FormData();\n            fd.append('action','disc_fail_invitation');\n            fd.append('invitation_id', invitationId);\n            fd.append('reason', reason);\n            fd.append('nonce', disc_ajax.nonce);\n            if (navigator.sendBeacon) {\n                const beaconData = new URLSearchParams();\n                beaconData.append('action','disc_fail_invitation');\n                beaconData.append('invitation_id', invitationId);\n                beaconData.append('reason', reason);\n                beaconData.append('nonce', disc_ajax.nonce);\n                navigator.sendBeacon(url, beaconData);\n            } else {\n                fetch(url, { method:'POST', body: fd }).catch(()=>{});\n            }\n            const reasonText = {\n                'tab_change_or_minimize': 'Failed \u2013 Unauthorized Activity: Tab changed or window minimized',\n                'window_blur_or_app_switch': 'Failed \u2013 Unauthorized Activity: Switched to another app',\n                'browser_closed_or_navigated': 'Failed \u2013 Unauthorized Activity: Browser closed or navigation detected',\n                'browser_beforeunload': 'Failed \u2013 Unauthorized Activity: Attempt to close or reload',\n                'network_offline': 'Failed \u2013 Unauthorized Activity: Network disconnected',\n                'device_mismatch': 'Failed \u2013 Unauthorized Activity: Test opened from another device'\n            };\n            showFailed(reasonText[reason] || 'Failed \u2013 Unauthorized Activity Detected');\n        }\n        function showFailed(message) {\n            document.getElementById('disc-test-content').innerHTML = `\n                <div class=\"disc-card\">\n                    <div class=\"disc-error\">\n                        <h3>${message}<\/h3>\n                        <p>Your assessment has been terminated. Please contact your company for a new invitation.<\/p>\n                    <\/div>\n                <\/div>\n            `;\n        }\n        document.addEventListener('visibilitychange', () => { if (proctorActive && document.hidden) failAssessment('tab_change_or_minimize'); });\n        window.addEventListener('blur', () => { if (proctorActive) failAssessment('window_blur_or_app_switch'); });\n        window.addEventListener('pagehide', () => { if (proctorActive) failAssessment('browser_closed_or_navigated'); });\n        window.addEventListener('beforeunload', () => { if (proctorActive) failAssessment('browser_beforeunload'); });\n        window.addEventListener('offline', () => { if (proctorActive) failAssessment('network_offline'); });\n        \n        \/\/ Initialize device binding on load\n        if (invitationId) {\n            bindDevice();\n        }\n        \n        function startTest(invitationId) {\n            bindDevice();\n            if (!Array.isArray(questions) || questions.length === 0) {\n                document.getElementById('disc-test-content').innerHTML = `\n                    <div class=\"disc-card\">\n                        <div class=\"disc-error\">\n                            <h3>No questions available<\/h3>\n                            <p>Please contact your company to resolve this.<\/p>\n                        <\/div>\n                    <\/div>\n                `;\n                return;\n            }\n            proctorActive = true;\n            showQuestion(0);\n        }\n        \n        function generateQuestionOptions(question, selectedValue) {\n            const questionType = question.question_type || 'rating';\n            const options = question.options ? question.options.split('|') : [];\n            switch (questionType) {\n                case 'word_selection':\n                    return generateWordSelectionOptions(options, selectedValue);\n                case 'agree_disagree':\n                    return generateAgreeDisagreeOptions(selectedValue);\n                case 'most_least':\n                    return generateMostLeastOptions(options, selectedValue);\n                case 'four_point':\n                    return generateFourPointOptions(selectedValue);\n                case 'multiple_choice':\n                case 'single_choice':\n                    return generateChoiceOptions(options, selectedValue);\n                case 'true_false':\n                    return generateChoiceOptions(['True','False'], selectedValue);\n                default:\n                    if (options.length > 0) { return generateChoiceOptions(options, selectedValue); }\n                    return generateRatingOptions(selectedValue);\n            }\n        }\n        \n        function generateWordSelectionOptions(options, selectedValue) {\n            let html = '';\n            options.forEach((option, index) => {\n                const value = index + 1;\n                html += `\n                    <label class=\"disc-option ${selectedValue == value ? 'selected' : ''}\" onclick=\"selectOption(this, ${value})\">\n                        <input type=\"radio\" name=\"response\" value=\"${value}\" ${selectedValue == value ? 'checked' : ''}>\n                        <div class=\"disc-option-content\">\n                            <div class=\"disc-option-title\">${option.trim()}<\/div>\n                        <\/div>\n                    <\/label>\n                `;\n            });\n            return html;\n        }\n        \n        function generateAgreeDisagreeOptions(selectedValue) {\n            const options = [\n                { value: 1, title: 'Strongly Disagree', desc: 'This does not describe me at all' },\n                { value: 2, title: 'Disagree', desc: 'This rarely describes me' },\n                { value: 3, title: 'Neutral', desc: 'This sometimes describes me' },\n                { value: 4, title: 'Agree', desc: 'This often describes me' },\n                { value: 5, title: 'Strongly Agree', desc: 'This always describes me' }\n            ];\n            \n            let html = '';\n            options.forEach(option => {\n                html += `\n                    <label class=\"disc-option ${selectedValue == option.value ? 'selected' : ''}\" onclick=\"selectOption(this, ${option.value})\">\n                        <input type=\"radio\" name=\"response\" value=\"${option.value}\" ${selectedValue == option.value ? 'checked' : ''}>\n                        <div class=\"disc-option-content\">\n                            <div class=\"disc-option-title\">${option.value} - ${option.title}<\/div>\n                            <div class=\"disc-option-desc\">${option.desc}<\/div>\n                        <\/div>\n                    <\/label>\n                `;\n            });\n            return html;\n        }\n        \n        function generateMostLeastOptions(options, selectedValue) {\n            let html = '';\n            options.forEach((option, index) => {\n                const value = index + 1;\n                html += `\n                    <label class=\"disc-option ${selectedValue == value ? 'selected' : ''}\" onclick=\"selectOption(this, ${value})\">\n                        <input type=\"radio\" name=\"response\" value=\"${value}\" ${selectedValue == value ? 'checked' : ''}>\n                        <div class=\"disc-option-content\">\n                            <div class=\"disc-option-title\">${option.trim()}<\/div>\n                        <\/div>\n                    <\/label>\n                `;\n            });\n            return html;\n        }\n        \n        function generateFourPointOptions(selectedValue) {\n            const options = [\n                { value: 1, title: 'Strongly Disagree' },\n                { value: 2, title: 'Slightly Disagree' },\n                { value: 3, title: 'Slightly Agree' },\n                { value: 4, title: 'Strongly Agree' }\n            ];\n            \n            let html = '';\n            options.forEach(option => {\n                html += `\n                    <label class=\"disc-option ${selectedValue == option.value ? 'selected' : ''}\" onclick=\"selectOption(this, ${option.value})\">\n                        <input type=\"radio\" name=\"response\" value=\"${option.value}\" ${selectedValue == option.value ? 'checked' : ''}>\n                        <div class=\"disc-option-content\">\n                            <div class=\"disc-option-title\">${option.value} - ${option.title}<\/div>\n                        <\/div>\n                    <\/label>\n                `;\n            });\n            return html;\n        }\n\n        function generateChoiceOptions(options, selectedValue) {\n            let html = '';\n            options.forEach((option, index) => {\n                const value = index + 1;\n                html += `\n                    <label class=\"disc-option ${selectedValue == value ? 'selected' : ''}\" onclick=\"selectOption(this, ${value})\">\n                        <input type=\"radio\" name=\"response\" value=\"${value}\" ${selectedValue == value ? 'checked' : ''}>\n                        <div class=\"disc-option-content\">\n                            <div class=\"disc-option-title\">${String(option).trim()}<\/div>\n                        <\/div>\n                    <\/label>\n                `;\n            });\n            return html;\n        }\n        \n        function generateRatingOptions(selectedValue) {\n            const options = [\n                { value: 1, title: 'Strongly Disagree', desc: 'This does not describe me at all' },\n                { value: 2, title: 'Disagree', desc: 'This rarely describes me' },\n                { value: 3, title: 'Neutral', desc: 'This sometimes describes me' },\n                { value: 4, title: 'Agree', desc: 'This often describes me' },\n                { value: 5, title: 'Strongly Agree', desc: 'This always describes me' }\n            ];\n            \n            let html = '';\n            options.forEach(option => {\n                html += `\n                    <label class=\"disc-option ${selectedValue == option.value ? 'selected' : ''}\" onclick=\"selectOption(this, ${option.value})\">\n                        <input type=\"radio\" name=\"response\" value=\"${option.value}\" ${selectedValue == option.value ? 'checked' : ''}>\n                        <div class=\"disc-option-content\">\n                            <div class=\"disc-option-title\">${option.value} - ${option.title}<\/div>\n                            <div class=\"disc-option-desc\">${option.desc}<\/div>\n                        <\/div>\n                    <\/label>\n                `;\n            });\n            return html;\n        }\n\n        function showQuestion(questionIndex) {\n            currentQuestion = questionIndex;\n            const question = questions[questionIndex];\n            const progress = ((questionIndex + 1) \/ questions.length) * 100;\n            \n            \/\/ Check if we have a previous response for this question\n            const previousResponse = responses.find(r => r.questionId == question.id);\n            const selectedValue = previousResponse ? previousResponse.value : null;\n            \n            \/\/ Get description based on question type\n            const questionType = question.question_type || 'rating';\n            const hasOptions = !!(question.options && question.options.split('|').length > 0);\n            let description = '';\n            switch (questionType) {\n                case 'word_selection':\n                    description = 'Choose the option that best describes you:';\n                    break;\n                case 'agree_disagree':\n                    description = 'Rate how well this statement describes you:';\n                    break;\n                case 'most_least':\n                    description = 'Select the option that is most important to you:';\n                    break;\n                case 'four_point':\n                    description = 'Rate how well this statement describes you:';\n                    break;\n                case 'multiple_choice':\n                case 'single_choice':\n                    description = 'Choose one option:';\n                    break;\n                case 'true_false':\n                    description = 'Select True or False:';\n                    break;\n                default:\n                    description = hasOptions ? 'Choose one option:' : 'Rate how well this statement describes you on a scale of 1-5:';\n            }\n            \n            const html = `\n                <div class=\"disc-card\">\n                    <div class=\"disc-header\">\n                        <h3>${assessmentType} Assessment<\/h3>\n                        <div class=\"disc-counter\"><span id=\"timerText\">--:--<\/span> &nbsp;|&nbsp; ${questionIndex + 1} of ${questions.length}<\/div>\n                    <\/div>\n                    <div class=\"disc-progress\">\n                        <div class=\"disc-progress-bar\" style=\"width: ${progress}%\"><\/div>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"disc-card\">\n                    ${question.image_url ? `<div class=\\\"disc-media\\\"><img src=\\\"${question.image_url}\\\" alt=\\\"\\\"><\/div>` : ''}\n                    <div class=\"disc-question\">${question.question_text}<\/div>\n                    <div class=\"disc-description\">${description}<\/div>\n                    \n                    <div class=\"disc-options\">\n                        ${generateQuestionOptions(question, selectedValue)}\n                    <\/div>\n                    \n                    <div class=\"disc-navigation\">\n                        <button class=\"disc-btn disc-btn-secondary\" onclick=\"previousQuestion()\" ${questionIndex === 0 ? 'disabled' : ''}>\n                            Previous\n                        <\/button>\n                        <button class=\"disc-btn disc-btn-primary\" id=\"next-btn\" onclick=\"nextQuestion()\" ${selectedValue ? '' : 'disabled'}>\n                            ${questionIndex === questions.length - 1 ? 'Complete' : 'Next'}\n                        <\/button>\n                    <\/div>\n                <\/div>\n            `;\n            \n            document.getElementById('disc-test-content').innerHTML = html;\n        }\n        \n        function selectOption(element, value) {\n            \/\/ Remove selected class from all options\n            document.querySelectorAll('.disc-option').forEach(opt => opt.classList.remove('selected'));\n            \/\/ Add selected class to clicked option\n            element.classList.add('selected');\n            \/\/ Check the radio button\n            element.querySelector('input[type=\"radio\"]').checked = true;\n            \/\/ Enable next button\n            document.getElementById('next-btn').disabled = false;\n        }\n        \n        function nextQuestion() {\n            const selectedValue = document.querySelector('input[name=\"response\"]:checked');\n            if (!selectedValue) {\n                alert('Please select an answer before continuing.');\n                return;\n            }\n            \n            \/\/ Store response\n            responses[currentQuestion] = {\n                questionId: questions[currentQuestion].id,\n                value: parseInt(selectedValue.value)\n            };\n            \n            if (currentQuestion < questions.length - 1) {\n                showQuestion(currentQuestion + 1);\n            } else {\n                \/\/ Validate all responses before submitting\n                if (responses.length === questions.length) {\n                    if (confirm('Are you ready to submit your assessment? You cannot change your answers once submitted.')) {\n                        completeTest();\n                    }\n                } else {\n                    alert('Please answer all questions before submitting.');\n                }\n            }\n        }\n        \n        function previousQuestion() {\n            if (currentQuestion > 0) {\n                \/\/ Don't remove responses, just go back\n                showQuestion(currentQuestion - 1);\n            }\n        }\n        \n        function completeTest() {\n            \/\/ Show loading state\n            document.getElementById('disc-test-content').innerHTML = `\n                <div class=\"disc-card\" style=\"text-align: center; padding: 60px;\">\n                    <div class=\"disc-loading\">\n                        <div class=\"disc-spinner\"><\/div>\n                        <p>Submitting your assessment...<\/p>\n                    <\/div>\n                <\/div>\n            `;\n            \n            \/\/ Submit responses via AJAX\n            const formData = new FormData();\n            formData.append('action', 'submit_assessment');\n            formData.append('invitation_id', invitationId);\n            formData.append('assessment_type', assessmentType);\n            formData.append('responses', JSON.stringify(responses));\n            formData.append('nonce', disc_ajax.nonce);\n            \n            fetch(disc_ajax.ajax_url, {\n                method: 'POST',\n                body: formData\n            })\n            .then(response => response.json())\n            .then(data => {\n                if (data.success) {\n                    showCompletion(data.data && data.data.scores ? data.data.scores : null);\n                } else {\n                    showError('Error submitting test: ' + (data.data || 'Unknown error'));\n                }\n            })\n            .catch(error => {\n                console.error('Error:', error);\n                showError('Error submitting test. Please try again.');\n            });\n        }\n        \n        function showError(message) {\n            document.getElementById('disc-test-content').innerHTML = `\n                <div class=\"disc-card\">\n                    <div class=\"disc-error\">\n                        <h3>Error<\/h3>\n                        <p>${message}<\/p>\n                        <button class=\"disc-btn disc-btn-primary\" onclick=\"location.reload()\">\n                            Try Again\n                        <\/button>\n                    <\/div>\n                <\/div>\n            `;\n        }\n        \n        function showCompletion(scores) {\n            const html = `\n                <div class=\"disc-card disc-complete\">\n                    <h2>Assessment Complete!<\/h2>\n                    <p>Your results have been submitted successfully.<\/p>\n                    <p style=\"color: #5f6368; margin-top: 16px;\">\n                        Your employer will review your results and may contact you with next steps.\n                    <\/p>\n                    <div style=\"margin-top: 24px;\">\n                        <a href=\"${overviewUrl}\" class=\"disc-btn disc-btn-primary\">Back to Overview<\/a>\n                    <\/div>\n                <\/div>\n            `;\n            \n            document.getElementById('disc-test-content').innerHTML = html;\n        }\n    <\/script>\n<\/div>\n<script>\n(function(){\n    var remaining = 0;\n    var expired = false;\n    function fmt(s){\n        var h = Math.floor(s\/3600); s%=3600;\n        var m = Math.floor(s\/60); var sec = s%60;\n        var hh = h>0 ? String(h).padStart(2,'0') + ':' : '';\n        return hh + String(m).padStart(2,'0') + ':' + String(sec).padStart(2,'0');\n    }\n    function disableButtons(){\n        document.querySelectorAll('.disc-btn').forEach(function(b){ b.disabled = true; });\n    }\n    function tick(){\n        var tEl = document.getElementById('timerText');\n        if (!tEl) { setTimeout(tick, 1000); return; }\n        if (remaining <= 0){\n            if (!expired){\n                expired = true;\n                disableButtons();\n                if (typeof responses !== 'undefined' && responses && responses.length > 0){\n                    if (typeof completeTest === 'function') completeTest();\n                } else {\n                    var fd = new FormData();\n                    fd.append('action', 'disc_lock_invitation');\n                    fd.append('invitation_id', 0);\n                    fd.append('nonce', 'cca0c70a2c');\n                    fetch('https:\/\/mindup.vn\/wp-admin\/admin-ajax.php', { method: 'POST', body: fd })\n                    .finally(function(){\n                        var container = document.getElementById('disc-test-content');\n                        if (container) container.innerHTML = '<div class=\"disc-card\"><h3 style=\"color:#dc2626;margin:0;\">Time Expired<\/h3><p>You can no longer continue this assessment.<\/p><\/div>';\n                    });\n                }\n            }\n            return;\n        }\n        tEl.textContent = fmt(remaining);\n        remaining--;\n        setTimeout(tick, 1000);\n    }\n    if (remaining > 0){\n        setTimeout(tick, 1000);\n    }\n})();\n<\/script>\n<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"hidden-magic-login-form\">[magic_login_form]<\/div>","protected":false},"excerpt":{"rendered":"<p>[magic_login_form]<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-10701","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/pages\/10701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/comments?post=10701"}],"version-history":[{"count":7,"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/pages\/10701\/revisions"}],"predecessor-version":[{"id":10711,"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/pages\/10701\/revisions\/10711"}],"wp:attachment":[{"href":"https:\/\/mindup.vn\/vi\/wp-json\/wp\/v2\/media?parent=10701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}