Both Payment and Password options for the same Course

Both Payment and Password options for the same Course

by Chardelle Busch -
Number of replies: 18
Picture of Core developers

If anyone is interested in the code to have both PayPal and an enrollment key option for a course (see image) let me know.

Chardelle

Attachment paypassword.gif
Average of ratings: -
In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course

by Ralph Blakeslee -

Happy New Year Chardelle!

I would be interested in this.  Is it developed already?  Can I make a contribution?

Ralph

In reply to Ralph Blakeslee

Re: Both Payment and Password options for the same Course

by Chardelle Busch -
Picture of Core developers

Hi Ralph,

I just made the code changes since I might need this.  You just need to replace the enrol/paypal/enrol.php file, add a new file, and add a new line to your lang/moodle.php file.  (See the read me file included in the zip) I haven't tested it by actually purchasing a course yet--but it should be fine.

The page shown above will come up if you have enrollment set to PayPal, and have a course with settings that include both an enrollment key and a cost. 

Please note:  I have only tested this with version 1.4.3.

In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course

by Chardelle Busch -
Picture of Core developers

Update:

Oops, I got in a rush, and I think I put the wrong enrol.php file in the zip (why do I have two folders named "test"?). 

So, please use these files here.

In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course

by Ralph Blakeslee -

Thanks Chardelle!

You are becoming some Renaissance woman – personal coach, Phd, code hacker!!!

Ralph
In reply to Ralph Blakeslee

Re: Both Payment and Password options for the same Course

by John Haywood -
Thanks Chardelle, I will upload those and give them a go - hopefully the fix will get included in the official moodle release as it is nice to be able to offer both options.
In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course

by Eric Eberhardt -

Is it possible that the enrollment key is asked for prior to being asked for payment? If a student pays for a course that a Teacher wishes them to not register for then a refund would have to be made.

Thanks for your help!

Eric

In reply to Eric Eberhardt

Re: Both Payment and Password options for the same Course

by Chardelle Busch -
Picture of Core developers
Hi Eric,

Are you saying that you want users to enter a key first that then allows them to pay for the course?  How does the student get the key?  If the teacher would have to give them the key anyway, why wouldn't you just have the teacher tell them which course to pay/register for rather than giving them a key.  You could also put a notice in the course info about the refund policy and that the user needs permission first to enroll in a course.
In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course

by mandy honeyman -
Hello Chardelle

I'm in the midst of proposing that an adult education (not online) organisation use moodle for booking people onto courses.

The problem is that not everyone will book online, some people will post in cheques, some people will phone in with credit card details, some people will bring in cash etc!

Can I use your option as an either/or, i.e. however they pay they get an enrollment key and can use facilities?

cheers
Mandy
In reply to mandy honeyman

Re: Both Payment and Password options for the same Course--Update

by Chardelle Busch -
Picture of Core developers
Hi All,

I thought I would update this post. Moodle 1.5 now includes this. If you choose PayPal as an enrollment method, and then enter both a cost and a key into a course's settings, you will get both options as show in this screenshot.

Mandy, for you, this option will be helpful if the organization wants to offer PayPal as an option for their users. Then, users could either pay online using PayPal (they never even see the key for this option), or they enter a key they receive when paying using other methods.
In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course--Update

by mandy honeyman -
Thanks Chardelle, that makes lots of sense and will be very useful.
cheers
Mandy
In reply to mandy honeyman

Re: Both Payment and Password options for the same Course--Update

by Help Hypersonic -

Sorry, I am new to this great feature. Need some help:

Unable to locate the file to add the line as instructor by the read text, please help:

 Add this line to your moodle/lang/your lang/moodle.php file (note you can change this wording to anything).

$string['paymentkey'] = 'If you already have the enrollment key for this course, please enter it below:';

Thanks

In reply to Help Hypersonic

Re: Both Payment and Password options for the same Course--Update

by Chardelle Busch -
Picture of Core developers
As the post above says, if you upgrade to Moodle version 1.5, you don't need to do anything extra--it's all standard.  
In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course--Update

by Help Hypersonic -
I have not learn how to upgrade yet, could you advise where to change it ... thanks
In reply to Help Hypersonic

Re: Both Payment and Password options for the same Course--Update

by Chardelle Busch -
Picture of Core developers
Hi,

Go to the download page and you will see a link at the bottom:  How to Upgrade. 
In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course--Update

by Help Hypersonic -

Oh thanks. Will learn it.

In the meantime, can you advise when to do the changes for version 1.4?

Unable to locate the file to add the line as instructor by the read text, please help:

 Add this line to your moodle/lang/your lang/moodle.php file (note you can change this wording to anything).

$string['paymentkey'] = 'If you already have the enrollment key for this course, please enter it below:';

In reply to Help Hypersonic

Re: Both Payment and Password options for the same Course--Update

by Chardelle Busch -
Picture of Core developers
I highly recommend upgrading to 1.5, but the above instructions refer to a file named moodle.php in your language file (whatever language you use).  So, if you are using en, add it to the file:  moodle/lang/en/moodle.php.  Just copy and paste that line in that file to have that text show up above the enrollment key entry box.  You can change the wording in that sentence to anything you want.

I hope this helps.
In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course--Update

by Help Hypersonic -

Cut and paste BUT still not showing? please advise.

Thanks.

In reply to Chardelle Busch

Re: Both Payment and Password options for the same Course--Update

by Jason Khoo -

Hi All,

After search the forum for 2 days, I finally found how the interface show look like when the course is configured to be paid by Paypal. THe problem now is I am not able to get the interface to appear. Now the course cannot be access withou paying and yet the payment interface did not appear. I have installed moodle 1.5.3. My url is http://members.business-excel-training-course.com/. Appreciate if you could help me on this.

Thanks in advance.

Best regards.

Jsaon Khoo.