{"id":2868,"date":"2024-08-16T07:45:02","date_gmt":"2024-08-16T06:45:02","guid":{"rendered":"https:\/\/beams-experiments.com\/?page_id=2868"},"modified":"2025-10-04T06:48:20","modified_gmt":"2025-10-04T05:48:20","slug":"post-task-questionnaire-bayes","status":"publish","type":"page","link":"https:\/\/beams-experiments.com\/index.php\/post-task-questionnaire-bayes\/","title":{"rendered":"Post-Task Questionnaire &#8211; Bayes"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <style>\n        body {\n            margin: 0;\n            padding: 10px;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            min-height: 100vh;\n            box-sizing: border-box;\n        }\n #progressBarContainer {\n            width: 90%;\n            background-color: #e0e0e0;\n            border-radius: 5px;\n            margin-top: 20px;\n        }\n        #progressBar {\n            height: 10px;\n            background-color: #007bff;\n            border-radius: 5px;\n            width: 44%;\n        }\n        #progressText {\n            text-align: center;\n            margin-top: 5px;\n        }\n        #submitForm {\n            display: block;\n            padding: 10px 20px;\n            background-color: #007bff;\n            color: white;\n            border: none;\n            border-radius: 5px;\n            cursor: not-allowed; \n            opacity: 0.5; \n            margin-top: 20px;\n            margin-bottom: 10px;\n            margin: 10px auto;\n            width: fit-content;\n        }\n        #submitForm:enabled {\n            cursor: pointer;\n            opacity: 1;\n        }\n        #progressBarContainer {\n            width: 90%;\n            background-color: #e0e0e0;\n            border-radius: 5px;\n            margin-top: 10px;\n        }\n        #progressBar {\n            height: 10px;\n            background-color: #007bff;\n            border-radius: 5px;\n            width: 100%;\n        }\n        #progressText {\n            text-align: center;\n            margin-top: 5px;\n        }\n    <\/style>\n<\/head>\n<body>\n    <form id=\"postTaskQuestionnaire\">\n        <!-- Qualitative Feedback -->\n       \n        <!-- Difficulty Level -->\n<p><b>In the following questions, use a scale from 1 to 5, where 1 = Not at all and 5 = Extremely High.<\/b><br>\n        <p><b>1. How difficult did you find the task?<\/b><br>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"difficulty\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"difficulty\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"difficulty\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"difficulty\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"difficulty\" value=\"5\"> 5<\/label>\n\n        <!-- Clarity Level -->\n        <p><b>2. How do you rate the clarity of your communication during this task?<\/b> <br>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"clarity\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"clarity\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"clarity\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"clarity\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"clarity\" value=\"5\"> 5<\/label>\n\n        <!-- Confidence Level -->\n       <p><b>3. How do you rate your level of confidence in expressing yourself during this task?<\/b> <br><\/p>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"confidence\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"confidence\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"confidence\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"confidence\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"confidence\" value=\"5\"> 5<\/label>\n\n        <!-- Active Listening Level -->\n        <p><b>4. How do you rate how supportive and encouraging you were during this task?<\/b> <br><\/p>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"supportiveness\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"supportiveness\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"supportiveness\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"supportiveness\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"supportiveness\" value=\"5\"> 5<\/label>\n\n        <!-- Professionalism Level -->\n        <p><b>5. How do you rate your level of friendliness during this task?<\/b> <br>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"friendliness\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"friendliness\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"friendliness\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"friendliness\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"friendliness\" value=\"5\"> 5<\/label>\n\n<p><b>6. During the previous year, to what extent do you feel that modules and other activities at Bayes have helped improve your communication skills?<\/b> <br> <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"bayes_comm_help\" value=\"1\"> 1<\/label> <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"bayes_comm_help\" value=\"2\"> 2<\/label> <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"bayes_comm_help\" value=\"3\"> 3<\/label> <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"bayes_comm_help\" value=\"4\"> 4<\/label> <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"bayes_comm_help\" value=\"5\"> 5<\/label>\n  \n<p><b>7. Apart from modules and other activities at Bayes, during the previous year, to what extent have you attempted to improve your communication skills?<\/b> <br>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"self_comm_attempt\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"self_comm_attempt\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"self_comm_attempt\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"self_comm_attempt\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"self_comm_attempt\" value=\"5\"> 5<\/label>\n\n        <p><b>8. Attention Check (please read carefully):<\/b><br>\n        Select the number &#8216;3&#8217; to demonstrate your attention to detail.<br>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"attentionCheck\" value=\"1\"> 1<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"attentionCheck\" value=\"2\"> 2<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"attentionCheck\" value=\"3\"> 3<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"attentionCheck\" value=\"4\"> 4<\/label>\n        <label style=\"margin-right:10px;\"><input type=\"radio\" name=\"attentionCheck\" value=\"5\"> 5<\/label>\n        <\/p>\n\n        <!-- Done button -->\n        <button type=\"button\" id=\"submitForm\" disabled>Done<\/button>\n    <\/form>\n\n    <script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n   <script>\n    $(document).ready(function() {\n\n        \/\/ Function to check if all questions have been answered\n        function checkAllQuestionsAnswered() {\n            var allAnswered = true;\n\n            \/\/ Check Radio Buttons\n            $('#postTaskQuestionnaire input[type=\"radio\"]').each(function() {\n                var name = $(this).attr('name');\n                if ($('input[name=\"' + name + '\"]:checked').length == 0) {\n                    allAnswered = false;\n                    return false; \/\/ Breaks the .each() loop\n                }\n            });\n\n            return allAnswered;\n        }\n\n        \/\/ Event listener for form inputs\n        $('#postTaskQuestionnaire input[type=\"radio\"], #postTaskQuestionnaire textarea').on('change keyup', function() {\n            if (checkAllQuestionsAnswered()) {\n                $('#submitForm').removeAttr('disabled').css('cursor', 'pointer').css('opacity', '1');\n            } else {\n                $('#submitForm').attr('disabled', 'disabled');\n            }\n        });\n\n        alert('Ensure you answer all the questions before pressing \"Done\"');\nif (localStorage.getItem('code')) {\n                \/\/alert('You already did this section!');\n                \/\/ window.location.href = 'https:\/\/beams-experiments.com\/index.php\/thanks-from-bayes\/';\n                             }\n        $('#submitForm').on('click', function() {\n            var formData = new FormData();\n\n            \/\/ Verify attention check question\n            var attentionCheckAnswer = $('input[name=\"attentionCheck\"]:checked').val();\n            var attentionCheck = attentionCheckAnswer === '3' ? 1 : 0;\n            formData.append('attentionCheck', attentionCheck);\n\n            \/\/ Append values directly from the form for the current questionnaire\n            formData.append('difficulty', $('[name=\"difficulty\"]:checked').val());\n            formData.append('clarity', $('[name=\"clarity\"]:checked').val());\n            formData.append('confidence', $('[name=\"confidence\"]:checked').val());\n            formData.append('supportiveness', $('[name=\"supportiveness\"]:checked').val());\n            formData.append('friendliness', $('[name=\"friendliness\"]:checked').val());\n            formData.append('bayes_comm_help', $('[name=\"bayes_comm_help\"]:checked').val());\n            formData.append('self_comm_attempt', $('[name=\"self_comm_attempt\"]:checked').val());\n\n\n            \/\/ Append values from local storage for the rest of the fields\n            var localStorageFields = [\n                'groupID', 'age', 'gender', 'year1Code', 'pathway', 'englishProficiency',\n                'aiFamiliarity', 'aiUsage', 'communicationSkills', 'chatLog', 'finalTotalTimeNotVisible', 'chatTime' \n            ];\n\n            localStorageFields.forEach(field => {\n                var value = localStorage.getItem(field) || '0';\n                formData.append(field, value);\n            });\n\n            \/\/ Send data to the server\n            var xhr = new XMLHttpRequest();\n            xhr.open('POST', 'https:\/\/beams-experiments.com\/AI_HE\/sendAllDetailsCommunication2.php', true);\n            xhr.onload = function() {\n                if (xhr.status === 200) {\n                    console.log('Submission successful.');\n\n                    \/\/ Generate a random 4-letter string\n                    var randomString = Math.random().toString(36).substring(2, 6).toUpperCase();\n\n                    \/\/ Assuming the response contains the userID\n                    var userID = xhr.responseText.trim();\n                    var code = `Bayes-Task2-${randomString}-${userID}`;\n\n                    \/\/ Save the unique code to local storage\n                    localStorage.setItem('code', code);\n\n                    console.log('Code is', code);\n\n                    \/\/ Send the unique code to the server\n                    var codeFormData = new FormData();\n                    codeFormData.append('userID', userID);\n                    codeFormData.append('code', code);\n\n                    var codeXhr = new XMLHttpRequest();\n                    codeXhr.open('POST', 'https:\/\/beams-experiments.com\/AI_HE\/sendCode2.php', true);\n                    codeXhr.onload = function() {\n                        if (codeXhr.status === 200) {\n                            console.log('Code submission successful.');\n                        } else {\n                            alert('An error occurred while sending the code. Please try again.');\n                        }\n                    };\n                    codeXhr.send(codeFormData);\n\n                   window.location.href = 'https:\/\/beams-experiments.com\/index.php\/thanks-from-bayes\/';\n                } else {\n                    alert('An error occurred. Please try again.');\n                }\n            };\n            xhr.send(formData);\n        });\n\n        function clearLocalStorage() {\n            \/\/localStorage.clear();\n        }\n    });\n<\/script>\n\n <!-- Progress Bar -->\n    <div id=\"progressBarContainer\">\n        <div id=\"progressBar\"><\/div>\n    <\/div>\n    <div id=\"progressText\">Page 6 out of 6<\/div>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>In the following questions, use a scale from 1 to 5, where 1 = Not at all and 5 = Extremely High. 1. How difficult did you find the task? 1 2 3 4 5 2. How do you rate the clarity of your communication during this task? 1 2 3 4 5 3. How [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"footnotes":""},"class_list":["post-2868","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/2868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/comments?post=2868"}],"version-history":[{"count":27,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/2868\/revisions"}],"predecessor-version":[{"id":6360,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/2868\/revisions\/6360"}],"wp:attachment":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/media?parent=2868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}