[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"en\/","setHasJsCookie":0,"ajaxPageState":{"theme":"versh","theme_token":"PZeiIsGVjSJx_KeB7L_hFlbPjOotzKhvcu2-ANtRLlU","jquery_version":"2.1"},"TRACK_COURSE_ACCESS":"\/track\/course_access","TRACK_ACTIVITY":"\/track\/activity","PATH_CHARTS":"\/charts.php","TRACK_AUDIO_RECORDER":"\/track\/audio_recorder","PAGE_PIZA_READER":"\/piza-reader","PAGE_PIZA_STORIES":"\/piza-stories","AUTHORIZE_RECORDING_STATE":"\/authorize\/recording\/state\/","PIZA_READER_QUIZCOMPLETION":"\/piza-reader\/QuizCompletion","ACTIVITY_STATUS":{"OPEN":-1,"DOING":0,"COMPLETED":1},"CHART_TYPE":{"overview":"overview","history":"history","column":"column"},"COURSE_PIZA_READER":1,"COURSE_PIZA_STORIES":15,"MESSAGE":{"SURE_TO_UPGRADE":"Are you sure to upgrade?","AUDIO_INACTIVITY_ERROR":"No activity. The recorder has been stopped.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help.","SERVER_CONNECTION_ERROR":"The recorder is not available.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help.","RECORDING_UNAVAILABLE_ERROR":"The recording is not available.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help.","RECORDING_NONUSER_ERROR":"Need login for recording.\u003C\/br\u003EAsk site contact for help.","RECORDING_FREEUSER_ERROR":"Need upgrade your account to premium for recording.\u003C\/br\u003EAsk site contact for help.","MISSING_MICROPHONE_ERROR":"You are missing a microphone.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help.","MICROPHONE_PERMISSION_ERROR":"Microphone blocked in browser settings.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help.","UNSUPPORTED_BROWSER_ERROR":"This browser does not support the recorder.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help.","MAX_AUDIO_LENGTH_ERROR":"You have reached the max audio length.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help.","RECORDING_DEFAULT_ERROR":"The recorder is not available.\u003C\/br\u003E\u003C\/br\u003E Ask site contact for help."},"USER_INFO":{"uid":0},"CToolsModal":{"loadingText":"Loading...","closeText":"Close Window","closeImage":"\u003Cimg src=\u0022https:\/\/englishpiza.com\/sites\/all\/modules\/ctools\/images\/icon-close-window.png\u0022 alt=\u0022Close window\u0022 title=\u0022Close window\u0022 \/\u003E","throbber":"\u003Cimg src=\u0022https:\/\/englishpiza.com\/sites\/all\/modules\/ctools\/images\/throbber.gif\u0022 alt=\u0022Loading\u0022 title=\u0022Loading...\u0022 \/\u003E"},"login-popup-style":{"modalSize":{"type":"fixed","width":"auto","height":"auto","addHeight":650},"modalOptions":{"opacity":0.6,"background-color":"#191818"},"closeText":"","loadingText":"","animation":"fadeIn","modalTheme":"login_popup_theme","animationSpeed":"fast"}},"merge":true},{"command":"modal_display","title":"Taking Action","output":"\u003Cdiv class=\u0022modalWindow_body\u0022\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022BOOKID\u0022 value=\u002213328\u0022\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022COURSEID\u0022 value=\u002215\u0022\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022ACTIVITYID\u0022 value=\u002266946\u0022\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022ACTIVITYREADID\u0022 value=\u002266947\u0022\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022ACTIVITYQUIZID\u0022 value=\u002266948\u0022\u003E\n \u003Cdiv class=\u0022resourceModal_thumbnail\u0022\u003E\n \u003Cimg class=\u0022activityDetail_image\u0022 src=\u0022https:\/\/englishpiza.com\/sites\/default\/files\/styles\/large\/public\/notext_ipad_2314.jpg?itok=tvJpQFDc\u0022\u003E\n \u003Ca href=\u0022\/piza-stories\/befa436246afa0ff961a4af591c739c2\/activity\/66946\/listen\u0022 class=\u0022activity_link \u0022\u003E\u0026nbsp;\u003C\/a\u003E\n \u003C\/div\u003E\n \u003Cdiv class=\u0022resourceModal_activities\u0022\u003E\n \u003Cdiv class=\u0022activityDetail_row\u0022\u003E\n \t\t\t\u003Cdiv data-id=\u002266946\u0022 class=\u0022activityDetail\u0022\u003E\n \t\t\t\t\u003Ca class=\u0022activity_link \u0022\n \t\t\t\t\thref=\u0022\/piza-stories\/befa436246afa0ff961a4af591c739c2\/activity\/66946\/listen\u0022\u003E\n \t\t\t\t\t\u003Cspan data-id=\u002266946\u0022 class=\u0022icon activity_icon icon-listen\u0022\u003E\u003Ci class=\u0022glyphicon glyphicon-headphones\u0022\u003E\u003C\/i\u003E\u003C\/span\u003E\n \t\t\t\t\u003C\/a\u003E \u003Cspan class=\u0022activityDetail_label ng-binding\u0022\u003Elisten\u003C\/span\u003E\n \t\t\t\t\u003Cdiv class=\u0022activityDetail_stars\u0022 \u003E\n \u003Cspan class=\u0022num_coin\u0022\u003E5 \u003Ci class=\u0022coins glyphicon glyphicon-star\u0022\u003E\u003C\/i\u003E\u003C\/span\u003E\n \n \u003C\/div\u003E \n\n \t\t\t\u003C\/div\u003E\n \t\t\t\u003Chr class=\u0022hr-dark\u0022 tabindex=\u0022-1\u0022\u003E\n\t\t\t\u003C\/div\u003E \n\t\t\t\n\t\t \u003Cdiv class=\u0022activityDetail_row\u0022\u003E\n \t\t\t\u003Cdiv data-id=\u002266947\u0022 class=\u0022activityDetail\u0022\u003E\n \t\t\t\t\u003Ca class=\u0022activity_link \u0022\n \t\t\t\t\thref=\u0022\/piza-stories\/befa436246afa0ff961a4af591c739c2\/activity\/66947\/read\u0022\u003E\n \t\t\t\t \n \t\t\t\t\t\u003Cspan data-id=\u002266947\u0022 class=\u0022icon activity_icon icon-read\u0022\u003E\u003Ci class=\u0022glyphicon glyphicon-book\u0022\u003E\u003C\/i\u003E\u003C\/span\u003E\n \t\t\t\t\u003C\/a\u003E \u003Cspan class=\u0022activityDetail_label ng-binding\u0022\u003ERead\u003C\/span\u003E\n \t\t\t\t\n \t\t\t\t\u003Cdiv class=\u0022activityDetail_stars\u0022 \u003E\n \u003Cspan class=\u0022num_coin\u0022\u003E10 \u003Ci class=\u0022coins glyphicon glyphicon-star\u0022\u003E\u003C\/i\u003E\u003C\/span\u003E\n \n \u003C\/div\u003E\n \t\t\t\t\n \t\t\t\u003C\/div\u003E\n \t\t\t\n \t\t\t\u003Chr class=\u0022hr-dark\u0022 tabindex=\u0022-1\u0022\u003E\n\t\t\t\u003C\/div\u003E \n \t \n \u003Cdiv class=\u0022activityDetail_row\u0022\u003E\n \t\t\t\u003Cdiv data-id=\u002266948\u0022 class=\u0022activityDetail\u0022\u003E\n \t\t\t\t\u003Ca \t\t\t\t\n \t\t\t\t \t\t\t\t \t\t\t\thref=\u0022\/piza-stories\/befa436246afa0ff961a4af591c739c2\/activity\/66948\/quiz\u0022\n \t\t\t\t \t\t\t\t class=\u0022activity_link activity_quiz\u0022 \n \t\t\t\t\t\u003E \t\t\t\t\t \n \t\t\t\t\t\u003Cspan data-id=\u002266948\u0022 class=\u0022icon activity_icon icon-quiz\u0022\u003E\u003Ci class=\u0022glyphicon glyphicon-question-sign\u0022\u003E\u003C\/i\u003E\u003C\/span\u003E\n \t\t\t\t\t\n \t\t\t\t\u003C\/a\u003E \u003Cspan class=\u0022activityDetail_label ng-binding\u0022\u003EQuiz\u003C\/span\u003E\n \t\t\t\t\u003Cdiv class=\u0022activityDetail_stars\u0022 \u003E\n \u003Cspan class=\u0022num_coin\u0022\u003E10 \u003Ci class=\u0022coins glyphicon glyphicon-star\u0022\u003E\u003C\/i\u003E\u003C\/span\u003E\n \n \u003C\/div\u003E\n \t\t\t\u003C\/div\u003E\n \t\t\t\u003Chr class=\u0022hr-dark\u0022 tabindex=\u0022-1\u0022\u003E\n\t\t\t\u003C\/div\u003E \n \t \n \u003C\/div\u003E\n\t \n \u003C\/div\u003E\n \n\u003Cscript type=\u0022text\/javascript\u0022\u003E\n(function ($) {\n \n var user_activities = Drupal.settings.user_activities; \n if (typeof user_activities !== \u0027undefined\u0027 \u0026\u0026 user_activities !== null \u0026\u0026 Drupal.settings.USER_INFO !== \u0027undefined\u0027 ) { \n \t\t\n \t\tvar COURSEID = $(\u0027input[name=\u0022COURSEID\u0022]\u0027).val();\n \t\tvar courseid_user_activities = user_activities[COURSEID];\n \t\tif (typeof courseid_user_activities !== \u0027undefined\u0027 \u0026\u0026 courseid_user_activities.length \u003E 0){\n \t\t\tjQuery(\u0027.resourceModal_activities .activityDetail\u0027)\n \t\t\t.each(\n \t\t\t\t\tfunction(index, value) {\n \n \t\t\t\t\t\tvar activityid = parseInt(jQuery(this).data(\u0027id\u0027));\n\/\/ \t\t\t\t\t\tconsole.log(\u0027div\u0027 + index + \u0027:\u0027 + activityid);\n \t\t\t\t\t\tif (courseid_user_activities.indexOf(activityid) \u003E= 0) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tjQuery(this).find(\u0027a\u0027).addClass(\u0027is-completed\u0027);\n \t\t\t\t\t\t\tjQuery(this).addClass(\u0027row-completed\u0027);\n \t\t\t\t\t\t}\n \n \t\t\t\t\t});\n \t\t}\n \t\n } \n \n \/\/console.log(Drupal.settings.TRACK_COURSE_ACCESS);\n var url = Drupal.settings.TRACK_COURSE_ACCESS;\n var parameters = {\n \n \u0022uid\u0022: (typeof Drupal.settings.USER_INFO != \u0027undefined\u0027)?Drupal.settings.USER_INFO.uid:null , \n \u0022courseid\u0022: $(\u0027input[name=\u0022COURSEID\u0022]\u0027).val(), \n \u0022bookid\u0022: $(\u0027input[name=\u0022BOOKID\u0022]\u0027).val(), \n \u0022type\u0022:\u0022view\u0022\n };\n \/\/console.log(parameters);\n \/\/ post to tracking system \u003E course access \n $.post(url, parameters, function( data ) {\n \t\/\/console.log( data ); \n\t});\n \n})(jQuery);\n\n \n\u003C\/script\u003E\n"}]