Blocks: Coupon

block_coupon
Maintained by Picture of Sebsoft Plugins Sebsoft Plugins, Picture of Rogier van Dongen Rogier van Dongen
The Sebsoft Coupon Plugin offers you the possibility to create coupons for various levels of course access. Using a coupon code, users will be enrolled into courses that are attached to the coupon.
262 sites
427 downloads
47 fans


SEBSOFT COUPON PLUGIN


The Sebsoft Coupon Plugin offers you the possibility to create coupons for various levels

of course access. Using a coupon code, users will be enrolled into courses that are attached to the coupon. That way, you can use the coupon system as voucher or vouchering system for your course(s).


There are a few different ways of generating coupons:

- Course level: this means one or more course(s) need to be selected for which the coupon is valid.

  Once the coupon code is entered by a user, he or she will be enroled in every course the coupon

  is attached to.

  A nice extra feature is, when groups are configured for a certain course, you can configure which

  course group the coupon is for. When a user claims the coupon, he or she will be added to that specific

  group in the course. This makes it possible to separate coupon users from regular users.

  You could also make specific course groups every time you generate a batch of new coupons, so there's

  some way of matching a batch of coupons to a group of users. The possibilities are numerous.


- Cohort level: this means one or more cohort(s) need to be selected for which the coupon is valid.

  Once the coupon code is entered by a user, he or she will be added as a cohort member for every

  cohort the coupon is attached to.

  NOTE: When generating cohort level coupons, there is a possibility to "connect" extra courses to

  a given cohort. One MUST know that upon doing this, the courses will at that point be added to

  the cohort enrolment sync. Without knowing this little fact, it could be "unexpected" behavior,

  even though it's a logical step.


Furthermore, coupons can be generated on two "access" levels:

- Personalized. The base of this, is either a CSV is uploaded, or a CSV is given directly in a textbox.

  The needed user information for every coupon to be generated will be the user's name, email address

  and gender.

  These coupons will then be generated and sent off to the appropriate users using a background task.


- Bulk: The base of this is simple: you generate a certain amount of access coupons, which will then

  be emailed to the pre-configured recipient or (if allowed) to an emailaddress that can be freely entered.


- WARNING:

  Wherever possible, please use PNG images.

  Also, whenever possible, do NOT use images that have an alpha channel.

  This will MASSIVELY slow down processing time, due to internal conversion of images by TCPDF.

  On our tests, for a 300 DPI image on A4 format (2480 x 3508 pixels) with an alpha channel,

  rendering a single PDF took around 25 seconds. Taking the alpha channel out of the image,

  rendering a single PDF was reduced to around 3 seconds.

  Furthermore, whenever possible, have the coupon generator create a single PDF with all

  coupons (this is only applicable when generating coupons in "bulk" mode). The process of

  generating coupons has been optimized to only "use" the image 1 time when creating any amount

  of coupons in a single PDF. If you choose the option to create a seperate PDF for every coupon,

  the image will have to be rendered for each and every PDF.

  This has 2 major downfalls:

  1. Every PDF will roughly have a slightly bigger size than the image size (in our tests, 350 - 400 kB per PDF)

  2. Every PDF takes the full amount of time to render.

  Effectively, this means the following (using fictitious sizes):

  10 coupons, single PDF -> result is around 400 kB, rendering takes around 3-4 seconds.

  10 coupons, seperate PDFs -> result is around 4 MB, rendering takes around 35-40 seconds.


INSTALLATION INSTRUCTIONS


- Copy the coupon folder to your blocks directory.

- Go to the moodle admin pages (you will probably be confronted with it anyway) and install the plugin

- Configure the main settings for the plugin.

- We're set up for usage!


PLACEMENT OF THE PLUGIN


There are only two pages you can add the coupon block on. This is the site's frontpage

or the user dashboard (my) page. The main reason for this is because the block is the

"frontend" for users to enter their coupon or voucher code.

Administrators and users with the correct capabilities will also see the links to

the coupon administration pages and the coupon generator page.


GENERAL CONSIDERATIONS


There's two main configurations to consider when generating coupons.

For course type coupons, this plugin attempts to enrol a user through use of Moodle's

internal function "enrol_try_internal_enrol".

The Moodle documentation shows it will attempt to enrol you using manual enrolment.

For this reason manual enrolment MUST be enabled for these courses.


For cohort type coupons, a user is made a member of a cohort. That's all there is to it.

Surprise though, if you want to actually make a user have access to a course, you

probably want to configure cohort enrolment for the course.


For those paying attention, creating cohort type coupons thus enables a simple

way of enrolling users into multiple courses at once just by configuring the right

cohort enrolments in multiple courses.

That's still not to say course coupons can't be used in a similar way (using meta courses).


Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7
Screenshot #8

Contributors

