SupportCategory: LearnPLUS - HTML5Learnplus Course.php – only shows lessons, not topics
saq asked 8 years ago

hi there, the original learndash template on the course page has a full descriptin of the course and the ability fo rthe user to see both the lessons and the topics. However in the LearnPlus theme, the user can only see the lessons and quizzes but there is no view in the table to see the breakdown of the topics. I have located the code in the course.php but there needs to be another row to include a breakdown of the topics. The code is here I think::
<?php if ( $has_course_content ) : ?>
<div class="course-table">
<?php if ( ! empty( $lessons ) || ! empty( $quizzes ) ) : ?>

                <table class="table">
                    <thead>
                    <tr>
                        <th><?php esc_html_e( 'Type', 'learnplus' ) ?></th>
                        <th><?php esc_html_e( 'Lesson Title', 'learnplus' ) ?></th>
                        <th><?php esc_html_e( 'Time', 'learnplus' ) ?></th>
                        <th><?php esc_html_e( 'Status', 'learnplus' ) ?></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if ( ! empty( $lessons ) ) : ?>
                        <?php foreach ( $lessons as $lesson ) : ?>
                            <?php $lesson_settings = get_post_meta( $lesson['post']->ID, '_sfwd-lessons', true ) ?>
                            <tr>
                                <td><i class="fa fa-play-circle"></i></td>
                                <td>
                                    <a href="<?php echo esc_url( $lesson['permalink'] ); ?>"><?php echo $lesson['post']->post_title; ?></a>
                                    <?php
                                    /**
                                     * Not available message for drip feeding lessons
                                     */
                                    ?>
                                    <?php if ( ! empty( $lesson['lesson_access_from'] ) ) : ?>
                                        <small class="notavailable_message">
                                            <?php echo sprintf( esc_html__( 'Available on: %s ', 'learnplus' ), date_i18n( 'd-M-Y', $lesson['lesson_access_from'] ) ); ?>
                                        </small>
                                    <?php endif; ?>
                                </td>
                                <td><?php echo $lesson_settings['sfwd-lessons_forced_lesson_time'] ?></td>
                                <td>
                                    <?php if ( 'notcompleted' == $lesson['status'] ) : ?>
                                        <i class="fa fa-close"></i>
                                    <?php else : ?>
                                        <i class="fa fa-check"></i>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                    <?php endif; ?>

                    <?php if ( ! empty( $quizzes ) ) : ?>
                        <?php foreach ( $quizzes as $quiz ) : ?>
                            <tr>
                                <td><i class="fa fa-question-circle"></i></td>
                                <td>
                                    <a href="<?php echo esc_url( $quiz['permalink'] ); ?>"><?php echo $quiz['post']->post_title; ?></a>
                                </td>
                                <td>&nbsp;</td>
                                <td>
                                    <?php if ( 'notcompleted' == $quiz['status'] ) : ?>
                                        <i class="fa fa-close"></i>
                                    <?php else : ?>
                                        <i class="fa fa-check"></i>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                    <?php endif; ?>
                    </tbody>
                </table>
            <?php endif; ?>
        </div><!-- end course-table -->
    <?php endif; ?>
2 Answers
templatevisual Staff answered 8 years ago

Hello i am sorry i am not getting what you want to achieve. You want customization ?

saq answered 8 years ago

Hi sorry, quick explanation –
This is regarding the course overview display on your template.
The original learn dash course overview displays the whole course structure (lessons, topics, quizzes).
However the learnplus template on course.php only displays the lessons but nott the topic breakdown. I do feel it’s a flaw in the template and would recommend the code is edited at takes away a function of the original learndash system.
However if you feel it’s a customization please can I request an additional piece of code to display full course structure.
Many thanks

Copyright © 2014 - 2017 Designed by Templatevisual