<?php 
}
/*
Quizzes
*/
if ($quizzes) {
    ?>
<h4><?php 
    _e('You have taken the following quizzes:', 'learndash');
    ?>
</h4>
<?php 
    foreach ($quizzes as $k => $v) {
        $quiz = get_post($v['quiz']);
        $passstatus = isset($v['pass']) ? $v['pass'] == 1 ? "green" : "red" : "";
        $c = learndash_certificate_details($v['quiz'], $user_id);
        $certificateLink = $c['certificateLink'];
        $certificate_threshold = $c['certificate_threshold'];
        $quiz_title = !empty($quiz->post_title) ? $quiz->post_title : @$v['quiz_title'];
        if (!empty($quiz_title)) {
            ?>
	<p>
		<span style="color:<?php 
            echo $passstatus;
            ?>
"><strong><?php 
            echo __('Quiz', 'learndash');
            ?>
</strong>: <?php 
            echo $quiz_title;
            ?>
    if ($enrolled == 'Completed') {
        $points = '<ul class="cpd-register">
														   <li><h5><b>SMSF Association</b></h5><p><b>Accreditation Activity Code : </b>' . $accreditation_activity_code[0] . '</p>
														   <p><b>SMSFA Points : </b>' . $cpd_points[0] . '</p>
															<p><b>Expiry Date : </b>' . $expiry_date_cpd[0] . '</p></li>
														   <li><h5><b>Major accounting bodies (CPA, CAANZ, IPA)</b></h5><p><b>CPE Hours : </b>' . $cpe_points[0] . '</p></li>
														   <li><h5><b>Financial Planning Association</b></h5><p><b>FPA Points : </b>' . $fpa_points[0] . '</p>
															<p><b>Expiry Date : </b>' . $expiry_date_fpa[0] . '</p></li></ul>';
        //need to add timestamp
        $car = $courseQuizArr[$course_id];
        if (strlen($car) > 0) {
            //echo 'Going to use Quiz<br/>';
            $certificate = learndash_certificate_details($courseQuizArr[$course_id], $user_id);
        } else {
            //echo 'Going to use Course<br/>';
            $certificate = learndash_certificate_details($course_id, $user_id);
            echo print_r($certificate, true);
        }
        $certificate = '<a href="' . $certificate['certificateLink'] . '" target="_blank">Download</a>';
    } else {
        $points = '<ul class="cpd-register">
														   <li><h5><b>SMSF Association</b></h5><p><b>Accreditation Activity Code : </b>' . $accreditation_activity_code[0] . '</p>
														   <p><b>SMSFA Points : </b>' . $cpd_points[0] . '</p>
															<p><b>Expiry Date : </b>' . $expiry_date_cpd[0] . '</p></li>
														   <li><h5><b>Major accounting bodies (CPA, CAANZ, IPA)</b></h5><p><b>CPE Hours : </b>' . $cpe_points[0] . '</p></li>
														   <li><h5><b>Financial Planning Association</b></h5><p><b>FPA Points : </b>' . $fpa_points[0] . '</p>
															<p><b>Expiry Date : </b>' . $expiry_date_fpa[0] . '</p></li></ul>';
        $certificate = 'N/A';
    }
    //}
    //$completedOrNot = get_user_meta( $user_id, 'course_completed_'.$key, $single );