Assign certificates to students

Home Forums Legacy Support Support queries How-to & Troubleshooting Assign certificates to students

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #220380
    gsjaak_118
    Participant
    Hi Where can i find the code that determines whether an instructor can assign certificates to course students? I have created a new user role for my instructors, and now they cannot do this action anymore. (I have the backend setting enabled). They still can send messages and add people to the course though. Would love to hear from you! Kind regards
    #220516
    logan
    Member
    Hello, here it is: http://prntscr.com/ombuwf add_filter('wplms_course_admin_bulk_actions_list','wplms_course_admin_bulk_actions_add_students_list'); function wplms_course_admin_bulk_actions_add_students_list($list){ $instructor_add_students = vibe_get_option('instructor_add_students'); if(isset($instructor_add_students) && $instructor_add_students || current_user_can('manage_options')) $list .= '<li><a href="#" class="expand_add_students tip" title="'.__('Add Students to Course','vibe').'"><i class="icon-users"></i></a></li>';   return $list; }
    #220625
    gsjaak_118
    Participant
    Hi! Thanks, i tried modifying this so it would show up for my custom user role but unfortunately the issue is not here. I see that the div that handles these functions is not loaded on the page (see https://prnt.sc/omk7zx) So i guess there is user role check that determines whether this is printed yes or no. Could you tell me where I can find this (so this class: bulk_assign_students) Kind regards
    #220660
    logan
    Member
    Hello, everything is handled by that shared page. there is no other coding related to the frontend. please share your all custom codes and then i will look into the possibility.
    #220674
    gsjaak_118
    Participant
    hmm sure? Then where are these divs created (<span style="color: #4b4d4d; font-family: Lato; font-size: 14px;">https://prnt.sc/omk7zx)</span>? I cant find these in the file you pointed out. The problem is dat i am using a custom user role so instructors have a different role then instructor. Admins can still use this function. So i guess there should be an if statement somewhere that only allows instructors or admins.
    #220896
    Anshuman Sahu
    Keymaster
    Well you have to make the vendor as course author if you wish that vendor can assign certificates to students . use this plugin to add multiple authors in course : https://wplms.io/support/knowledge-base/wplms-coauthor-plus-integration/
    #221065
    gsjaak_118
    Participant
    hi thanks! well the strange thing is that the vendor is the course author. so unfortunately this is not the fix. Only the user role instructor seems to be able to assign it (admin). But i don't know by which capability this is filtered. It does not seem to be handled with in the code you pointed out earlier. (as changing that if statement does nog change anything).
    #221430
    logan
    Member
    Hello, add this code into your wp-admin >> plugins >> plugin editor. add_action('wplms_course_admin_bulk_actions','bp_course_admin_assign_students2',20); function bp_course_admin_assign_students2(){ $user_id = get_current_user_id(); // Get the user object. $user = get_userdata( $user_id ); // Get all the user roles as an array. $user_roles = $user->roles; if(in_array( 'vendor', $user_roles )){ echo' <div class="bulk_assign_students"> <select id="assign_action" name="assign_action"> <option value="add_badge">'.__('ASSIGN COURSE BADGE','vibe').'</option> <option value="add_certificate">'.__('ASSIGN COURSE CERTIFICATE','vibe').'</option> <option value="remove_badge">'.__('REMOVE COURSE BADGE','vibe').'</option> <option value="remove_certificate">'.__('REMOVE COURSE CERTIFICATE','vibe').'</option> </select> <a href="#" id="assign_course_badge_certificate" data-course="'.get_the_ID().'" class="button full">'.__('Assign Action','vibe').'</a>'; echo '</div>'; } }
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Assign certificates to students’ is closed to new replies.