Home › Forums › Legacy Support › Support queries › Styling issues › Datils units – Curriculum
- This topic has 9 replies, 4 voices, and was last updated 4 years, 5 months ago by Diana.
Viewing 10 posts - 1 through 10 (of 10 total)
-
AuthorPosts
-
October 31, 2019 at 4:57 pm #231859tuaptitudSpectatorHello team, Is it possible to add some code or program something so that the details of the course (in the curriculum) are shown only of the free units? In units that are not free it should seem like a deactivated link I do not want to deactivate, but have an active link only those of free units so that anyone can see the content. View image: https://prnt.sc/pqqzcmNovember 1, 2019 at 1:17 pm #231987VeronicaModeratorhi, fine, you can directly remove these links by <span style="color: #4b4d4d; font-family: Lato; font-size: 14px;">edit the course and go to the settings section, and hide the "full units in curriculum" setting. This will remove the details from the curriculum.</span> and if you don't want to remove this so please note down that admin has all the rights. log in as a student and then you will find that only the free units can be accessed by the student and the other one shows as a deactivated link. check here:http://somup.com/cqXVIofilO you can see here the setting should be disabled to restrict the student for accessing the units which are not free but the details can be accessed so simply remove the details link.November 8, 2019 at 4:19 pm #232809tuaptitudSpectatorHello Team, What I need is: -The web visitor (not logged in) and the user (logged in, but not a student of the course) can view the course content by clicking on "details" of the free units. Units that are not free will not be able to access the content by clicking on "details" (only the text "details" will appear but without access, gray text will not be a link)
- The student of the course can access any unit from the preview of "details" or from the Course Status page.
November 9, 2019 at 8:40 am #232857loganMemberHello, no that's not possible, i can do only one thing if the user is not logged in and not enrolled in a course then i will show the details button or it will be invisible.November 9, 2019 at 2:52 pm #232889tuaptitudSpectatorThis reply has been marked as private.November 11, 2019 at 10:56 am #233021loganMemberHola, i have done it for a good rating and detailed review. Please paste this snippets in your wp-admin >> plugins >> editor >> wplms-customizer plugin >> wplms-customizer.php Or in Please add this code in your wplms-customizer.php file in wplms customizer plugin by using your FTP/SFTP/cpanel: add_action('init',function(){ $init = bp_course_filters::init(); remove_filter('wplms_curriculum_course_lesson',array($init,'course_lesson_details'),10,3); }); add_filter('wplms_curriculum_course_lesson','course_lesson_details_custom',10,3); function course_lesson_details_custom($title,$unit_id,$course_id =null){ $init = bp_course_filters::init(); if(empty($course_id)){ global $post; if($post->post_type == 'course'){ $course_id = get_the_ID(); }else{ return $title; } } $check_course_lesson = get_post_meta($course_id,'vibe_course_unit_content',true); $free = get_post_meta($unit_id,'vibe_free',true); if(vibe_validate($check_course_lesson) && vibe_validate($free)){ add_action('wp_footer',array($init,'print_css_adjustments')); $title .= ' <a class="curriculum_unit_popup link" data-id="'.$unit_id.'" data-course="'.$course_id.'">'._x('Details','Unit details link anchor for full unit content','vibe').'</a>'; }elseif(vibe_validate($check_course_lesson) && wplms_user_course_active_check(get_current_user_id(),$course_id)){ add_action('wp_footer',array($init,'print_css_adjustments')); $title .= ' <a class="curriculum_unit_popup link" data-id="'.$unit_id.'" data-course="'.$course_id.'">'._x('Details','Unit details link anchor for full unit content','vibe').'</a>'; } return $title; } refer: http://prntscr.com/pvbvooNovember 12, 2019 at 12:09 am #233083tuaptitudSpectatorHello team, It worked perfect, with the first part of the code (even before the image link) I didn't quite understand what the second part of the code you provided for me is. Thank youNovember 12, 2019 at 7:00 am #233111VeronicaModeratorHello, this is #logan correcting the #veronica's reply. that was my bad, i accidentally posted the code twice in a row back to back. please use the code above that i shared that will work. i tested this twice.
as i told you i am having hope that you will share the good review about your experience with us.November 12, 2019 at 4:05 pm #233193tuaptitudSpectatorthank you Where I put the rating and comments. In Envato?November 12, 2019 at 6:20 pm #233202DianaParticipant@tuaptitud Please do rate the efforts of our team by sharing your experience here. https://themeforest.net/item/wplms-learning-management-system/reviews/6780226 -
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)
- The topic ‘Datils units – Curriculum’ is closed to new replies.