Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › add take this course button and cutom data to course item
- This topic has 20 replies, 2 voices, and was last updated 9 years, 1 month ago by Anshuman Sahu.
-
AuthorPosts
-
October 7, 2015 at 3:33 pm #1892samehmParticipant1.i want to add button join this course without need to enter the course it self 2.how i can allow the user to take one course only from each category 3.i want to insert a cutom data to item viewOctober 8, 2015 at 1:17 pm #2047Anshuman SahuKeymaster1. You can provide link to the course product on your custom button to do this ,once ser buys the product she would simply get access to course. 2. Sorry,This is not available in wplms as of now . 3. For adding custom data you need to create a custom featured block . Please refer : https://wplms.io/support/knowledge-base/creating-custom-featured-block-style/October 14, 2015 at 12:50 pm #2942samehmParticipantthanks for reply regarding 1: we are talking about free courses i'm simply want to add button automaticly for each course item in order to be able to register to the course without viewing the full course. regarding pooint 2: i need to know what is the name of course registeration function i can write the query and the code which check weather he is registered to another course in the same category . but i need to know where to put it thanksOctober 15, 2015 at 10:41 am #3134Anshuman SahuKeymaster1. The user when opens the free course page she will automatically gets added to the course . 2. Use filter : wplms_take_course_button , it returns the Button HTML and accepts course_id as argument. add_filter('wplms_take_course_button','myfx',10,2); function myfx($course_button_html,$course_id){ $user_id = get_current_user_id(); //Check if user has taken a course from course category using $course_id, $user_id //return blank if you want to hide the button. return $course_button_html; }October 15, 2015 at 9:33 pm #3233samehmParticipantthanks for reply regarding point 1 : i want the student to be added for free course only if he clicks on the button and there still a seat for him. in order to make the process very smooth i need to add the button to the item data the student just need to click in the button and if there is a seat available he will be added to the course . thanks a lotOctober 15, 2015 at 10:20 pm #3236samehmParticipantanother thing ,i want to offer a free course for the first 25 peope who register for this course . but if i set the course as free the Maximum Students in Course deosn't make sense what to do in this case.October 15, 2015 at 11:04 pm #3237samehmParticipanthow to add cancel course button in the my courses area?October 16, 2015 at 11:50 am #3315Anshuman SahuKeymasterYou can set the maximum number of seats in the course settings . If you set max seats to be " 25 " then more than 25 students could not take that fee course . There is no such button can be added in the students my courses area ,ony instructor has right to add or remove students from the course .October 16, 2015 at 12:00 pm #3319samehmParticipantthanks for reply i waiting for your ansers regarding this point: i want the student to be added for free course only if he clicks on the button and there still a seat for him (not autoamticlly as you described). in order to make the process very smooth i need to add the button to the item data the student just need to click in the button and if there is a seat available he will be added to the course . thanks a lotOctober 17, 2015 at 1:35 pm #3485Anshuman SahuKeymasterSorry adding the take this course button and student to be added by clicking on it cannot be possible as of now . Student have to goto the course page to take that course . By default user automatically gets subscribed to the course when she opens a free course but it can be disabled . For this please goto LMS ->settings -> Disable Auto allocation of Free courses http://prntscr.com/8s9capOctober 17, 2015 at 1:40 pm #3488samehmParticipanti set the maximum number of students to be 25 for free course but when a student register the counter of the seats doesnt become 24 it's still 24 why?October 17, 2015 at 1:47 pm #3489samehmParticipant*it's stay 25October 19, 2015 at 8:45 am #3555Anshuman SahuKeymasterYEs in the course details section it will show the total number of seats in course and in the button it shows the sets left in course . refer :http://prntscr.com/8svqapOctober 19, 2015 at 9:35 am #3564samehmParticipantplease enter to this link http://eoptech.co.il/course/%D7%97%D7%93%D7%95%D7%90-1-%D7%A8%D7%91%D7%99%D7%A2%D7%99/ it does not show ,the related feature enabled in the wplms panelץ where to add this code. add_filter('wplms_take_course_button','myfx',10,2); function myfx($course_button_html,$course_id){ $user_id = get_current_user_id(); //Check if user has taken a course from course category using $course_id, $user_id //return blank if you want to hide the button. return $course_button_html; }October 19, 2015 at 10:25 am #3572Anshuman SahuKeymasterIt will show the no. of seats left for the logged in user . Add the code in your wplms-customizer.php file in the wplms customizer plugin and do your logic in it .
-
AuthorPosts
- The topic ‘add take this course button and cutom data to course item’ is closed to new replies.