• Resolved emazero

    (@emazero)


    hello,
    I’m using your plugin but I need to modify the enrollment process.
    I want to manage all course subscriptions offline so I need to show/hide a ‘Enrollment request’ form depending on user status from the course php page template.
    I’d need something like:
    if user is already enrolled -> hide form
    if user is not enrolled yet -> show form

    How do I get this user information?
    The enrollment button works in the right way but I can’t handle the user informations for my needs.
    thanks

    https://www.ads-software.com/plugins/coursepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hey Emazero,

    Hope you’re doing well today!

    I’m a little confused here. By default if the user isn’t enrolled then it will show the enroll form and if they are enrolled then it will say something like “Start Learning”.

    Are you wanting it to send that information somewhere? It will tell you per course who is enrolled as well and you can go to the students list and see all the info about each student.

    Sorry if I’m misunderstanding. Look forward to hearing back here!

    Cheers,
    Tyler

    Thread Starter emazero

    (@emazero)

    Hi Tyler,
    thanks for your help.

    I need to add an extra form (made with formidable form) at the end of the course overview page via php, so that users can ask for extra informations about the course.
    Since already enrolled users must not see the form I wonder how to know via php if a user is/isn’t enrolled.
    A ‘php if statement’ would make the trick but I can’t figure out how to make it.
    Of course I can check if a user is logged (by native WP functions) but not if he is enrolled or not.

    Hope it’s more clear now
    thanks
    ema

    Hi Ema,

    Thanks for clarifying that! Fortunately, the lead developer’s posted quite a lot of helpful info for that here:

    https://premium.wpmudev.org/forums/topic/is-there-any-documentation-available-of-which-functions-can#post-794773

    Could you let us know how that all works for you?

    Cheers,
    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘show/hide elements if user is a student’ is closed to new replies.