Picture of Sebsoft Plugins
Sebsoft Plugins (Lead maintainer)
Picture of Rogier van Dongen
Rogier van Dongen
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Rogier van Dongen
    Fri, 16 Feb 2018, 9:32 PM
    New version is here!
    Changes for Version 3.3.1 (build 2017092501)
    * Added coupon code to "progress report" for validation purposes (feature request by Michael Reen)
    * Added claimed user to "used coupons" overview for validation purposes (feature request by Michael Reen)

    The additions allow for specific tracking of coupon codes in case this would be needed. For instance if you provide students their own personal code, have this registered somewhere and you want to validate whether or not students do not use someone elses code, the reports can now show this.
    Thus, In the aforementioned reports you will now find both the person who was claimed the coupon code as well as the code used.

    Do note: this is only available for Moodle 3.3 and onwards. There's no plans as of yet to backport this to older versions.
    Cheers!
  • Picture of Phuong Hoang
    Sat, 17 Feb 2018, 1:38 PM
    Dear Rogier van Dongen,
    As I commented 2 years ago "Sun, Jan 3, 2016, 8:18 AM", Is it possible for registered users and guests to have a look at what activities and resources I have in a course first? If so, customers will be more persuasive before buying a course. A brief preview in the main course page not just a course summary.
    * P/s:
    + Most payment gateways just give a link of the course and it's hard for course creators to buy. I hope your plugin will be different.
    + Just the same as when a guest access to a course, he/ she can see quizzes, assignments, forums...However, when he/ she hits the links, moodle will appear the popup to register or to enter the coupon code to continue (available in moodle)
    Kind regards,
  • Picture of Nirav Gosalia
    Sun, 25 Feb 2018, 10:36 PM
    Hi, When i apply a coupon to a course i get this error - An error occured while trying to enrol you in the new course. Please contact support.
    On clicking on more details it opens a new page with the error "error/block coupon/error:unable to enrol"

    Can you please guide me with the next step for troubleshooting the same ?
  • Picture of Rogier van Dongen
    Tue, 27 Feb 2018, 5:16 PM
    Hi Nirav,
    Coupon tries enrolment through the use of the internal Moodle function dedicated to this.
    Looking at the code, this internal method only supports manual enrolment and will fail if either manual enrolment is not available (globally disabled) OR if the course is not configured with manual enrolment.
    Let me know if this helps!
    Cheers,
    Rogier
  • Picture of Donna Betancourt
    Sat, 10 Mar 2018, 4:35 AM
    Does anyone have a screenshot of how to fill out the form? I can't figure out what to put in each text box.
    Thanks,
  • Picture of Konstantinos Ntanos
    Thu, 15 Mar 2018, 5:47 PM
    Hi Rogier,

    Very nice plugin and especially the QR code function is really simple.
    However, I would like to ask you if there is a way to enroll some users as teachers and some as students because, if I am not mistaken, when you use a coupon you get the role that 's selected at the "Default role" (block_coupon | defaultrole) setting at plugin 's settings, the moment you are claiming your coupon and not the setting you had when the coupons where generated.
    Is there a way to generate coupons that you can assign the role this coupon will activate, so as to be able to create coupons for teachers, as well as students, that skip the "Default role" setting?
    If not, is there a possibility to have this kind of functionality in the future?

    Thanks in advance.
  • Picture of Rogier van Dongen
    Fri, 16 Mar 2018, 12:24 AM
    Hello Konstantinos,
    This is a decent feature request we've considered in the past and could be implemented in the future.
    One of the reasons we decided not to implement was that this wasn't needed at the time (long before it even landed on Moodle's plugin page).

    Do you have any thoughts on how you would track each coupon / voucher and make sure any printed or otherwise distributed vouchers are distinguishable?
    Of course you could have a specific background/logo, but I could imagine you'd want to have that information clearly stated on the coupon itself.

    I'd love to hear your input on this.
    Cheers
  • Picture of Konstantinos Ntanos
    Fri, 16 Mar 2018, 6:59 PM
    Hello Rogier,

    I am presenting the way I am thinking of it but of course you decide how this can be done.
    After you select your courses for example, on a new page or even maybe on the same page under the courses selection box with a drop down menu, you choose the role (custom roles would be nice too) that should be assigned to the coupons that will be generated.
    There should also be an extra column at the reports page with the role that's assigned to each coupon, to be able to filter them as well.
    Now about how this information will be stated on the coupon, I 'm thinking something simple like a parenthesis after the course name with the role in it. Something like "Thermodynamics (Student)" or "Thermodynamics (Non-editing teacher)" for example.

  • Picture of Gareth Harris
    Thu, 22 Mar 2018, 11:01 PM
    Hello Rogier

    This looks like a really useful plugin. The problem we are having is that it generates the coupon code but we are not receiving the PDF emails. Is there a setting we need to change?

    Many thanks Gareth
  • Picture of Rogier van Dongen
    Fri, 23 Mar 2018, 9:11 PM
    Hello Gareth,
    I've sent you a message through the messaging system.
  • Picture of Ryan Kellow
    Mon, 26 Mar 2018, 12:18 PM
    Hi Rogier
    So far this plugin is the single most useful thing in our new Moodle instance.

    I was wondering if there is already a way to create a re-usable coupon code in the plugin?
    This way we can have a code that we give out to prospective clients as a demo course, or for courses where generating an individual coupon for each client in impractical.

    We can of course use self-enrolment, however our user testing has shown that having two different ways to enrol in a course becomes confusing. It's much better for us to have your coupon plugin and a generic coupon for the course.

    thanks!
  • Picture of Phuong Hoang
    Thu, 29 Mar 2018, 10:01 AM
    Dear Rogier,
    This plugin's awesome! It would be great if we had more enrolment methods, for instance self-enrolment.
  • Picture of S D
    Wed, 11 Apr 2018, 4:23 PM
    First of all thank you for this Plugin it is working great. I have one issue where a user enrolls themselves via the coupon and then clicks the email confirmation link they receive. They get direct to a page that confirms their registration with a "Continue" button on it. This button then directs them back to a new user registration page which is a bit confusing as opposed to say thier course or the site homepage.

    Is there a way to configure this?

    Thanks!
  • Picture of Rogier van Dongen
    Thu, 12 Apr 2018, 6:09 PM
    Dear S D,
    Thanks for your interest in the coupon plugin. Could you inform us on the Moodle version you are using? We've had this exact issue mentioned once before but so far, have not been able to reproduce it.
    I've also sent you a personal message.
    Cheers,
    Rogier
  • Picture of Jaden Jones
    Mon, 21 May 2018, 6:44 AM
1 2 3 4 5 6
Please login to post comments