Leaderboard according batches

Home Forums WPLMS AddOns WPLMS Batches Leaderboard according batches

Viewing 15 posts - 61 through 75 (of 88 total)
  • Author
    Posts
  • #239417
    Scott Lang
    Moderator
    In-App profile tab batch shows user batch(Which you can not use because it needs some data to pass) but you can create your own API as I have done for batch and user API. If you have user_id : For getting batch ids for user_id to refer this function batch-plugin>includes>class.functions.php>function get_user_batches($user_id) You can use above like this:
    $wplms_batches = WPLMS_Batch_Functions::init();
    $batch_ids=$wplms_batches->get_user_batches($user_id); // specify here user_id

    If you have not user id : Then you have to login in to App first and you will get a token which sends to API for getting user id using function get_user_from_token($token)>Then you will fetch user's batch ids. Means fetch user_id from token > fetch batch_ids from user_id > fetch further details for each batch_id
    #239422
    ratlsadmin
    Spectator
    Hi Scott, Thank you so much, that is what I needed.
    #239488
    Scott Lang
    Moderator
    Thanks for your response we are closing this topic.
    #239670
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #239764
    Scott Lang
    Moderator
    Yes, we know in the app when the user opens the unit is completed the unit automatically. Please let me check if I can do anything just to bypass that completion function. Also same for assignment upload to unit complete.
    #239827
    ratlsadmin
    Spectator
    Hey Scott, Still waiting on your reply, please check and revert back please
    #239850
    MrVibe
    Keymaster
    In assignment settings there is an option to connect assignment with course and include in course evaluation. IF the assignment is not complete then the user will not be able to finish the course.
    #239936
    Scott Lang
    Moderator
    for this, we have to add some filter and action to our core code and else part will be done from you. Refer this new code for vibe-course-module/includes/api.class-api-user-controller.php :https://bit.ly/2sG9bxX Filter name:course_status_item_bp_course_update_user_unit_completion_time Assignment action:After_assignment_upload_api
    #240327
    ratlsadmin
    Spectator
    Hi Scott, Can you please explain the above message a little more in a simpler manner. I found it difficult to understand, and implement it.
    #240441
    Scott Lang
    Moderator
    Filter name:course_status_item_bp_course_update_user_unit_completion_time use to disable the course completion on the opening unit in App. You have to write code to your customizer plugin to disable auto unit completion
    add_filter('bp_course_get_course_duration',function($enable){
    return false;
    },10,1);
    Assignment action: After_assignment_upload_api is action hooks to perform any task on that hook
    Also, you need to know which data is passed on assignment upload you need the user_id,UNIT_ID,course_id
    #240525
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #240680
    Scott Lang
    Moderator
    Hi, We have updated your code. Also, you need knowledge about PHP and WordPress to make some changes. Also, we have added code for auto unit complete prevention code in customizer. But for the assignment you need to do by yourself.
    #240681
    Scott Lang
    Moderator
    Or just create a button in-app which complete the unit.
    #240795
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #240798
    Scott Lang
    Moderator
    Hi, Can you share where we assign points from the server. We exactly not understand. Please share some screenshot, URL or video with us. We have to check to our end too.  
Viewing 15 posts - 61 through 75 (of 88 total)
  • The topic ‘Leaderboard according batches’ is closed to new replies.