Hi,
How can I display de course curriculum (title of sections and title of units) when generated the certificate?
Like the certificate_code but a personalized
Hi,
There is no shortcode present for this in wplms as of now.
Please let me know how you want to show the curriculum in a certificiate, give an example how the certificate will look with a curriculum. And what if the curriculum is very large.
Hi,
Oh no :c
I want to display the curriculum in list like this:
Curriculum:
- Title section
- Title section
....
If curriculum is very large the certificate generate multiple pages or a long certificate.
Thx for help!
Hi,
So you need a shortcode for just displaying the course curriculum sections, in your example you mentioned only the sections.
Is it correct ?
Hi,
I need this titles on curriculum: https://prnt.sc/gf1sfp
Yes, a shortcode showing this title can be perfect.
Hi,
Add the bellow code in your wplms-customizer.php file present in wp-admin->plugins->editor->select wplms customizer plugin->wplms-customizer.php file:
add_shortcode('certificate_course_curriculum','custom_show_certificate_course_curriculum');
function custom_show_certificate_course_curriculum( $atts, $content = null ){
$id = $_GET['c'];
if(isset($id) && $id){
$course_curriculum = bp_course_get_curriculum($id);
if(!empty($course_curriculum)){
$arr = array();
foreach ($course_curriculum as $curriculum) {
if(is_numeric($curriculum))
$arr[] = get_the_title($curriculum);
else
$arr[] = $curriculum;
}
}
}
if(!empty($arr)){
$echo = '<div><ul>';
foreach ($arr as $ouput) {
$echo .= '<li>'.$ouput.'</li>';
}
$echo .= '</ul></div>';
return $echo;
}
else
return '[certificate_course_curriculum]';
}
Now you can use [certificate_course_curriculum] shortcode in the certificate.