| Server IP : 35.201.19.92 / Your IP : 216.73.216.156 Web Server : nginx System : Linux pod-200961 6.8.0-1055-gke #61-Ubuntu SMP Tue May 26 22:57:42 UTC 2026 x86_64 User : fpm200098 ( 200098) PHP Version : 8.2.33 Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nas/content/live/questfamilyday/wp-content/themes/generatepress_child/admin/ |
Upload File : |
<?php
function MemberStepForm() {
// var_dump(!is_user_logged_in()); die();
// if ( !is_user_logged_in() ) {
// wp_redirect( '/member-portal/');
// exit;
// }
// echo '<pre>';
// $fields = get_each_docs_array_status(current_doc_id());
// var_dump($fields[1]['title']);
$args = array(
'post_type' => 'user_documents',
'post_status' => 'publish',
'author' => get_current_user_id(),
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'document_status',
'field' => 'slug',
'terms' => array('approved', 'on-review'),
'include_children' => false
)
)
);
$wp_query = new WP_Query( $args );
$has_documents_uploaded = $wp_query->have_posts();
$doc_approved = false;
if ( $wp_query->have_posts() ) :
while ( $wp_query->have_posts() ) : $wp_query->the_post();
$doc_status = get_the_terms( $wp_query->ID , 'document_status' );
if ( $doc_status[0]->slug == 'approved'):
$doc_approved = true;
endif;
endwhile;
endif;
wp_reset_postdata();
$html_upload = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Upload Document</h2>';
// $html_upload .= has_success_msg();
$html_upload .= do_shortcode( '[gravityform id="20" title="false" description="false" ajax="true"]' ).'
<div class="steps-btn-wrapper">
<button data-toggle_target="#Hubworks">Previous</button>
<button data-toggle_target="#QuestInduction">Next</button>
</div>
</div>';
$html_review = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Thank You!</h2>
<div class="message-content">
<p>We are reviewing your documents.</p>
<p>We will notify you once your documents are approved.</p>
<p class="small-text">We will confirm within 24 hours.</p>
</div>
</div>';
$html_review_approved = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Documents approved!</h2>
<div class="message-content">
<p>Your documents has been approved.</p>
<p>You can now view and download member documents and videos.</p>
</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#Hubworks">Previous</button>
<button data-toggle_target="#Member-docs">Next</button>
</div>
</div>';
$html_fdc_operations = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">FDC Operations</h2>
<div class="content-section">
<div class="video-frame-wrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/xauNGofvsF4" title="Digital incident reports" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#Member-docs">Previous</button>
<button data-toggle_target="#HubHello">Next</button>
</div>
</div>';
$html_quest_induction = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Quest Induction</h2>
<div class="message-content">';
$html_quest_induction .= '
<div>
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="video-frame-wrapper mb-8px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/nTSlxwDkYV4?si=U52h5N9nmWy3ud7R" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<h4 class="video-bottom_title">Health and Safety procedures part 1</h4>
</div>
<div class="col-md-6 col-lg-4">
<div class="video-frame-wrapper mb-8px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/Fr7BjSdOP6k?si=2zyQT_mfVq-lcG24" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<h4 class="video-bottom_title">Health and Safety procedures part 2</h4>
</div>
<div class="col-md-6 col-lg-4">
<div class="video-frame-wrapper mb-8px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/je-h8o3LDK8?si=wpClMpaQhDfwW8Rg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<h4 class="video-bottom_title">Health and Safety procedures part 3</h4>
</div>
<div class="col-md-6 col-lg-4">
<div class="video-frame-wrapper mb-8px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/RGLGoG5S_0U?si=9KSNpCtLr5iZupGD" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<h4 class="video-bottom_title">Assessing the safety of the FDC environment</h4>
</div>
<div class="col-md-6 col-lg-4">
<div class="video-frame-wrapper mb-8px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/WNyCsdqPcyI?si=YdwrybVIwrNtdsaN" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<h4 class="video-bottom_title">Behaviour and child protection</h4>
</div>
<div class="col-md-6 col-lg-4">
<div class="video-frame-wrapper mb-8px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/rctRuOmQZjI?si=-wdKQHGgjl6yv9tG" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<h4 class="video-bottom_title">Edcuational programming</h4>
</div>
</div>
</div>
';
$html_quest_induction .= '
<div>
<div style="position: relative; width: 100%; height: 0; padding-top: 56.2500%;
padding-bottom: 0; box-shadow: 0 2px 8px 0 rgba(63,69,81,0.16); margin-top: 0.6em; margin-bottom: 1.9em; overflow: hidden;
border-radius: 8px; will-change: transform;">
<iframe loading="lazy" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0;margin: 0;"
src="https://www.canva.com/design/DAF9li-EdRM/QupBbipuFc43nYcZOF9wYw/view?embed" allowfullscreen="allowfullscreen" allow="fullscreen">
</iframe>
</div>
</div>
';
$html_quest_induction .= '
<div class="box-files-wrap">
<div class="box-file-item">
<a href="/wp-content/uploads/2024/06/Medicine-Administration-and-Medical-Conditions-Management.pdf" target="_blank">
<img decoding="async" width="53" height="69" src="/wp-content/uploads/2022/12/pdf-file-logo-1.png" class="" alt="pdf">
<h3 class="file-box-title">Medicine Administration and Medical Conditions Management</h3>
</a>
</div>
<div class="box-file-item">
<a href="/wp-content/uploads/2024/06/FDC-Safety.pdf" target="_blank">
<img decoding="async" width="53" height="69" src="/wp-content/uploads/2022/12/pdf-file-logo-1.png" class="" alt="pdf">
<h3 class="file-box-title">FDC Safety</h3>
</a>
</div>
<div class="box-file-item">
<a href="/wp-content/uploads/2024/06/Notifiable-Events.pdf" target="_blank">
<img decoding="async" width="53" height="69" src="/wp-content/uploads/2022/12/pdf-file-logo-1.png" class="" alt="pdf">
<h3 class="file-box-title">Notifiable Events</h3>
</a>
</div>
<div class="box-file-item">
<a href="/wp-content/uploads/2024/06/Financial-Business-Operations.pdf" target="_blank">
<img decoding="async" width="53" height="69" src="/wp-content/uploads/2022/12/pdf-file-logo-1.png" class="" alt="pdf">
<h3 class="file-box-title">Finacial Business Operations</h3>
</a>
</div>
</div>';
$html_quest_induction .= '
</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#Upload-docs">Previous</button>
<button data-toggle_target="#Member-docs">Next</button>
</div>
</div>';
$html_hubworks = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Hubworks CCS Software Setup</h2>
<div class="message-content text-left">';
$html_hubworks .= '
<p>As an educator with Quest FDC, you need to set up an Educator subscription license with Hubworks (our child care subsidy software provider). Our Educators pay their software license directly to Hubworks.</p>
<p><strong>Please apply for your software license by completing the Getting Started Questionaire form here:</strong></p>
<p><a href="https://ujevzgsy.paperform.co/" target="_blank" class="url-highlight">Getting Started Questionnaire (GSQ)</a>.</p>
<p>When you reach the questions about the date you started with your service and the date you would like your logins released by, please enter today’s date. When you reach the sections which asks about who owns the license, and who pays for the license, please select ‘Educator’.</p>
<p>Where the form asks who owns and pays for the license please select ‘Educator’.</p>
<p>Hubworks will then email you an invoice of $20 for your first month of software subscription. The 1st invoice should be paid immediately, notwithstanding that you have not yet opened your FDC business (please also note that future invoices will be emailed for subsequent months at $20 p/mth). This is to ensure that Hubworks issues your software login credentials within 24-48 hours and you can prepare to open your business.</p>
<p>Once you have been sent your Hubworks login credentials, please log into the Hubworks software and submit an application for Ipay to be activated on your software. Ipay is the system educators access within their software to automatically withdraw the gap fee from family bank accounts / credit cards each week. Ipay functionality should be applied for at the commencement of your orientation with Quest FDC as this can take some time to be approved.</p>
<p>To complete the Ipay application form you need to log in, then click on ‘Children’, then ‘Reports’, then ‘Ipay’, and submit the Ipay application form.</p>
';
$html_hubworks .= '
</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#Upload-docs">Next</button>
</div>
</div>';
$html_docs = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Programming in EarlyWorks</h2>
<div class="video-frame-heading"><h3 class="video-frame-title">Earlyworks Training for Quest Educators</h3></div>
<div class="video-frame-wrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/j36hJ2oaU5U" title="Earlyworks Training for Quest Educators" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<div class="video-frame-heading"><h3 class="video-frame-title">Printing educational program</h3></div>
<div class="video-frame-wrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/s6WTtbVsMuQ" title="Printing educational program" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<div class="message-content">';
$html_docs .= get_members_documents();
$html_docs .= '
</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#QuestInduction">Previous</button>
<button data-toggle_target="#FDCOperations">Next</button>
</div>
</div>';
$html_quest_training = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Quest Training</h2>
<div class="message-content">';
$html_quest_training .= get_quest_training_videos();
$html_quest_training .= '
</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#Member-docs">Previous</button>
<button data-toggle_target="#HubHello">Next</button>
</div>
</div>';
$html_vids = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">HubHello Tranining</h2>
<div class="content-section">
<p>You are now ready to start learning about our child care subsidy software Hubworks. Please click on the self-paced training package link below and work your way through the Hubworks training modules. Please work through the modules at your own pace noting that the training needs to be finished before you can be approved to start your FDC. After completion, Hubworks will check that at least 75% of your answers are correct and then issue your Hubworks Training Certificate via email.</p>
<!-- <div class="img-link-wrapper">
<a href="https://vimeo.com/643369160" target="_blank">
<img src="/wp-content/uploads/2022/12/HubHello-Quest-Training.jpg">
</a>
</div> -->
<h2 class="form-heading">Hubhello FDC Educator Training Videos</h2>
<div class="video-frame-wrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/B5W_pTIPwbo?si=vTZhTimPFLLcIycX&controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
<ol class="hub-videos">
<li>The landing page: <a href="https://vimeo.com/868185945" target="_blank">The Landing Page on Vimeo</a></li>
<li>The Children’s Page: <a href="https://vimeo.com/868186535" target="_blank">The Children’s Page - FDC Educator on Vimeo</a></li>
<li>Child’s Snapshot: <a href="https://vimeo.com/868185882" target="_blank">Child’s Snapshot FDC Educator on Vimeo</a></li>
<li>Children’s Schedules: <a href="https://vimeo.com/868185411" target="_blank">Schedules - FDC Educator on Vimeo</a></li>
<li>Notes: <a href="https://vimeo.com/868185622" target="_blank">Notes on Vimeo</a></li>
<li>Submitting Children’s Care Sessions: <a href="https://vimeo.com/868203164" target="_blank">Submitting - FDC Educator on Vimeo</a></li>
<li>Administration: <a href="https://vimeo.com/868185127" target="_blank">Administration - FDC Educator on Vimeo</a></li>
<li>Updating Vacancies Each Week: <a href="https://vimeo.com/868185495" target="_blank">Vacancies - FDC Educator on Vime</a></li>
<li>Electronic Sign /in: <a href="https://vimeo.com/868186358" target="_blank">Electronic Sign In on Vimeo</a></li>
<li>Feed Australia: <a href="https://vimeo.com/867011973" target="_blank">feedAustralia on Vimeo</a></li>
<li>Safe: <a href="https://vimeo.com/865810436" target="_blank">Safe (1) on Vimeo</a></li>
<li>Parent Portal: <a href="https://vimeo.com/868184966" target="_blank">Parent Portal - for services on Vimeo</a></li>
<li>Hubdesk – Searchable Knowledge Base: <a href="https://vimeo.com/868203363" target="_blank">HubDesk on Vimeo</a></li>
</ol>
</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#FDCOperations">Previous</button>
</div>
</div>';
$html_qa = '
<div class="document-upload-form-wrapper">
<h2 class="form-heading">Questions / Answers</h2>
<div class="message-content">';
$qa_passed = question_answer_status_passed();
if ( $qa_passed ) {
$html_qa .= '
<p><span class="qa-passed">PASSED</span></p>
<p>Congratulations on Successfully completing your Induction with Quest Family Day Care. Your membership with Quest FDC includes a subscription to REmida.</p>
<p>Your subscription allows you to visit and collect items from REmida as often as you like. On arrival to REmida, please notify staff you are with Quest Family Day Care. Staff will sign you into the REmida centre and you may start collecting any available items on display.</p>
<p>To find out more about the REmida Centre click here: <a href="https://www.remidawa.com/" target="_blank" rel="noopener">https://www.remidawa.com/</a></p>
<p class="mt-1em">You have completed our Quiz successfully now, Please join our Slack group:</p>
<p><a href="https://join.slack.com/t/questfdc/shared_invite/zt-1jn4g84h2-hYuF4KGzFrfUr1SQX02Z_A" rel="noopener">https://join.slack.com/t/questfdc/shared_invite/zt-1jn4g84h2-hYuF4KGzFrfUr1SQX02Z_A</a></p>
<p><a href="/24-7-member-portal/" class="qa-btn">24/7 Member Portal</a></p>
';
} else {
$html_qa .= do_shortcode( '[gravityform id="10" title="false" description="false" ajax="true"]' );
}
$html_qa .='</div>
<div class="steps-btn-wrapper">
<button data-toggle_target="#HubHello">Previous</button>';
if ( !$qa_passed ) {
$html_qa .='<button id="submitquiz">Submit</button>';
}
$html_qa .='</div>
</div>';
$html = '';
$html .= has_success_msg();
$html .= '
<ul class="cd-breadcrumb triangle nav nav-tabs '.($has_documents_uploaded && $doc_approved ? 'approved-all' : 'approved-all').'" role="tablist">
<li role="presentation" class="active">
<a href="#Hubworks" aria-controls="hubworks" role="tab" data-toggle="tab" aria-expanded="true">
<span class="octicon octicon-tools"></span>
<span class="tab-label">Hubworks</span>
<span class="tab-label-mobile">Hubworks</span>
</a>
</li>
<li role="presentation" class=" '.($has_documents_uploaded && $doc_approved ? '' : '').'">
<a href="#Upload-docs" aria-controls="upload-docs" role="tab" data-toggle="tab" aria-expanded="false">
<span class="octicon octicon-diff-added"></span>
<span class="tab-label">Upload Documents</span>
<span class="tab-label-mobile">Upload</span>
</a>
</li>
<li role="presentation" class="">
<a href="#QuestInduction" aria-controls="QuestInduction" role="tab" data-toggle="tab" aria-expanded="false">
<span class="octicon octicon-file-directory"></span>
<span class="tab-label">Quest Induction</span>
<span class="tab-label-mobile">Quest Induction</span>
</a>
</li>
<li role="presentation" class="">
<a href="#Member-docs" aria-controls="member-docs" role="tab" data-toggle="tab" aria-expanded="false">
<span class="octicon octicon-file-directory"></span>
<span class="tab-label">Programming in EarlyWorks</span>
<span class="tab-label-mobile">Programming in EarlyWorks</span>
</a>
</li>
<li role="presentation" class="">
<a href="#FDCOperations" aria-controls="FDCOperations" role="tab" data-toggle="tab" aria-expanded="false">
<span class="octicon octicon-tools"></span>
<span class="tab-label">FDC Operations</span>
<span class="tab-label-mobile">FDC Operations</span>
</a>
</li>
<li role="presentation" class="">
<a href="#HubHello" aria-controls="hubhello" role="tab" data-toggle="tab" aria-expanded="false">
<span class="octicon octicon-comment-discussion"></span>
<span class="tab-label">HubHello Training</span>
<span class="tab-label-mobile">HubHello Training</span>
</a>
</li>
</ul>
<div class="tab-content tab-content-step">';
$html .= '
<div role="tabpanel" class="tab-pane" id="QuestInduction">
'.$html_quest_induction.'
</div>';
$html .= '
<div role="tabpanel" class="tab-pane" id="FDCOperations">
'.$html_fdc_operations.'
</div>';
$html .= '
<div role="tabpanel" class="tab-pane active" id="Hubworks">
'.$html_hubworks.'
</div>';
$html .= '<div role="tabpanel" class="tab-pane modern-form" id="Upload-docs">';
if ( !$has_documents_uploaded || !is_null(current_doc_id()) ) :
$html .= $html_upload;
else:
if ( $has_documents_uploaded && !$doc_approved ) :
$html .= $html_review;
else:
$html .= $html_review_approved;
endif;
endif;
$html .= '</div>';
$has_documents_uploaded = true;
$doc_approved = true;
if ( $has_documents_uploaded && $doc_approved ) :
$html .=
'<div role="tabpanel" class="tab-pane" id="Member-docs">
'.$html_docs.'
</div>
<div role="tabpanel" class="tab-pane" id="HubHello">
'.$html_vids.'
</div>
<div role="tabpanel" class="tab-pane" id="Questions">
'.$html_qa.'
</div>';
endif;
$html .= '</div>';
$login = '
<div class="text-center">
<p>Please login first to access this page!</p>
<p><a href="/member-portal" class="elementor-button">Member Login</a></p>
</div>';
if ( !is_user_logged_in() ) {
echo $login;
} else {
echo $html;
}
}
add_shortcode('step-member-form', 'MemberStepForm');
function get_members_documents() {
$args = array(
'post_type' => 'member_only_resource',
'post_status' => 'publish',
'posts_per_page' => -1
);
$resource_query = new WP_Query( $args );
$html = '';
if ( $resource_query->have_posts() ) :
$html .= '<div class="doc-attachments">';
$html .= '<div class="attachments-wrapper">';
$html .= '<ul class="attachments">';
while ( $resource_query->have_posts() ) : $resource_query->the_post();
$filepath = pods_field( 'file_download._src' );
$filedir = dirname( $filepath );
$filebasename = str_replace('.', '-', basename($filepath)).'.jpg';
$thumbimg = $filedir.'/'.$filebasename;
if ( $filepath != "") :
$html .= '<li class="attachment">';
$html .= '<div class="attachment-preview">';
$html .= '<div class="thumbnail">';
$html .= '<div class="centered">';
$html .= '<img src="'.esc_url($thumbimg).'" class="img-thumbnail">';
$html .= '</div>';
$file = get_post_meta($resource_query->ID, 'file_download', true);
$html .= '<div class="filename"><div>'.basename($filepath).'</div></div>';
$html .= '
<div class="action_wrapper">
<div>
<a href="'.esc_url($filepath).'" target="_blank" class="view-file" data-postid="'.get_the_ID().'"><i aria-hidden="true" class="fas fa-eye"></i></a>
<a href="'.esc_url($filepath).'" download class="download-file" data-postid="'.get_the_ID().'"><i aria-hidden="true" class="fas fa-download"></i></a>
</div>
</div>';
$html .= '</div>';
$html .= '</div>';
$html .= '</li>';
endif;
endwhile;
$html .= '</ul>';
$html .= '</div>';
$html .= '</div>';
else:
$html .= '<p>No document resources available...</p>';
endif;
wp_reset_postdata();
return $html;
}
function get_members_videos() {
$args = array(
'post_type' => 'member_only_resource',
'post_status' => 'publish',
'posts_per_page' => -1
);
$resource_query = new WP_Query( $args );
$html = '';
if ( $resource_query->have_posts() ) :
$html .= '<div class="video-attachments">';
$html .= '<div class="attachments-wrapper">';
$html .= '<ul class="attachments">';
while ( $resource_query->have_posts() ) : $resource_query->the_post();
$youtube_link = pods_field( 'youtube_link' );
if ( $youtube_link[0] != "") :
$html .= '<li class="attachment">';
$html .= '<div class="attachment-preview">';
// $html .= '<p>'.$youtube_link[0].'</p>';
$vidurlId = explode("v=", $youtube_link[0]);
$videoTitle = youtube_title($vidurlId[1]);
$videothumb = 'http://img.youtube.com/vi/'.$vidurlId[1].'/maxresdefault.jpg';
// $html .= '<img src="http://img.youtube.com/vi/'.$videoid.'/maxresdefault.jpg" width="250"/>';
$html .= '<div class="video-box" style="background-image: url('.esc_url( $videothumb ).');background-position: center center;background-repeat: no-repeat;">';
$html .= '<div class="vid-title">'.$videoTitle.'</div>';
$html .= '<a href="'.$youtube_link[0].'" class="venobox play-btn vbox-item" data-vbtype="video" data-autoplay="true" data-postid="'.get_the_ID().'" data-vidtitle="'.$videoTitle.'"><i aria-hidden="true" class="fa fa-play-circle-o"></i></a>';
$html .= '</div>';
$html .= '</div>';
$html .= '</li>';
endif;
endwhile;
$html .= '</ul>';
$html .= '</div>';
$html .= '</div>';
else:
$html .= '<p>No video resources available...</p>';
endif;
wp_reset_postdata();
return $html;
}
function get_quest_training_videos() {
$args = array(
'post_type' => 'member_only_resource',
'post_status' => 'publish',
'posts_per_page' => -1
);
$resource_query = new WP_Query( $args );
$html = '';
if ( $resource_query->have_posts() ) :
$html .= '<div class="video-attachments">';
$html .= '<div class="attachments-wrapper">';
$html .= '<ul class="attachments">';
while ( $resource_query->have_posts() ) : $resource_query->the_post();
$youtube_link = pods_field( 'youtube_link' );
if ( $youtube_link[0] != "") :
$html .= '<li class="attachment">';
$html .= '<div class="attachment-preview">';
// $html .= '<p>'.$youtube_link[0].'</p>';
$vidurlId = explode("v=", $youtube_link[0]);
$videoTitle = youtube_title($vidurlId[1]);
$videothumb = 'http://img.youtube.com/vi/'.$vidurlId[1].'/maxresdefault.jpg';
// $html .= '<img src="http://img.youtube.com/vi/'.$videoid.'/maxresdefault.jpg" width="250"/>';
$html .= '<div class="video-box" style="background-image: url('.esc_url( $videothumb ).');background-position: center center;background-repeat: no-repeat;">';
$html .= '<div class="vid-title">'.$videoTitle.'</div>';
$html .= '<a href="'.$youtube_link[0].'" class="play-btn vbox-item" target="_blank"><i aria-hidden="true" class="fa fa-play-circle-o"></i></a>';
$html .= '</div>';
$html .= '</div>';
$html .= '</li>';
endif;
endwhile;
$html .= '</ul>';
$html .= '</div>';
$html .= '</div>';
else:
$html .= '<p>No video resources available...</p>';
endif;
wp_reset_postdata();
return $html;
}
// Step Form
// add_filter( 'gform_pre_render_9', 'prepare_upload_form_fields' );
// function prepare_upload_form_fields( $form ) {
// $user_doc_id = current_doc_id();
// foreach( $form['fields'] as &$field ) {
// if ( $field->id == 23 ) {
// $default_date = get_post_meta( $user_doc_id, 'police_clearance_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 24 ) {
// $default_date = get_post_meta( $user_doc_id, 'children_check_card_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 25 ) {
// $default_date = get_post_meta( $user_doc_id, 'cpr_training_certificate_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 26 ) {
// $default_date = get_post_meta( $user_doc_id, 'childcare_first_aid_training_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 27 ) {
// $default_date = get_post_meta( $user_doc_id, 'child_protection_training_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 28 ) {
// $default_date = get_post_meta( $user_doc_id, 'safe_infant_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 29 ) {
// $default_date = get_post_meta( $user_doc_id, 'food_safety_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 30 ) {
// $default_date = get_post_meta( $user_doc_id, 'drivers_license_or_alt_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 31 ) {
// $default_date = get_post_meta( $user_doc_id, 'public_liability_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// if ( $field->id == 32 ) {
// $default_date = get_post_meta( $user_doc_id, 'current_vehicle_expiry_meta_key', true );
// $field->defaultValue = wp_strip_all_tags($default_date);
// }
// }
// return $form;
// }
// Inser Post type "user_documents" before submit
// add_action( 'gform_pre_submission_9', 'create_post_user_documents', 10, 2 );
// function create_post_user_documents( $entry, $form ) {
// $current_user = wp_get_current_user();
// if ( is_null( current_doc_id() ) ) {
// $post_arr = array(
// 'post_type' => 'user_documents',
// 'post_title' => $current_user->user_firstname.' '.$current_user->user_lastname,
// 'post_status' => 'publish',
// 'post_author' => get_current_user_id(),
// 'meta_input' => array(
// 'police_clearance_meta_key' => '',
// 'children_check_card_meta_key' => '',
// 'termination_notice_meta_key' => '',
// 'ACECQA_Qualification_meta_key' => '',
// 'training_certificate_meta_key' => '',
// 'ChildcareFirstAidTraining_meta_key' => '',
// 'ChildProtectionTraining_meta_key' => '',
// 'SafeInfantSleepingTraining_meta_key' => '',
// 'FoodSafetyTraining_meta_key' => '',
// 'DriversLicenceOrAlt_meta_key' => '',
// 'HouseTitle_meta_key' => '',
// 'PublicLiabilityInsurance_meta_key' => '',
// 'CurrentVehicleRegistration_meta_key' => '',
// 'ComplianceHistoryStatement_meta_key' => '',
// 'MedicalSelfAssessment_meta_key' => '',
// 'AgreementtoComply_meta_key' => '',
// 'EducatorSuitabilityQuestionaire_meta_key' => '',
// 'residing_adults_meta_key' => '',
// 'membership_agreement_meta_key' => '',
// 'police_clearance_expiry_meta_key' => '',
// 'children_check_card_expiry_meta_key' => '',
// 'cpr_training_certificate_expiry_meta_key' => '',
// 'childcare_first_aid_training_expiry_meta_key' => '',
// 'child_protection_training_expiry_meta_key' => '',
// 'safe_infant_expiry_meta_key' => '',
// 'food_safety_expiry_meta_key' => '',
// 'drivers_license_or_alt_expiry_meta_key' => '',
// 'public_liability_expiry_meta_key' => '',
// 'current_vehicle_expiry_meta_key' => '',
// ),
// );
// $post_id = wp_insert_post( $post_arr );
// wp_set_object_terms( $post_id, array( 26 ), 'document_status' );
// $_POST['input_5'] = $post_id;
// } else {
// $_POST['input_5'] = current_doc_id();
// }
// }
// Update Post type "user_documents" before submit
// add_action( 'gform_after_submission_9', 'md_gform_after_submission_9', 10, 2 );
// function md_gform_after_submission_9( $entry, $form ) {
// if ( is_null( current_doc_id() ) ) {
// $post_arr = array(
// 'ID' => $entry[ '5' ],
// 'meta_input' => array(
// 'police_clearance_meta_key' => $entry[ '1' ],
// 'children_check_card_meta_key' => $entry[ '6' ],
// 'termination_notice_meta_key' => $entry[ '7' ],
// 'ACECQA_Qualification_meta_key' => $entry[ '8' ],
// 'training_certificate_meta_key' => $entry[ '3' ],
// 'ChildcareFirstAidTraining_meta_key' => $entry[ '9' ],
// 'ChildProtectionTraining_meta_key' => $entry[ '10' ],
// 'SafeInfantSleepingTraining_meta_key' => $entry[ '11' ],
// 'FoodSafetyTraining_meta_key' => $entry[ '12' ],
// 'DriversLicenceOrAlt_meta_key' => $entry[ '13' ],
// 'HouseTitle_meta_key' => $entry[ '14' ],
// 'PublicLiabilityInsurance_meta_key' => $entry[ '15' ],
// 'CurrentVehicleRegistration_meta_key' => $entry[ '16' ],
// 'ComplianceHistoryStatement_meta_key' => $entry[ '19' ],
// 'MedicalSelfAssessment_meta_key' => $entry[ '20' ],
// 'AgreementtoComply_meta_key' => $entry[ '21' ],
// 'EducatorSuitabilityQuestionaire_meta_key' => $entry[ '22' ],
// 'residing_adults_meta_key' => $entry[ '33' ],
// 'membership_agreement_meta_key' => $entry[ '34' ],
// 'police_clearance_expiry_meta_key' => $entry[ '23' ],
// 'children_check_card_expiry_meta_key' => $entry[ '24' ],
// 'cpr_training_certificate_expiry_meta_key' => $entry[ '25' ],
// 'childcare_first_aid_training_expiry_meta_key' => $entry[ '26' ],
// 'child_protection_training_expiry_meta_key' => $entry[ '27' ],
// 'safe_infant_expiry_meta_key' => $entry[ '28' ],
// 'food_safety_expiry_meta_key' => $entry[ '29' ],
// 'drivers_license_or_alt_expiry_meta_key' => $entry[ '30' ],
// 'public_liability_expiry_meta_key' => $entry[ '31' ],
// 'current_vehicle_expiry_meta_key' => $entry[ '32' ],
// ),
// );
// } else {
// $docs_meta_update = get_docs_post_meta_update( current_doc_id() );
// $data = [];
// foreach ($docs_meta_update as $meta) {
// $data += [ $meta['meta_key_update'] => $entry[ $meta['id'] ] ];
// if ( !empty( $meta['meta_key_status'] ) ) {
// $data += [ $meta['meta_key_status'] => 'On Review' ];
// }
// }
// $post_arr = array(
// 'ID' => $entry[ '5' ],
// 'meta_input' => $data,
// );
// }
// wp_update_post( $post_arr );
// $msg = 'Thank you. Documents successfully uploaded!';
// set_success_msg($msg);
// }
// add_filter( 'gform_pre_render_9', 'prepare_form_fields' );
// function prepare_form_fields( $form ) {
// $html_content = "Test only";
// foreach( $form['fields'] as &$field ) {
// // echo '<pre>';
// var_dump($field->content);
// if ( $field->id == 5 ) {
// $field->content = $html_content;
// }
// }
// return $form;
// }
// add_filter( 'gform_field_content_9', 'subsection_field', 10, 2 );
// function subsection_field( $field_content, $field ) {
// if ( !is_null( current_doc_id() ) ) {
// $docs_meta = docs_post_meta( current_doc_id() );
// foreach ($docs_meta as $meta) {
// if ( $field->id == $meta['id'] ) {
// $statusClss = str_replace(' ', '-', strtolower($meta['status']));
// $field_content = str_replace( "class='gfield_label", "class='gfield_label field_uploaded ", $field_content );
// if ($meta['status'] == "Approved" || $meta['status'] == "On Review") {
// $field_content = str_replace( "class='ginput_container", "class='ginput_container field_uploaded ", $field_content );
// }
// $status = "<div class='status-wrap'><span class='upload-status ".$statusClss."'>".$meta['status']."</span></div>";
// $field_content = str_replace( '<label', "".$status."<label", $field_content );
// $html = "<div class='placement-wrap'>Successfully uploaded</div>";
// if ($meta['status'] == "Disapproved") {
// $html = "<div class='placement-wrap disapproved-text'>Please upload again.</div>";
// }
// $field_content = str_replace( '</label>', "</label>".$html."", $field_content );
// return $field_content;
// }
// }
// }
// return $field_content;
// }
function question_answer_status_passed() {
$current_user = wp_get_current_user();
$user_id = $current_user->ID;
$status = get_user_meta( $user_id, 'questions_answer_passed', true );
return $status;
}
add_action( 'gform_after_submission_10', 'md_gform_after_submission_10', 10, 2 );
function md_gform_after_submission_10( $entry, $form ) {
if ( is_user_logged_in() && $entry["gquiz_percent"] == 100 ) {
$current_user = wp_get_current_user();
$user_id = $current_user->ID;
update_user_meta( $user_id, 'questions_answer_passed', 1 );
update_user_meta( $user_id, 'quiz_date_passed', date("F j, Y h:i A") );
}
}