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.
211 sites
286 downloads
39 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 Janice Maxson
    Tue, 4 Apr 2017, 5:34 PM
    Hey! A great plugin, thank you so much for sharing it with us! I'll be definitely using it for my blog http://okdissertations.com/blog/how-to-write-a-dissertation. I work with lots of students, and sometimes we have some interesting events. And this plugin for coupons will fit just perfect.
  • Picture of Rogier van Dongen
    Thu, 11 May 2017, 9:36 PM
    Hello All!
    New version is here, with some massive updates!
    Be sure to read the changelog and don't hesitate to ask questions if things may be unclear.

    Relevant changes:
    Version 2017050100 (Release 3.0.0 (build 2017050100))
    * Added $CFG->wwwroot on all moodle_urls
    * Added setting to choose default assigned role (resolve issue #12: Student role problem.
    Roles were fetched by shortname = 'student', NOT foolproof)
    * Disabled sorting by 'owner' column in coupon overviews (resolve issue #13).
    * Fixed error notification when inserting to table block_coupon_courses
    * Added course name(s) to coupons
    * Changed default coupon template-main contents (language files)
    * Added filtering for progress reports
    * Added filtering for coupon overview
    * Code overhaul to comply to stricter Moodle coding standards (codechecker, Moodle phpdoc check)
    * Added course_deleted event handler
    * Added cohort_deleted event handler
    * Added custom cleaning of coupons
    * Added QR based coupon to PDF including processing
    * Added signup for QR based coupon when user is not logged on yet
    * Added possibility for signup with a coupon code (in block_coupon, when user is not yet logged in)
    * minimum required version: Moodle3 3.0

    * Thanks to everyone for their valuable input and remarks.

    Also, it is now possible to upload multiple coupon background and pick the background to use when generating the coupons (manager is limited to 10 backgrounds).
    Note: make sure you ALWAYS hit "Save" after managing your images, otherwise they're not saved from the draft area.

    Cheers!
  • Picture of Rogier van Dongen
    Fri, 26 May 2017, 11:45 PM
    Yet Another New Version.

    In this release we added the possibility for enrolment extension coupons on a course level.
    The possibility to create enrolment extension coupons is available from the course administration menu (added as a new menu item).
    We also added a webservices to generate coupon codes or coupons and request the progress reports.

    In case of questions on functionality, don't hesitate to contact us.

    Cheers!
  • Picture of Rogier van Dongen
    Wed, 31 May 2017, 4:33 PM
    Updated to new version.
    This resolves issue #14 where the page, after a successful login, redirects back to the customized signup page after choosing "I already have an account and want to login".
    Cheers!
  • Picture of Rekha C
    Tue, 13 Jun 2017, 1:16 AM
    Each coupon pdf has a unique QR code with it. What can i do with the QR code? How can I stop coupons generating QR codes?
  • Picture of Rogier van Dongen
    Mon, 3 Jul 2017, 6:44 PM
    Updated to new version.
    This resolves and issue with cohort enrolment coupons not functioning as intended.
    Added is the possibility to disable including the QR Code in the generated coupons.

    @Rekha: due to lack of time, we have yet to write a comprehensive manual. In short, the QR Code enables the possibility to process the coupon without having to type it in.
    For example; when logged in in Moodle and on a device that can scan the QR Code, this method can be used to instantly scan the QR Code. The coupon code is instantly applied, so users do not have to type it in.
    It also allows users to scan the QR Code and register with your website (providing the user isn't logged in yet). The signup form is the same as the "standard" form, but also has a input field that holds the coupon code. After successful registration, the coupon code for the new user will automatically be processed.
    We're working on a manual to explain all capabilities and processes for the coupon block and hope to have it finished soon.

    Cheers!
  • Picture of narutoget shippuden
    Mon, 3 Jul 2017, 7:08 PM
    Really nice article and definitely it will be useful for many people, Rhonda . Kindly keep update like this. I am truly delighted to glance at this blog posts, thanks for providing such information. Narutoget
  • Picture of spyros zoup
    Fri, 14 Jul 2017, 6:24 AM
    Congrats! one of the best Moodle plugins! Do you intend to add discount options when generating coupon instead of the standard 100% off?
  • Picture of Yuri Lima
    Thu, 20 Jul 2017, 5:20 AM
    Hello Rogier van Dongen. Thanks for the plug-in, it's being very useful for me, however I'm needing to give discount coupon when buying courses. For the payment method, I use native PayPal in moodle. Is it possible to do this with this plug-in?
    Thank you very much in advance
  • Picture of Yuri Molina Vale
    Mon, 9 Oct 2017, 10:14 AM
    Dear Rogier,

    Thank you very much for the coupon plug-in. It has been much usefull.

    I'd like to ask you if you could update the plug-in in order to accept the Portuguese (Brazil) language.
    For instance, in the following print you can see the strings "CUPOM" and "Enviar Cupom" in Portuguese, but the string "Please enter your coupon code here:" in English.
    Print screen: https://drive.google.com/file/d/0B2vYjTcyuOCpRFZOSkNIX3NJbkE/view?usp=sharing

    Is it possible to correct ?

    Thanks for your attention.
  • Picture of Michael Reen
    Sat, 21 Oct 2017, 4:10 AM
    Hey Rogier,
    is it possible to see who (user account) used which coupon (for example AjsjS2jfkasajFJ2) to access the courses?
    If one coupon was stolen, we would be able to deactivate the right account.
    Best wishes!
  • Picture of Rogier van Dongen
    Mon, 23 Oct 2017, 7:01 PM
    Hi Michael,

    You could use the "Used coupons" overview tab along with the implemented filtering capabilities.
    This will provide you an overview of the used coupons/vouchers along withy their code and the user it was assigned to.
    If you'd wish to see extra filtering possibilities (for example a search on specific coupon/voucher codes), please notify me so we can incorporate it in a future release.
    Cheers! Rogier
  • Picture of Rogier van Dongen
    Mon, 6 Nov 2017, 7:57 PM
    New version is here!
    Changes for Version 3.3.0 (build 2017092500)
    * Fixed deprecated pix_url references (replaced by image_url)
    * Minimum required Moodle version: 3.3

    Cheers!
  • Picture of Rekha C
    Tue, 21 Nov 2017, 2:14 PM
    The coupon block appears on the home page in the right column and occupies an entire column. How can I move the Coupon block to the footer?
  • Picture of Michael Reen
    Fri, 15 Dec 2017, 6:16 AM
    Dear Rogier,
    how can I notify you -> I wrote you a message on moodle! smile

    Best wishes!
1 2 3 4 5
Please login to post comments