{"id":54629,"date":"2024-05-29T00:17:49","date_gmt":"2024-05-29T00:17:49","guid":{"rendered":"https:\/\/myedme.com\/login\/?p=54629"},"modified":"2024-05-29T19:58:24","modified_gmt":"2024-05-29T19:58:24","slug":"test","status":"publish","type":"post","link":"https:\/\/myedme.com\/login\/test\/","title":{"rendered":"Test"},"content":{"rendered":"\n<div style=\"text-align: right;\"><b><span style=\"background-color:yellow\">You are not logged in! Please log in so we can accept your image.<br>Click \"My Account!\" above or use myedme.com\/login\/my-account)<\/span><\/b><\/div>\n\n\n\n<div class=\"row\">\n<p>Do you have a goal for solving these math problems? If so, what is it?<\/p><\/div>\n<p>Describe your goal. You may type in the space below or use your device to record and upload a voice<br>recording.<\/p>\n<form><input id=\"stem\" style=\"display: none;\" name=\"stem\" type=\"text\" value=\"Describe your strategy. You may type in the space below or use your device to record and upload a voice recording.\"><br><input id=\"score1\" style=\"display: none;\" name=\"score1\" type=\"text\" value=\"88\"><br><input id=\"questionNum\" style=\"display: none;\" name=\"questionNum\" type=\"text\" value=\"2\"><br><input id=\"chapterName\" style=\"display: none;\" name=\"chapterName\" type=\"text\" value=\"Setting up The Road Runner Race\"><br><input id=\"queId\" style=\"display: none;\" name=\"queId\" type=\"text\" value=\"SRL01a\"><br><input id=\"contextGrp1\" style=\"display: none;\" name=\"contextGrp1\" type=\"text\" value=\"4OA3\"><br><input id=\"contextGrp2\" style=\"display: none;\" name=\"contextGrp2\" type=\"text\" value=\"undefined\"><br><input id=\"keys1\" style=\"display: none;\" name=\"keys1\" type=\"text\" value=\" \"><br><input id=\"keys2\" style=\"display: none;\" name=\"keys2\" type=\"text\" value=\"\"><br><input id=\"answerId\" style=\"display: none;\" name=\"answerId\" type=\"text\" value=\"\"><br><input id=\"queFormat\" style=\"display: none;\" name=\"queFormat\" type=\"text\" value=\"3\"><br><input name=\"action\" type=\"hidden\" value=\"edme_score_tryout\"><br><input id=\"nextAddress\" style=\"display: none;\" name=\"nextAddress\" type=\"text\" value=\"http:\/\/www.myedme.com\/login\/SRL01b\"><br><input id=\"stuAns3\" name=\"stuAns3\" size=\"145\" type=\"text\" value=\"\"><br><input id=\"stuAns2\" style=\"display: none;\" name=\"stuAns2\" type=\"text\" value=\"99\"><br><input id=\"score2\" style=\"display: none;\" name=\"score2\" type=\"text\" value=\"99\"><br>\n<p><input id=\"publicKey1\" style=\"display: none;\" name=\"publicKey1\" type=\"text\" value=\"Your answer is not on our list. But, we are still determining all possible correct answers.\"><br><input id=\"publicKey2\" style=\"display: none;\" name=\"publicKey2\" type=\"text\" value=\"Your evidence is not on our list. But, we are still determining all possible correct answers.\"><br><input id=\"savebutton\" type=\"submit\" value=\"Next Question\"><\/p>\n<\/form>\n<p><\/p>\n<section class=\"main-controls\"><canvas class=\"visualizer\" height=\"60px\"><\/canvas>\n<div id=\"buttons\"><button class=\"record\">Record<\/button><br><button class=\"stop\">Stop<\/button><\/div>\n<\/section>\n<p id=\"successText\" style=\"display: hidden;\">Thanks! You can play the clip or move to the next question below.<\/p>\n<section class=\"sound-clips\"><\/section>\n<p><\/p>\n<p><label for=\"toggle\">\u2754<\/label><br><input id=\"toggle\" type=\"checkbox\"><\/p>\n<aside>\n<h2>Information<\/h2>\n<p>Web dictaphone is built using&#8230;. Media streams.<\/p>\n<\/aside>\n<\/div>\n<div style=\"text-align: right;\"><b><span style=\"background-color:yellow\">You are not logged in! Please log in so we can accept your image.<br>Click \"My Account!\" above or use myedme.com\/login\/my-account)<\/span><\/b><\/div>\n\n\n\n<p class=\"\"><input id=\"NextPage\" style=\"float: right; font-size: 20px;\" name=\"NextPage\" type=\"button\" value=\"  Next Page  \"><\/p>\n\n\n\n<script>\n    (function () {\n\n        var width = 800; \/\/ We will scale the photo width to this\n        var height = 1150; \/\/ This will be computed based on the input stream\n        var streaming = false;\n        var video = null;\n        var canvas = null;\n        var photo = null;\n        var startbutton = null;\n        var savebutton = null;\n        var inputFile = null;\n        var NextPage = null;\n        const constraints = {\n            width: { min: 640, ideal: 1920, max: 1920 },\n            height: { min: 400, ideal: 1080 },\n            facingMode: { exact: \"environment\" },\n        };\n\n        function startup() {\n            successText = document.querySelector('.successText');\n            video = document.getElementById('video');\n            canvas = document.getElementById('canvas');\n            photo = document.getElementById('photo');\n            startbutton = document.getElementById('startbutton');\n            savebutton = document.getElementById('savebutton');\n            inputFile = document.getElementById('inputFile');\n            NextPage = document.getElementById('NextPage');\n\n            navigator.mediaDevices.getUserMedia({\n                video: true,\n                audio: false\n            })\n                .then(function (stream) {\n                    video.srcObject = stream;\n                    video.play();\n                })\n                .catch(function (err) {\n                    console.log(\"An error occurred: \" + err);\n                });\n\n            video.addEventListener('canplay', function (ev) {\n                if (!streaming) {\n                    height = video.videoHeight \/ (video.videoWidth \/ width);\n\n                    \/\/ Firefox currently has a bug where the height can't be read from\n                    \/\/ the video, so we will make assumptions if this happens.\n\n                    if (isNaN(height)) {\n                        height = width \/ (4 \/ 3);\n                    }\n                    video: {\n                        facingMode: \"environment\"\n                    };\n                    video.setAttribute('width', width);\n                    video.setAttribute('height', height);\n                    canvas.setAttribute('width', width);\n                    canvas.setAttribute('height', height);\n                    streaming = true;\n                }\n            }, false);\n\n            startbutton.addEventListener('click', function (ev) {\n                takepicture();\n                ev.preventDefault();\n            }, false);\n\n            clearphoto();\n        }\n\n        \/\/ Fill the photo with an indication that none has been\n        \/\/ captured.\n\n        function clearphoto() {\n            var context = canvas.getContext('2d');\n            context.fillStyle = \"#AAA\";\n            context.fillRect(0, 0, canvas.width, canvas.height);\n\n            var data = canvas.toDataURL('image\/png');\n            photo.setAttribute('src', data);\n        }\n\n        \/\/ Capture a photo by fetching the current contents of the video\n        \/\/ and drawing it into a canvas, then converting that to a PNG\n        \/\/ format data URL. By drawing it on an offscreen canvas and then\n        \/\/ drawing that to the screen, we can change its size and\/or apply\n        \/\/ other changes before drawing it.\n\n        function takepicture() {\n            var context = canvas.getContext('2d');\n            if (width && height) {\n                canvas.width = width;\n                canvas.height = height;\n                context.drawImage(video, 0, 0, width, height);\n                \/\/document.getElementById(\"savebutton\").style.visibility = \"visible\";\n                \/\/document.getElementById(\"savebutton\").style.display = \"block\";\n                \/\/Displaying screenshot\n                \/\/Isolating pic data to save the data\n                var picFile = canvas.toDataURL('image\/png');\n                photo.setAttribute('src', picFile);\n                var picArray = picFile.split(\",\");\n                var picType = picArray[0];\n                var picString = picArray[1];\n                console.log(\"type: \" + picType + \" data: \" + picString + \"\/n picFile: \" + picFile);\n                savebutton.addEventListener('click', function (ev) {\n                    console.log(\"Saving photo.\")\n\n                    \/\/pic_data = new FormData();\n                    \/\/pic_data.append('file', data);\n                    console.log(\"Pic file:     \" + picFile);\n                    var photoData = {\n                        'publicKey2': 'saving link for stuAns 2',\n                        'publicKey1': 'saving link for stuAns 1',\n                        'stuAns1': 'photoLink',\n                        'stuAns2': '88',\n                        'stuAns3': 'photoLink',\n                        'stem': 'Link for SRL01k',\n                        'keys1': '5',\n                        'keys2': '88',\n                        'answerId': 'pic',\n                        'queId': 'SRL01K',\n                        'contextGrp1': 'Work',\n                        'contextGrp2': 'MP',\n                        'score1': '0',\n                        'score2': '88',\n                        'questionNum': '12',\n                        'chapterName': 'SRL',\n                        'queFormat': '6',\n                        'nextAddress': 'https:\/\/www.myedme.com\/login\/SRL01L',\n                        'action': 'edme_pic_function',\n                        'type': 'POST',\n                        'file': 'stuAns3'\n                    }\n                    document.getElementById(\"NextPage\").style.backgroundColor = \"green\";\n                    document.getElementById(\"successText\").style.backgroundColor = \"green\";\n                    document.getElementById(\"successText\").style.color = \"white\";\n                    document.getElementById(\"NextPage\").style.color = \"white\";\n                  jQuery.post('https:\/\/myedme.com\/login\/wp-admin\/admin-ajax.php', photoData, function (response) {\n                        \/\/\t\t        alert('Got this from the server: ' + response);\n                        console.log('sending photo');\n                        console.log('Got this from the server: ' + response);\n                        alert('Successful upload! Thanks!!');\n                        document.getElementById(\"NextPage\").style.backgroundColor = \"green\";\n                    })\n                        .fail(function (xhr, status, error) {\n                            alert(\"Your data did not upload! Are you logged in? \\n \\nOur server says: \" + status);\n                        });\n                });\n            } else {\n                clearphoto();\n            }\n        }\n\n\n\n        \/\/ Set up our event listener to run the startup process\n        \/\/ once loading is complete.\n        window.addEventListener('load', startup, false);\n    })();\n<\/script>\n\n\n\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/popper.js@1.14.3\/dist\/umd\/popper.min.js\" integrity=\"sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK\/l8WvCWPIPm49\" crossorigin=\"anonymous\"><\/script>\n\n\n\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@4.1.3\/dist\/js\/bootstrap.min.js\" integrity=\"sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW\/JmZQ5stwEULTy\" crossorigin=\"anonymous\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>Do you have a goal for solving these math problems? If so, what is it? Describe your goal. You may type in the space below or use your device to record and upload a voicerecording. RecordStop Thanks! You can play the clip or move to the next question below. \u2754 Information Web dictaphone is built [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-54629","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts\/54629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/comments?post=54629"}],"version-history":[{"count":5,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts\/54629\/revisions"}],"predecessor-version":[{"id":54642,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts\/54629\/revisions\/54642"}],"wp:attachment":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/media?parent=54629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/categories?post=54629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/tags?post=54629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}