Git Product home page Git Product logo

Comments (5)

frumbert avatar frumbert commented on August 26, 2024

Yep each course typically has a cohort. I did it this way because it allowed me to sell a catalogue of courses as well, by setting both the per-course cohort as well as catalogue-cohort as membership providers per course. The link to the moodle site is via a wordpress shortcode hosted on a page / post. Not sure if Marketpress yet supports the purchase of a page (what I understand of it's digital download option is that it won't work since the url containing the pass-through data is generated on the fly since it's internally timestamped, so there's no permament link to use). Hope that helps!

from wp2moodle-moodle.

deonsa avatar deonsa commented on August 26, 2024

Hi Tim,

Thanks for the reply. It seems I have two ways of making this happen:

  1. Create secured pages to send students to after they paid.
  2. Send the students directly to the cohort within Moodle via the "download URL". This is the better option in my opinion, but for it to work I will need the links instead of the shortlinks. Would that be possible?

Thanks for your time, it's highly appreciated.
Regards,
Deon

from wp2moodle-moodle.

frumbert avatar frumbert commented on August 26, 2024

The first option is going to be the easier I think, even though the second would be a better experience. The problem is that the link contains dynamic, time-dependant data. If you reload the page, the data changes because it's embedding a timestamp in the data that is encrypted (as well as the unique user data). So it's a different url for every instance of a user/cohort. From what I've read of MP, this kind of linking is not supported by that system.

from wp2moodle-moodle.

deonsa avatar deonsa commented on August 26, 2024

Hi Tim,

Thanks for your reply. The staff at WPMU gave me the following reply:

"We can programmatically change the download URL using the hook I was referring to. This means we can hook that filter, and provide a new URL to use on the fly. Inside the filter we have access to order information, and of course the current logged in user.

I've never seen this particular method done before with MarketPress, but it's worth a shot to link whatever code creates the URL for the shortcode into that filter.

Otherwise I can't really say there's a best way of creating the pages per product. It would be very difficult to secure, as you don't have it tied to any order information."

The hook he's referring to, is:

MarketPress allows the download URL to be filtered:

//allows you to simply filter the url
$url = apply_filters('mp_download_url', $url, $order, $download);

This means that instead of a download, we could have the "Download URL" after their purchase send them directly to the link that would be opened by the WP moodle plugin.

This would require a way to get that link via code instead of the shortcode, but might be an option.

Do you think that would be possible?

Regards,
Deon

from wp2moodle-moodle.

frumbert avatar frumbert commented on August 26, 2024

Well, it's probably way too late, but there is now a solution for marketpress integration. The WPMU devs don't supply documentation, and were particularly unhelpful, so I did it my own way.

from wp2moodle-moodle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.