<?php the_title(); ?> </h1> <?php the_sub_title(); ?> </div> </div> <div class="col-md-3 col-sm-4"> <?php $course_id = get_post_meta(get_the_ID(), 'vibe_assignment_course', true); if (isset($course_id) && is_numeric($course_id)) { if (is_user_logged_in()) { $user_id = get_current_user_id(); if (wplms_user_course_active_check($user_id, $course_id)) { $take_course_page = get_permalink(vibe_get_option('take_course_page')); echo '<form action="' . $take_course_page . '" method="post">'; echo '<input type="submit" class="button full create-group-button" value="' . __('Back to Course', 'vibe') . '">'; wp_nonce_field('continue_course' . $user_id, 'continue_course'); echo '<input type="hidden" name="course_id" value="' . $course_id . '" />'; echo '</form>'; } else { echo '<a href="' . get_permalink($course_id) . '" class="button create-group-button full">' . __('Back to Course', 'vibe') . '</a>'; } } else { echo '<a href="' . get_permalink($course_id) . '" class="button create-group-button full">' . __('Back to Course', 'vibe') . '</a>'; } } else { vibe_breadcrumbs(); }
</div> <div class="col-md-3 col-sm-3"> <div class="quiz_next"> <?php if (is_user_logged_in()) { if (isset($quiztaken) && $quiztaken) { if ($quiztaken > time()) { echo apply_filters('wplms_continue_quiz_button', '<a class="button create-group-button full begin_quiz" data-quiz="' . get_the_ID() . '"> ' . __('Continue Quiz', 'vibe') . '</a>', get_the_ID()); wp_nonce_field('start_quiz', 'start_quiz'); } else { $quiz_unfinished_check = get_post_meta(get_the_ID(), $user_id, true); if (!isset($quiz_unfinished_check) || $quiz_unfinished_check == '') { add_post_meta(get_the_ID(), $user_id, 0); } $quiz_course = get_post_meta(get_the_ID(), 'vibe_quiz_course', true); if (isset($quiz_course) && is_numeric($quiz_course) && $quiz_course && wplms_user_course_active_check($user_id, $quiz_course)) { echo '<a href="' . bp_loggedin_user_domain() . BP_COURSE_SLUG . '/' . BP_COURSE_RESULTS_SLUG . '/?action=' . get_the_ID() . '" class="button full"> ' . __('Check Quiz Results', 'vibe') . '</a>'; $take_course_page = get_permalink(vibe_get_option('take_course_page')); echo '<form action="' . $take_course_page . '" method="post">'; echo '<input type="submit" class="button full" value="' . __('Back to Course', 'vibe') . '">'; wp_nonce_field('continue_course' . $user_id, 'continue_course'); echo '<input type="hidden" name="course_id" value="' . $quiz_course . '" />'; echo '</form>'; //echo '<a href="'.get_permalink($quiz_course).'" class="button full"> '.__('Back to Course','vibe').'</a>'; } else { echo '<a href="' . bp_loggedin_user_domain() . 'course/course-results/?action=' . get_the_ID() . '" class="button create-group-button full"> ' . __('Check Quiz Results', 'vibe') . '</a>'; } } } else { echo apply_filters('wplms_start_quiz_button', '<a class="button create-group-button full begin_quiz" data-quiz="' . get_the_ID() . '"> ' . __('Start Quiz', 'vibe') . '</a>', get_the_ID()); wp_nonce_field('start_quiz', 'start_quiz');