Coupon
Maintained by
Sebsoft BV, 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.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Unfortunately, this is not a possibility at this very moment.
Thank you
Coding error detected, it must be fixed by a programmer: verify_https_required() cannot be used anymore.
Please speak with your admin to resolve this error
Any help or fix would be great as love this plugin.
Thanks
I would like to ask some (development) guidlines, since I would like to use it in a little bit different scenario where the coupons are not personalized nor specific to a course, but one coupon code can be used to enroll a user in only one course.
With one coupon code a user (whichever loged-in user) could enroll only to a course that he will choose (this means that the coupon code is not attached to a specific course).
From a user point of view, I immagine that:
- a user will click on a course that he/she is interested in,
- this redirects him on the enrol page (moodle/enrol?id=course_id) where he has the coupon code field and the submit coupon
- he enters the coupone code and with that he gets enrolled to the specific course. From this point on the coupon code is claimed and can't be used any more.
Also if there is a different flow that can easy the implementation of my user case, I accept any suggestions.
Thanks in advance,
Frosina
@Teo / Guiseppe: there will be an updated version of the plugin soon. Reason for not finding the archive of coupons when downloading turned out to be character conversion (the download option required ALPHANUMEXT as parameters, so basically all letters, number plus underscore and dash character). This will be fixed in the new version.
I've also noted that the cleanup tab cannot be accessed with the below error:
SELECT COUNT(*) FROM (SELECT MOODLELIB.UNDO_MEGA_HACK(MOODLELIB.TRICONCAT(c.id, '-', e.id)) as idx,
c.submission_code as coupon, e.*, null as action
FROM m_block_coupon c
JOIN m_block_coupon_errors e ON e.couponid=c.id) AS t
[array (
)]
Error code: dmlreadexception
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 277 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
line 1179 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
line 1571 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_records_sql()
line 1109 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->get_record_sql()
line 1644 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_record_sql()
line 1854 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
line 141 of /blocks/coupon/classes/tables/errorreport.php: call to moodle_database->count_records_sql()
line 170 of /blocks/coupon/classes/tables/errorreport.php: call to block_coupon\tables\errorreport->query_db()
line 84 of /blocks/coupon/classes/tables/errorreport.php: call to block_coupon\tables\errorreport->out()
line 119 of /blocks/coupon/renderer.php: call to block_coupon\tables\errorreport->render()
line 77 of /blocks/coupon/view/errorreport.php: call to block_coupon_renderer->page_error_report()
Continue
Any help would be very appreciated.
is it possible for either of you to confirm that there are in fact zip files (coupon should be in the name, along with a code) containing the generated coupons in the moodle data directory?
Even though the new version has been tested by multiple persons seperately and we've never encountered this specific issue ourselves, something is clearly not working right.
Thanks in advance, cheers.
As far as we're aware, there are no issues related to a 7.x version of PHP. The new version has been tested both by us and on of our clients, without issues.
Please do take note of the many changes in the language files if you're going to use anything other than English. If you have any further questions you can always send me a note
Cheers
I would like to update my server to PHP 7.2 and I'm using coupon module.
Is there anything I shoul kwno before upgrading? is there any known issue?
Thank you
Pierpaolo
Please note you *should* really take a solid look at your translation/language customizations files IF you've ever customised any. I cannot stress this enough!
Lots of translations have been changed, so any customisations should be reset in some cases.
If you make use of the CSV/manual upload functionality, this is pretty much a requirement.
Also please note all translators *should* revise the AMOS translations due to massive changes!
The reason for saying this is because coupons are no longer being sent as an attachment: we've changed functionality to a include download link for the coupons.
This is due to the fact we've increasingly received issues where the "mail was never sent". However, it often was send but dropped by the mail provider (e.g. gmail wouldnt accept attached files).\
If any recieved emails still state something about "attachments being included", this *is* a sign you should revise your language customisations because no more attachments are included.
Please read the release notes/changelog! A lot of smaller issues have been resolved and a massive code overhaul was done.
In case of any questions: ask!
Cheers,
Rogier