 {"id":65547,"date":"2025-07-02T13:35:43","date_gmt":"2025-07-02T10:35:43","guid":{"rendered":"https:\/\/digital.staff-capital.com\/?page_id=65547"},"modified":"2025-07-02T13:35:43","modified_gmt":"2025-07-02T10:35:43","slug":"lms-admin-report","status":"publish","type":"page","link":"https:\/\/digital.staff-capital.com\/en\/lms-admin-report\/","title":{"rendered":"LMS Admin Report"},"content":{"rendered":"\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/amcharts\/3.21.15\/amcharts.js\"><\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/amcharts\/3.21.15\/pie.js\"><\/script>\n\n\n<style>\n    .box_button_admin_report {\n        display: grid;\n        gap: 5px;\n        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));\n        margin-bottom: 15px;\n        text-align: center;\n        border-bottom: solid 1px;\n        border-color: #dbd8d8;\n    }\n\n    .btn-load-shortcode {\n        background-color: #ebebeb;\n        text-align: center;\n        border: solid 1px #dbd8d8;\n        border-bottom: 0px;\n        display: inline-block;\n        padding: 5px 20px;\n        cursor: pointer;\n        border-radius: 5px 5px 0px 0px;\n    }\n\n    .btn-load-shortcode.active {\n        background-color: #ffffff;\n        position: relative;\n        z-index: 9;\n        margin-bottom: 0px;\n        border-bottom: none;\n    }\n\n    tr.no_color {\n        color: #b3b3b3;\n    }\n\n    .lms-report-cron-panel {\n        display: flex;\n        align-items: center;\n        gap: 15px;\n        margin: 10px 0 15px 0;\n        font-size: 13px;\n    }\n\n    .lms-report-cron-panel .lms-last-run {\n        opacity: 0.8;\n    }\n\n    .lms-report-cron-panel .lms-run-status {\n        margin-left: auto;\n        font-style: italic;\n    }\n\n\n  button.button.lms-run-cron-now {\n    background-color: #3daad0;\n    border: solid 1px;\n    border-color: #dbd8d8;\n    color: #ffffff;\n    border-radius: 5px;\n}\n<\/style>\n\n<div class=\"loading_box1\">\n    <svg class=\"rotate_me\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 200 200\">\n        <circle cx=\"100\" cy=\"100\" r=\"70\" fill=\"none\" stroke=\"#1A8BFF\" stroke-width=\"30\" stroke-linecap=\"round\" stroke-dasharray=\"200 1000\"><\/circle>\n        <circle cx=\"100\" cy=\"100\" r=\"70\" fill=\"none\" stroke=\"#1A8BFF\" stroke-opacity=\"0.2\" stroke-width=\"30\"><\/circle>\n    <\/svg>\n<\/div>\n\n\n<div class=\"lms-report-cron-panel\">\n    <button type=\"button\" class=\"button lms-run-cron-now\">\n       Run report update now    <\/button><br>\n    <span class=\"lms-last-run\">\n       Last update:        <span class=\"lms-last-run-value\">30.06.2026 16:55:19<\/span>\n    <\/span>\n    <span class=\"lms-run-status\" style=\"display:none;\"><\/span>\n<\/div>\n\n<!-- HTML -->\n<div class=\"box_button_admin_report\">\n\n\n    <div class=\"btn-load-shortcode active\" data-type=\"\u0441ourse\">\n        Course Report    <\/div>\n\n    <div class=\"btn-load-shortcode\" data-type=\"quiz\">\n        Test Report    <\/div>\n\n    <div class=\"btn-load-shortcode\" data-type=\"user\">\n        User Report    <\/div>\n\n    <div class=\"btn-load-shortcode\" data-type=\"company\">\n        Company Report    <\/div>\n\n    <div class=\"btn-load-shortcode\" data-type=\"group\">\n        Group Report    <\/div>\n\n    \n<\/div>\n\n\n\n<div id=\"shortcode_container\"><\/div>\n\n\n\n\n<script>\n\n    let currentActiveTab = 1;\n    let response_global = null;\n\n\n\njQuery(document).ready(function () {\n\n\n\n\n    function loadShortcode(type) {\n\n        \/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u044f\u0437\u044b\u043a \u0438\u0437 URL: \/uk\/admin-report, \/en\/admin-report, \/ru\/admin-report\n        var path = window.location.pathname || '';\n        var segments = path.split('\/').filter(function (seg) {\n            return seg.length > 0;\n        });\n\n        var lang = 'uk'; \/\/ \u0434\u0435\u0444\u043e\u043b\u0442, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0448\u043b\u0438\n        if (segments.length > 0) {\n            var first = segments[0].toLowerCase();\n            if (first === 'uk' || first === 'en' || first === 'ru') {\n                lang = first;\n            }\n        }\n\n        jQuery.ajax({\n            url: 'https:\/\/digital.staff-capital.com\/wp-admin\/admin-ajax.php',\n            method: 'POST',\n            data: {\n                action: 'load_shortcode_content',\n                type: type,\n                lang: lang\n            },\n            success: function (res) {\n                jQuery('#shortcode_container').html(res);\n\n                jQuery(\".loading_box\").hide();\n                jQuery(\".loading_box1\").hide();\n            }\n        });\n    }\n\n\n    \/\/ \u041f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u043a\u043b\u0430\u0434\u043a\u0438\n    jQuery('.btn-load-shortcode').on('click', function () {\n\n        jQuery(\".loading_box\").show();\n\n        jQuery('.btn-load-shortcode').removeClass('active');\n        jQuery(this).addClass('active');\n\n        let type = jQuery(this).data('type');\n        loadShortcode(type);\n    });\n\n    \/\/ \u041a\u043d\u043e\u043f\u043a\u0430 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0442\u0447\u0451\u0442\u043e\u0432\n    jQuery('.lms-run-cron-now').on('click', function () {\n\n        jQuery(\".loading_box1\").show();\n        jQuery('.lms-run-status').text('').hide();\n\n        jQuery.ajax({\n            url: 'https:\/\/digital.staff-capital.com\/wp-admin\/admin-ajax.php',\n            method: 'POST',\n            dataType: 'json',\n            data: {\n                action: 'lms_run_reports_cache_now'\n            },\n               success: function (res) {\n    \n\n            if (res && res.success) {\n                if (res.data && res.data.last_run_text) {\n                    jQuery('.lms-last-run-value').text(res.data.last_run_text);\n                }\n                if (res.data && res.data.message) {\n                    jQuery('.lms-run-status').text(res.data.message).show();\n                }\n\n                \/\/ --- \u0414\u041e\u0414\u0410\u041d\u041e \u041f\u0415\u0420\u0415\u0417\u0410\u0412\u0410\u041d\u0422\u0410\u0416\u0415\u041d\u041d\u042f ---\n                setTimeout(function () {\n                    location.reload();\n                }, 800);\n\n            } else {\n                jQuery('.lms-run-status').text('\u041f\u043e\u043c\u0438\u043b\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0443').show();\n\n                setTimeout(function () {\n                    location.reload();\n                }, 800);\n            }\n        },\n\n            error: function () {\n                jQuery(\".loading_box1\").hide();\n                jQuery('.lms-run-status').text('\u041f\u043e\u043c\u0438\u043b\u043a\u0430 AJAX-\u0437\u0430\u043f\u0438\u0442\u0443').show();\n            }\n        });\n    });\n\n    \/\/ \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b\n    let defaultType = jQuery('.btn-load-shortcode.active').data('type');\n    loadShortcode(defaultType);\n});\n\n\n\n\n<\/script>\n\n\n\n\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":205,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"both","_seopress_redirections_param":"","_seopress_redirections_type":301,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"footnotes":""},"class_list":["post-65547","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/digital.staff-capital.com\/en\/wp-json\/wp\/v2\/pages\/65547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digital.staff-capital.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/digital.staff-capital.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/digital.staff-capital.com\/en\/wp-json\/wp\/v2\/users\/205"}],"replies":[{"embeddable":true,"href":"https:\/\/digital.staff-capital.com\/en\/wp-json\/wp\/v2\/comments?post=65547"}],"version-history":[{"count":0,"href":"https:\/\/digital.staff-capital.com\/en\/wp-json\/wp\/v2\/pages\/65547\/revisions"}],"wp:attachment":[{"href":"https:\/\/digital.staff-capital.com\/en\/wp-json\/wp\/v2\/media?parent=65547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}