Home › Forums › WPLMS AddOns › WPLMS Batches › Leaderboard according batches
- This topic has 87 replies, 8 voices, and was last updated 4 years, 2 months ago by Scott Lang.
-
AuthorPosts
-
January 15, 2020 at 6:30 am #239417Scott LangModeratorIn-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_idJanuary 15, 2020 at 6:53 am #239422ratlsadminSpectatorHi Scott, Thank you so much, that is what I needed.January 15, 2020 at 1:39 pm #239488Scott LangModeratorThanks for your response we are closing this topic.January 17, 2020 at 6:47 am #239670ratlsadminSpectatorThis reply has been marked as private.January 17, 2020 at 2:51 pm #239764Scott LangModeratorYes, 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.January 18, 2020 at 6:00 am #239827ratlsadminSpectatorHey Scott, Still waiting on your reply, please check and revert back pleaseJanuary 18, 2020 at 12:58 pm #239850MrVibeKeymasterIn 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.January 20, 2020 at 10:27 am #239936Scott LangModeratorfor 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_apiJanuary 23, 2020 at 10:33 am #240327ratlsadminSpectatorHi Scott, Can you please explain the above message a little more in a simpler manner. I found it difficult to understand, and implement it.January 24, 2020 at 6:08 am #240441Scott LangModeratorFilter 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 completionadd_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 hookAlso, you need to know which data is passed on assignment upload you need the user_id,UNIT_ID,course_idJanuary 24, 2020 at 5:37 pm #240525ratlsadminSpectatorThis reply has been marked as private.January 27, 2020 at 6:29 am #240680Scott LangModeratorHi, 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.January 27, 2020 at 6:30 am #240681Scott LangModeratorOr just create a button in-app which complete the unit.January 28, 2020 at 6:06 am #240795ratlsadminSpectatorThis reply has been marked as private.January 28, 2020 at 6:34 am #240798Scott LangModeratorHi, 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. -
AuthorPosts
- The topic ‘Leaderboard according batches’ is closed to new replies.