CINXE.COM

TPGateway | Resources

<!DOCTYPE html> <html class="no-js" lang="en"> <head> <meta charset="utf-8"><script type="text/html" id="sf-tracking-consent-manager"> <div class="consent-container" id="tracking-consent-dialog" style="z-index: 100000;"> <div class="consent-text-container"> <strong>Training Partners Gateway</strong> <p>Training Partners Gateway uses cookies to offer you a better browsing experience. By continuing to use this website, you consent to our use of cookies.</p> </div> <div class="consent-button-container"> <button class="btn btn-default btn-secondary consent-accept" id="tracking-consent-dialog-accept" type="button" onclick="TrackingConsentManager.updateUserConsent(true)">I accept</button> </div> </div> </script><script type="text/javascript" src="/WebResource.axd?d=DzHrpQl5URXarFHAtrmzFp7OBFEjfQGX-QuWXTWn3yM_Ztl0Ymehcx_-qBZk1PssAj_BVLWMuU8HicSbO6g52i3U-K_Unhmg93HhqvSS_Qgwvb2SbtNpEDtwyPqEe7MikWvkNN8aq7qRmNqeGbh1rH-qcVmIZkBTTGWFYiN9gx2UwpGf0&amp;t=638427473503004950"> </script> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title> TPGateway | Resources </title> <meta name="viewport" content="width=device-width,initial-scale=1"> <link rel="stylesheet" href="/assets/styles/main.css?v=1.1"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&amp;display=swap"> <link rel="shortcut icon" type="image/ico" href="/assets/images/favicon.ico"> <link rel="apple-touch-icon" sizes="57x57" href="/assets/images/app.png" /> <link rel="apple-touch-icon" sizes="72x72" href="/assets/images/app.png" /> <link rel="apple-touch-icon" sizes="114x114" href="/assets/images/app.png" /> <link rel="apple-touch-icon" sizes="144x144" href="/assets/images/app.png" /> <meta property="og:title" content="TPGateway | Resources" /><meta property="og:description" content="View more information related to Private Education Sector." /><meta property="og:url" content="https://www.tpgateway.gov.sg/resources/information-for-private-education-institutions-(peis)/resources" /><meta property="og:type" content="website" /><meta property="og:site_name" content="SSG" /><meta property="og:url" content="https://www.tpgateway.gov.sg:443/resources/information-for-private-education-institutions-(peis)/resources" /><meta property="og:title" content="Resources" /><meta property="og:description" content="View more information related to Private Education Sector." /><meta property="og:image" /><meta property="twitter:url" content="https://www.tpgateway.gov.sg:443/resources/information-for-private-education-institutions-(peis)/resources" /><meta property="twitter:title" content="Resources" /><meta property="twitter:description" content="View more information related to Private Education Sector." /><script type="text/javascript" src="//cdn.evgnet.com/beacon/skillsfuturesingapore/ssg_prod/scripts/evergage.min.js"></script><script type="text/javascript" src="https://www.googletagmanager.com/gtag/js?id=UA-158691572-1"></script><script type="text/javascript"> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-158691572-1'); </script><link rel="canonical" href="https://www.tpgateway.gov.sg/resources/information-for-private-education-institutions-(peis)/resources" /><meta name="description" content="View more information related to Private Education Sector." /></head> <body> <!--[if lt IE 11]> <p class='browsehappy'>You are using an <strong>outdated</strong> browser. Please <a href='http://browsehappy.com/'>upgrade your browser</a> to improve your experience.</p> <![endif]--> <header class="site-header"> <div class="sg-gov-banner"> <div class="container"><a href="https://www.gov.sg" target="_blank" title="Singapore Government Website"><span class="img-sg-crest"><img src="/assets/images/icon-sg-crest.svg" alt="Singapore Government Website"></span><span>A Singapore Government Agency Website</span></a></div> </div> <div class="container"> <div class="site-header__logo"> <a href="/"> <img src="/images/default-source/home-page/ssg-logo.png?sfvrsn=5ce6e46c_4" alt="SSG logo"> </a> </div> <div class="site-header__nav-toggle mobile-tablet"> <button type="button"> <span class="line line1"></span> <span class="line line2"></span> <span class="line line3"></span> <span class="line line4"></span> </button> </div> <div class="site-header__login"> <a class="cta cta-login no-style" href=""> <img class="desktop-only" src="/assets/images/Log in with Singpass - Red Inline - Recommended.svg" alt="button image"> <i class="mobile-tablet icon-login"></i> </a> <ul class="site-header__logged-in-ctas"> <li class="site-header__cta cta-workspace"> <a class="cta" href="/workspace/"><i class="icon-square-grids"></i></a> </li> <li class="site-header__cta cta-notifications"> <a class="cta" href="/workspace/notification/"><i class="icon-bell"></i><span class="badge"></span></a> </li> <li class="site-header__cta cta-logout"> <a class="cta" href="#logout"><i class="icon-login"></i></a> <div class="site-header__dropdown"> <ul class="site-header__dropdown-links"> <li><a href="/workspace/user-management/UserProfile.aspx">My Profile</a></li> <li><a href="/workspace/SoftLandingPage.aspx">Tutorial</a></li> <li><a href="/workspace/session/Logout.aspx?Source=TPG">Logout</a></li> </ul> </div> </li> </ul> </div> <div class="site-header__search-toggle"> <button aria-label="Search"><i class="icon-search"></i></button> </div> <nav class="site-header__nav"> <ul class="nav-level1"> <li> <a>Who We Are</a><i class="icon-chevron-right mobile-tablet" data-toggle="data-toggle"></i> <ul class="nav-level2" style="display: none;"> <li> <a href="/who-we-are/about-training-partners-gateway">About Training Partners Gateway</a> </li> <li> <a href="/who-we-are//self-help-guides">Self Help Guides</a><i class="icon-chevron-right" data-toggle="data-toggle"></i> <ul class="nav-level3" style="display: none;"> <li><a href="/who-we-are//self-help-guides/transaction-specific-self-help-guides">Transaction-specific Self Help Guides</a></li> <li><a href="/who-we-are//self-help-guides/agency-specific-self-help-guides">Agency-specific Self Help Guides</a></li> </ul> </li> <li> <a href="/who-we-are//new-features">New Features</a> </li> </ul> </li> <li> <a>Get Started</a><i class="icon-chevron-right mobile-tablet" data-toggle="data-toggle"></i> <ul class="nav-level2" style="display: none;"> <li> <a href="/get-started/education-(training-and-adult-education-industry)-transformation-map">Education (Training and Adult Education) Industry Transformation Map</a> </li> <li> <a href="/get-started/journey-overview-of-a-training-provider">Journey Overview of a Training Provider</a> </li> <li> <a href="/get-started/journey-overview-of-a-private-education-institution-(pei)">Journey Overview of a Private Education Institution</a> </li> <li> <a href="/get-started/journey-overview-of-a-sfc-training-provider-supported-by-lead-agencies">Journey Overview of a SFC Training Provider supported by Lead Agencies</a> </li> <li> <a href="/get-started/journey-overview-of-a-programme-partner">Journey Overview of a Programme Partner (Enterprise Users)</a> </li> </ul> </li> <li> <a>Plan Courses</a><i class="icon-chevron-right mobile-tablet" data-toggle="data-toggle"></i> <ul class="nav-level2" style="display: none;"> <li> <a href="/plan-courses/job-skills-insights">Job-Skills Insights</a> </li> <li> <a href="/plan-courses/skills-framework">Skills Framework</a> </li> <li> <a href="/plan-courses/inclusive-training">Inclusive Training</a> </li> <li> <a href="/plan-courses/organisation-registration-for-first-time-training-provider">Organisation Registration for First-time Training Provider offering SSG-funded Courses</a><i class="icon-chevron-right" data-toggle="data-toggle"></i> <ul class="nav-level3" style="display: none;"> <li><a href="/plan-courses/organisation-registration-for-first-time-training-provider/apply-for-organisation-registration">Apply for Organisation Registration</a></li> <li><a href="/plan-courses/organisation-registration-for-first-time-training-provider/information-on-organisation-registration-private-education-institution-(or-pei)">Information on Organisation Registration – Private Education Institution (OR-PEI)</a></li> <li><a href="/plan-courses/organisation-registration-for-first-time-training-provider/change-in-entity">Change in Entity</a></li> </ul> </li> <li> <a href="/plan-courses/training-provider-quality-assessment-(tpqa)">Training Provider Quality Assessment (TPQA)</a> </li> <li> <a href="/plan-courses/course-accreditation">Course Accreditation</a> </li> <li> <a href="/plan-courses/course-funding">Course Funding</a> </li> <li> <a href="/plan-courses/skills-extraction-algorithm">Skills Extraction Algorithm (SEA)</a> </li> </ul> </li> <li> <a>Administer Courses</a><i class="icon-chevron-right mobile-tablet" data-toggle="data-toggle"></i> <ul class="nav-level2" style="display: none;"> <li> <a href="/administer-courses/course-administration">Course Administration</a> </li> <li> <a href="/administer-courses/course-customization">Course Customization</a> </li> </ul> </li> <li> <a>Training Grants</a><i class="icon-chevron-right mobile-tablet" data-toggle="data-toggle"></i> <ul class="nav-level2" style="display: none;"> <li> <a href="/training-grants/training-grants-from-government-agencies">Training Grants from Government Agencies</a> </li> </ul> </li> <li> <a>Resources</a><i class="icon-chevron-right mobile-tablet" data-toggle="data-toggle"></i> <ul class="nav-level2" style="display: none;"> <li> <a href="/resources/overview">Overview</a> </li> <li> <a href="/resources/announcements-and-circulars">Announcements and Circulars</a> </li> <li> <a href="/resources/information-for-private-education-institutions-(peis)">Information for Private Education Institutions (PEIs)</a><i class="icon-chevron-right" data-toggle="data-toggle"></i> <ul class="nav-level3" style="display: none;"> <li><a href="/resources/information-for-private-education-institutions-(peis)/enhanced-registration-framework-(erf)">Enhanced Registration Framework (ERF)</a></li> <li><a href="/resources/information-for-private-education-institutions-(peis)/edutrust-certification-scheme">EduTrust Certification Scheme</a></li> <li><a href="/resources/information-for-private-education-institutions-(peis)/credit-rating">Credit Rating</a></li> <li><a href="/resources/information-for-private-education-institutions-(peis)/protection-of-course-fees">Protection of Course Fees</a></li> <li><a href="/resources/information-for-private-education-institutions-(peis)/pei-listing">PEI Listing</a></li> <li><a href="/resources/information-for-private-education-institutions-(peis)/deregistered-peis">Deregistered PEIs</a></li> <li><a href="/resources/information-for-private-education-institutions-(peis)/resources">Resources</a></li> </ul> </li> <li> <a href="/resources/regulation">Regulation</a><i class="icon-chevron-right" data-toggle="data-toggle"></i> <ul class="nav-level3" style="display: none;"> <li><a href="/resources/regulation/legislation">Legislation</a></li> <li><a href="/resources/regulation/terms-for-training-providers">Terms for Training Providers</a></li> <li><a href="/resources/regulation/enforcement-actions">Enforcement Actions</a></li> </ul> </li> <li> <a href="/resources/inclusive-training">Inclusive Training</a> </li> <li> <a href="/resources/digitalisation">Digitalisation</a><i class="icon-chevron-right" data-toggle="data-toggle"></i> <ul class="nav-level3" style="display: none;"> <li><a href="/resources/digitalisation/training-management-system">Training Management System</a></li> <li><a href="/resources/digitalisation/training-quality-and-outcomes-measurement-(traqom)">Training Quality and Outcomes Measurement (TRAQOM)</a></li> <li><a href="/resources/digitalisation/developer-portal">Developer Portal</a></li> </ul> </li> <li> <a href="/resources/grow-talents">Grow Talents</a> </li> <li> <a href="/resources/facilities">Facilities</a> </li> <li> <a href="/resources/course-directory">Course Directory</a> </li> <li> <a href="/resources/call-for-information-proposal">Call for Information/ Proposal</a> </li> </ul> </li> </ul> </nav> </div> </header> <div class="site-search" data-searchurl="/search" data-endpoint="/SSGContentInterface/Header/GetSearchSuggestions"> <div class="container"> <div class="site-search__search"> <i class="icon-search"></i> <input type="search" placeholder="What are you looking for?"> <input type="hidden" data-sf-role="indexCatalogue" value="pages"> <input type="hidden" data-sf-role="suggestionFields" value="Title,Content"> <input type="hidden" data-sf-role="language" value="en"> <button class="clear" type="button"><i class="icon-close"></i></button> <div class="site-search__suggestions"> <div class="site-search__suggestions--suggested"> <p>Suggested Searches</p> <p class="no-results" style="display: none;">No Search suggestions found.</p> <ul> <li><a href="#"><strong>Accountancy</strong> Framework</a></li> <li><a href="#">Fundings in <strong>Accountancy</strong> sector</a></li> <li><a href="#">Courses under <strong>Accountancy</strong></a></li> <li><a href="#">Job & Skill insights for <strong>Accountancy</strong></a></li> </ul> </div> <div class="site-search__suggestions--fundings"> <p>Training Grants</p> <p class="no-results" style="display: none;">No training grant suggestions found.</p> <ul> <li><a href="#">Diploma in <strong>Accountancy</strong></a></li> <li><a href="#">Post-Diploma Certificate in Accounting Practice - Part of Advanced Diploma in <strong>Accountancy</strong></a></li> <li><a href="#">Post-Diploma Certificate in Advanced Financial Reporting & Assurance - Part of Advanced Diploma in <strong>Accountancy</strong></a></li> </ul> </div> </div> </div> <div class="site-search__submit"> <button class="submit" type="button">Search</button> </div> </div> </div> <script id="search-suggestion-template" type="text/x-dot-template"> {{~it:item:index}} <li tabindex="1"><a class="suggestion" href="{{=item.Link}}">{{=item.Title}}</a></li> {{~}} </script><div class="breadcrumb"> <ul> <li><a href="/" aria-label="Home"><i class="icon-home"></i></a></li> <li> <a href="/resources">Resources</a> </li> <li> <a href="/resources/information-for-private-education-institutions-(peis)">Information for Private Education Institutions (PEIs)</a> </li> <li> <span>Resources</span> </li> </ul> </div> <main class="main-content"> <div class="container"> <div class="row"> <aside id="Main_TE2BC1A48004_Col00" class="sf_colsIn col-md-3 col-lg-2" data-sf-element="Side Content" data-placeholder-label="Side Content"><nav class="side-nav"> <button class="mobile-tablet side-nav__placeholder"><span>Resources</span><i class="icon-chevron-down"></i></button> <ul class="side-nav__level1"> <li class=""> <a href="/resources/overview">Overview</a> </li> <li class=""> <a href="/resources/announcements-and-circulars">Announcements and Circulars</a> </li> <li class=""> <a href="/resources/information-for-private-education-institutions-(peis)">Information for Private Education Institutions (PEIs)</a><i class="icon-chevron-down tablet-desktop" data-toggle="data-toggle"></i> <ul class="side-nav__level2" style="display: none;" data-content="data-content"> <li><a target="_self" href="/resources/information-for-private-education-institutions-(peis)/enhanced-registration-framework-(erf)">Enhanced Registration Framework (ERF)</a></li> <li><a target="_self" href="/resources/information-for-private-education-institutions-(peis)/edutrust-certification-scheme">EduTrust Certification Scheme</a></li> <li><a target="_self" href="/resources/information-for-private-education-institutions-(peis)/credit-rating">Credit Rating</a></li> <li><a target="_self" href="/resources/information-for-private-education-institutions-(peis)/protection-of-course-fees">Protection of Course Fees</a></li> <li><a target="_self" href="/resources/information-for-private-education-institutions-(peis)/pei-listing">PEI Listing</a></li> <li><a target="_self" href="/resources/information-for-private-education-institutions-(peis)/deregistered-peis">Deregistered PEIs</a></li> <li class="link-active"><span>Resources</span></li> </ul> </li> <li class=""> <a href="/resources/regulation">Regulation</a><i class="icon-chevron-down tablet-desktop" data-toggle="data-toggle"></i> <ul class="side-nav__level2" style="display: none;" data-content="data-content"> <li><a target="_self" href="/resources/regulation/legislation">Legislation</a></li> <li><a target="_self" href="/resources/regulation/terms-for-training-providers">Terms for Training Providers</a></li> <li><a target="_self" href="/resources/regulation/enforcement-actions">Enforcement Actions</a></li> </ul> </li> <li class=""> <a href="/resources/inclusive-training">Inclusive Training</a> </li> <li class=""> <a href="/resources/digitalisation">Digitalisation</a><i class="icon-chevron-down tablet-desktop" data-toggle="data-toggle"></i> <ul class="side-nav__level2" style="display: none;" data-content="data-content"> <li><a target="_self" href="/resources/digitalisation/training-management-system">Training Management System</a></li> <li><a target="_self" href="/resources/digitalisation/training-quality-and-outcomes-measurement-(traqom)">Training Quality and Outcomes Measurement (TRAQOM)</a></li> <li><a target="_self" href="/resources/digitalisation/developer-portal">Developer Portal</a></li> </ul> </li> <li class=""> <a href="/resources/grow-talents">Grow Talents</a> </li> <li class=""> <a href="/resources/facilities">Facilities</a> </li> <li class=""> <a href="/resources/course-directory">Course Directory</a> </li> <li class=""> <a href="/resources/call-for-information-proposal">Call for Information/ Proposal</a> </li> </ul> </nav></aside> <section id="Main_TE2BC1A48004_Col01" class="sf_colsIn col-md-6 col-lg-8" data-sf-element="Main Content" data-placeholder-label="Main Content"><article class="rte"> <h1>Resources</h1><hr /><p>View more information related to Private Education Sector.</p><ul><li><a target="_blank" href="https://www.skillsfuture.gov.sg/docs/default-source/initiatives/private-education-institution-(pei)/2023-private-education-sector-overview.pdf">Private Education Sector Overview</a></li><li><a href="/resources/information-for-private-education-institutions-(peis)/resources/industry-advisories">Industry Advisories</a></li><li><a href="/resources/information-for-private-education-institutions-(peis)/resources/private-education-institution-graduate-employment-survey-2017-18">PEI Graduate Employment Survey</a></li><li><a href="/resources/information-for-private-education-institutions-(peis)/resources/dispute-resolution">Dispute Resolution</a></li></ul> </article> </section> <aside id="Main_TE2BC1A48004_Col02" class="sf_colsIn col-md-3 col-lg-2" data-sf-element="Social Sharing Widget" data-placeholder-label="Social Sharing Widget"><div class="share"> <p>Share this page:</p> <ul> <li><a class="addthis_button_facebook at300b" href="#" title="Facebook"><i class="icon-facebook"></i></a></li> <li><a class="addthis_button_twitter at300b" href="#" title="Twitter"><i class="icon-twitter"></i></a></li> <li><a class="" href="#" title="Email"><i class="icon-mail"></i></a></li> </ul> </div> </aside> </div> </div> <article class="rte"> <div class="popup-panel" id="login"> <div class="popup-panel__wrapper"><button class="close" type="button"><em class="icon-close"></em></button> <div class="popup-panel__content"> <div class="popup-panel__content--header"> <h2>Training Partner Login</h2> <p class="subtitle">Singpass</p> </div> <div style="margin:0 0 16px;"><a class="cta cta-reverse" style="width:200px;" href="/workspace/session/Login.aspx" target="_blank">TPGateway</a> </div> <div class="popup-panel__content--footer"> <p>If you have not registered for Corppass for your entity, click <a target="_blank" href="https://www.corppass.gov.sg/cpauth/login/homepage?TAM_OP=login">here</a> to register and assign Singpass User accounts for the respective e-Services.</p> </div> </div> </div> </div> <style> .popup-panel__content &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; div &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; a { font-size: 12px; cursor: pointer; outline:0; } @media only screen and (min-width: 1024px) { .popup-panel__content &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; div &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; a { font-size: 15px; } } </style> </article> </main> <footer class="site-footer"> <button class="back-to-top"><span>To Top</span><i class="icon-chevron-up"></i></button> <div class="container"> <div class="site-footer__top"> <p>Training Partners Gateway</p> <ul> <li><a target="_self" href="/faq">FAQ</a></li> <li><a target="_self" href="/footer-pages/feedback">Feedback</a></li> <li><a target="_self" href="/footer-pages/contact-us">Contact Us</a></li> </ul> </div> <div class="site-footer__bottom"> <ul> <li><a target="_self" href="/footer-pages/privacy-policy">Privacy Policy</a></li> <li><a target="_self" href="/footer-pages/terms-of-use">Terms Of Use</a></li> <li><a target="_self" href="/footer-pages/sitemap">Sitemap</a></li> <li><a target="_blank" href="https://www.tech.gov.sg/report_vulnerability">Report Vulnerability</a></li> <li><a target="_self" href="/footer-pages/reach">REACH</a></li> </ul> <div class="legal"> <p class="copyright-updated"><span>&#169; 2020, Government of Singapore</span><span>Last Updated 04 October 2022</span></p> <p class="browsers">Supported Browsers: Chrome 51, IE 11, Firefox 46, Safari 10, Opera 37 and above</p> </div> </div> </div> </footer> <script src="/assets/scripts/main.js?v=1.1"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" integrity="sha384-Dziy8F2VlJQLMShA6FHWNul/veM9bCkRUaLqr199K94ntO5QUrLJBEbYegdSkkqX" crossorigin="anonymous"></script> <script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5e4cabf65ff54b85"></script> <script src="https://assets.wogaa.sg/scripts/wogaa.js" integrity="sha384-Q0hHDs0uusrSmq9CjcrhLiveWyuUC6w8hshFBTS7HwO7zrMPSHjRqBqW2BnaA29R" crossorigin="anonymous"></script> <script type="application/json" id="PersonalizationTracker"> {"IsPagePersonalizationTarget":false,"IsUrlPersonalizationTarget":false,"PageId":"f55587a8-ab46-4dc4-a91e-56245cd8cf9a"} </script><script type="text/javascript" src="/WebResource.axd?d=Oiw5o8i74rDb2VpVaCaMSk63aMKOZofrhd6qTBT_4oF550nHfqlq_RK5V7JQ84VvAM3yJU96_qJbBT2_v7dxC5e4o4NOU6rQBCFJ5eAdfJQhD1rib8HKs3oeiF89HKFjVhJKEWXSR_ebd-ADvMD9dl5oHhUHq1Rk9XS1Y4Gz4v_3nUCGwcMmYr3vWgQWssalubJ0phU0f_FSAc40-qIIjlxrJtk1&amp;t=638427473516342423"> </script> <script> function __tpg_setLoginStatus(loggedIn) { if(loggedIn) { var body = document.getElementsByTagName('body')[0]; body.classList.add('logged-in'); } } function __tpg_updateNotificationCount(count) { var badge = document.getElementsByClassName('badge')[0]; if(count > 0){ badge.classList.add('has-notifications'); } else { badge.classList.remove('has-notifications'); } badge.innerHTML = count.toString(); } (function() { // Initialize TPG script. // This function expects __tpg_setLoginStatus(bool) to be made available before this script starts. var __tpg_apiVerify = "/workspace/session/rest/session/verify"; var __tpg_notificationCount = -1; var __tpg_loopMilliseconds = 60000; // Check inactivity after 60secs var __tpg_loopId; var __tpg_continueIfNotLoggedIn = true; // To continue checking after knowing session is not active? var __tpg_continueIfLoggedIn = true; // To continue checking after knowing session is active? var __tpg_logInfo = false; // Set this to false to disable detail logging for Production. __tpg_init(500); // Start 0.5 second after script is loaded. function __tpg_init(milliseconds) { __tpg_log(false, 'Next session check ms: '+ milliseconds); // window.setTimeout returns an Id that can be used to start and stop a timer __tpg_loopId = window.setTimeout(__tpg_checkTpg, milliseconds) } function __tpg_log(isError, message) { let showLog = (isError === true || __tpg_logInfo === true); if (typeof __tpg_debugMode === "boolean") showLog = (showLog === true || __tpg_debugMode === true); if (showLog === true) window.console && console.log(message); } function __tpg_checkNotificationCount(notificationCount) { if (!/^\d+$/.test(notificationCount)) return; // Do nothing if notificationCount is not a number. let notificationCountNumber = parseInt(notificationCount, 10); if (notificationCountNumber === __tpg_notificationCount) return; // Do nothing if number are matching. __tpg_log(false, 'New Notificaton Count: '+ notificationCountNumber); // Can remove when pushed to prod - for testing if (typeof __tpg_updateNotificationCount === "function") __tpg_updateNotificationCount(notificationCountNumber); __tpg_notificationCount = notificationCountNumber; // Update the count to variable } // Check if TPG is initialized or Last Activity is greater than Last Extension function __tpg_checkTpg() { // Creating the XMLHttpRequest object let $requestTPG = new XMLHttpRequest(); // Instantiating the request object $requestTPG.open("GET", __tpg_apiVerify); $requestTPG.withCredentials = true; // Defining event listener for readystatechange event $requestTPG.onload = function() { // Check if the request is compete and was successful if(this.status === 200) { __tpg_log(false, 'TPG session active: '+this.status); if (typeof __tpg_setLoginStatus === "function") __tpg_setLoginStatus(true); __tpg_checkNotificationCount($requestTPG.getResponseHeader("tpg-notification-count")); window.clearTimeout(__tpg_loopId); if (__tpg_continueIfLoggedIn) __tpg_init(__tpg_loopMilliseconds); } else { __tpg_log(true, 'TPG session inactive: '+this.status); if (typeof __tpg_setLoginStatus === "function") __tpg_setLoginStatus(false); window.clearTimeout(__tpg_loopId); if (__tpg_continueIfNotLoggedIn) __tpg_init(__tpg_loopMilliseconds); } }; // Sending the request to the server $requestTPG.send(); } })(); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10