pzo3xic
Forum Replies Created
-
Forum: Plugins
In reply to: [Namaste! LMS] Lesson to be seen by everyoneHi
Thanks for reply
Is there any other way? By adding content into excerpt it displays whole page content in
meta description tag.Regards
Forum: Plugins
In reply to: [Namaste! LMS] prev-lesson and next-lesson don’t check if lesson is availablesorted
function previous_and_next_lesson_shortcode() { $msg = '<div class="center-pagination sidebar"><nav aria-label="Page navigation"><ul class="pagination justify-content-end">'; if (!empty(do_shortcode('[namaste-prev-lesson "Previous"]'))) { $msg .= '<li class="page-item">'.do_shortcode('[namaste-prev-lesson "<span class=\'oi oi-chevron-left\'></span>"]').'</li>'; } else { $msg .= '<li class="page-item disabled"> <a class="page-link" href="#" title="#" tabindex="-1"><span class=\'oi oi-chevron-left\'></span></a></li>'; } if (!empty(do_shortcode('[namaste-next-lesson "Next"]')) AND (trim(strip_tags(do_shortcode('[namaste-lesson-status]')))) == 'Completed') { $msg .= '<li class="page-item">'.do_shortcode('[namaste-next-lesson "<span class=\'oi oi-chevron-right\'></span>"]').'</li>'; } else { $msg .= '<li class="page-item disabled"> <a class="page-link" href="#" title="#" tabindex="-1"><span class=\'oi oi-chevron-right\'></span></a></li>'; } $msg .= '</ul></nav></div>'; return $msg; } add_shortcode( 'previous_and_next_lesson', 'previous_and_next_lesson_shortcode' );
What about:
<?php echo '<a href="/login?redirect_to='.get_permalink().'">Your login link with redirect</a>'; ?>
Forum: Plugins
In reply to: [CM Tooltip Glossary] display tooltips on specific page categoryAhh ok that will do! ??
Forum: Plugins
In reply to: [Namaste! LMS] Get course status (completed or not) in phpI just come up with a workaround:
function course_1_completed_check_shortcode($atts = [], $content = null) { $lesson1 = do_shortcode( '[namaste-lesson-status lesson_id="600"]' ); $lesson2 = do_shortcode( '[namaste-lesson-status lesson_id="700"]' ); if ($lesson1 =='Completed' AND $lesson2 =='Completed') { $content = 'Course completed <span class="oi oi-check"></span>'; return $content; } else return $content; } add_shortcode( 'course_1_completed_check', 'course_1_completed_check_shortcode' );
the above is in functions.php
then in lesson HTML I use:
<div class="alert alert-info">[course_1_completed_check]You joined this course. See lessons below.[/course_1_completed_check]</div>
which will display that user has enrolled but if completed all lessons it displays “Course completed”.The above involves a lot of work for a single course and it also means I won’t be able to delegate creating courses to others. Please don’t think of it as final solution.
- This reply was modified 5 years, 8 months ago by pzo3xic.