Non-core contributed modules

Amazon FPS Enrol Module

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Component/s: Enrol: Amazon FPS
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

Amazon FPS Enrol Module : With Amazon FPS, you can accept payments on their website for selling your courses.

Issue Links

Activity

Hide
Mauro Rondinelli added a comment -

Requirements:

  • Moodle 1.9.4
  • PHP 5.2.6
  • Module Crypt_HMAC 1.0.1
  • SSL

Features:

  • Support English and Spanish lang.
  • Email notifications.
  • Orders backend

For installation steps see install.txt file.

For resources and more information on the Amazon FPS, visit:

http://aws.amazon.com/fps/
http://aws.amazon.com/fps/faqs/

Show
Mauro Rondinelli added a comment - Requirements:
  • Moodle 1.9.4
  • PHP 5.2.6
  • Module Crypt_HMAC 1.0.1
  • SSL
Features:
  • Support English and Spanish lang.
  • Email notifications.
  • Orders backend
For installation steps see install.txt file. For resources and more information on the Amazon FPS, visit: http://aws.amazon.com/fps/ http://aws.amazon.com/fps/faqs/
Hide
Anthony Borrow added a comment -

Mauro - Thanks for sharing the code for the Amazon FPS enrollment type. Sorry it has taken me so long to reply as I was overwhelmed with work on other projects. I have had a chance to take an introductory look at the code you provided and had a couple comments, questions, etc. I am going to go ahead and add the code to CONTRIB but I figured I would touch base with you to get your input. Feel free to make the necessary changes. I'll create a component in the tracker and bump your privileges so you can manage issues related to this enrollment plugin.

1) The instructions for copying the lang files to the lang folder are not necessary. Moodle attempts to be modular and as such the lang files should be able to be found by looking in /enrol/amazon/lang/en_utf8. This allows for the user to simply download the file, decompress it to /enrol and go to the notifications page.
2) I noticed some strange characters in the install.txt file likely from not saving the file as UTF-8. While minor, we try to be consistent so it would help if you could do that.
3) You reference that the enrollment plugin requires Crypt_HMAC 1.0.1 but I noticed that that version has been deprecated and is no longer being maintained. Would the code work with Crypt_HMAC2 (http://pear.php.net/package/Crypt_HMAC2)? If so, I would recommend using that.
4) In the install.txt file it may be helpful for folks unfamiliar with Crypt_HMAC to have instructions about how where to find it and how to install it. I tend to presume the system administrator knows nothing and that will probably save you some questions when folks try to get it working.
5) At one point you refer to this code which is an enrollment type plugin as a module. I would discourage that simply because module refers specifically to activity modules in Moodle and thus it may confuse folks as to where this code is intended to be put.
6) If you have not already done so, I would encourage you to read http://docs.moodle.org/en/Development:Guidelines_for_contributed_code and make sure that we follow up on the various details like adding a page in Moodle Docs, adding an entry in the Modules and Plugins database, etc.

Do not hesitate to let me know if you have any questions or if there is anything I can do to be helpful. Thanks again for sharing this code with the Moodle community.

Peace - Anthony

Show
Anthony Borrow added a comment - Mauro - Thanks for sharing the code for the Amazon FPS enrollment type. Sorry it has taken me so long to reply as I was overwhelmed with work on other projects. I have had a chance to take an introductory look at the code you provided and had a couple comments, questions, etc. I am going to go ahead and add the code to CONTRIB but I figured I would touch base with you to get your input. Feel free to make the necessary changes. I'll create a component in the tracker and bump your privileges so you can manage issues related to this enrollment plugin. 1) The instructions for copying the lang files to the lang folder are not necessary. Moodle attempts to be modular and as such the lang files should be able to be found by looking in /enrol/amazon/lang/en_utf8. This allows for the user to simply download the file, decompress it to /enrol and go to the notifications page. 2) I noticed some strange characters in the install.txt file likely from not saving the file as UTF-8. While minor, we try to be consistent so it would help if you could do that. 3) You reference that the enrollment plugin requires Crypt_HMAC 1.0.1 but I noticed that that version has been deprecated and is no longer being maintained. Would the code work with Crypt_HMAC2 (http://pear.php.net/package/Crypt_HMAC2)? If so, I would recommend using that. 4) In the install.txt file it may be helpful for folks unfamiliar with Crypt_HMAC to have instructions about how where to find it and how to install it. I tend to presume the system administrator knows nothing and that will probably save you some questions when folks try to get it working. 5) At one point you refer to this code which is an enrollment type plugin as a module. I would discourage that simply because module refers specifically to activity modules in Moodle and thus it may confuse folks as to where this code is intended to be put. 6) If you have not already done so, I would encourage you to read http://docs.moodle.org/en/Development:Guidelines_for_contributed_code and make sure that we follow up on the various details like adding a page in Moodle Docs, adding an entry in the Modules and Plugins database, etc. Do not hesitate to let me know if you have any questions or if there is anything I can do to be helpful. Thanks again for sharing this code with the Moodle community. Peace - Anthony
Hide
Anthony Borrow added a comment -

Mauro - I will also need for you to apply for CVS write access by filing out an application at http://moodle.org/cvs/ simply reference that you will maintaining the Amazon FPS code and need access to contrib/plugins/enrol/amazon and then I can approve the request so that you can begin maintaining the code in CVS. Peace - Anthony

Show
Anthony Borrow added a comment - Mauro - I will also need for you to apply for CVS write access by filing out an application at http://moodle.org/cvs/ simply reference that you will maintaining the Amazon FPS code and need access to contrib/plugins/enrol/amazon and then I can approve the request so that you can begin maintaining the code in CVS. Peace - Anthony
Hide
Anthony Borrow added a comment -

code added to cvs, privileges bumped, component created ... waiting for CVS write request

Show
Anthony Borrow added a comment - code added to cvs, privileges bumped, component created ... waiting for CVS write request
Hide
Anthony Borrow added a comment -

moving to Enrol: Amazon FPS component

Show
Anthony Borrow added a comment - moving to Enrol: Amazon FPS component
Hide
Mauro Rondinelli added a comment -

Hi,

I move the lang folder to the enroll plugin directory. Lang strings are ok but i have problems with help files (the pop up windows says: Help file "access_key.html" could not be found!) the current path to the help files is:

[moodle_root]\enrol\amazon\lang\en_utf8\help\enrol\amazon

and the help buttom is created with:

helpbutton('access_key', 'Amazon FPS', 'enrol/amazon')

Where is wrong?

Thanks.

Show
Mauro Rondinelli added a comment - Hi, I move the lang folder to the enroll plugin directory. Lang strings are ok but i have problems with help files (the pop up windows says: Help file "access_key.html" could not be found!) the current path to the help files is: [moodle_root]\enrol\amazon\lang\en_utf8\help\enrol\amazon and the help buttom is created with: helpbutton('access_key', 'Amazon FPS', 'enrol/amazon') Where is wrong? Thanks.
Hide
Anthony Borrow added a comment -

Mauro - I do not think there is anything wrong on your end. I seem to recall a bug (and I believe there is a tracker issue for it that I will need to find and link to this issue) where by the help files were not being found for some plugin types. If I do not respond to this in a few days just give me a friendly little bump/reminder. Peace - Anthony

Show
Anthony Borrow added a comment - Mauro - I do not think there is anything wrong on your end. I seem to recall a bug (and I believe there is a tracker issue for it that I will need to find and link to this issue) where by the help files were not being found for some plugin types. If I do not respond to this in a few days just give me a friendly little bump/reminder. Peace - Anthony
Hide
Anthony Borrow added a comment -

Mauro - OK, I did a little code diving into the help.php file. For plugins, Moodle expects that the module be defined with an underscore; otherwise, it will assume that it is looking for something in the mod directory. This is what was happening in your config.html file where you had:

helpbutton('access_key', 'Amazon FPS', 'enrol/amazon')

I changed this to:

helpbutton('access_key', 'Amazon FPS', 'enrol_amazon')

which then has the following two paths in the list of possible locations to search in:

/lang/en_utf8/help/enrol_amazon/access_key.html
/enrol/amazon/lang/en_utf8/help/amazon/access_key.html

So I moved the help file to that new location and it works fiine (essentially I just moved /enrol/amazon/lang/en_utf8/help/enrol/amazon/* to /enrol/amazon/lang/en_utf8/help/amazon/*

What I do not like about this is that it is not completely consistent with where it should search. I think the help.php file should have the following possible locations to search in:

/lang/en_utf8/help/enrol_amazon/access_key.html
/enrol/amazon/lang/en_utf8/help/enrol_amazon/access_key.html

That way the /lang and /enrol paths follow the same basic structure of looking for */help/enrol_amazon/access_key.html rather than having one look in /help/enrol_amazon and the other in /help/amazon. I will see if I can address this in core because get_string (at least as I recall) behaves in this way.

Let me know if this explanation makes sense or only muddies the waters further.

Peace - Anthony

Show
Anthony Borrow added a comment - Mauro - OK, I did a little code diving into the help.php file. For plugins, Moodle expects that the module be defined with an underscore; otherwise, it will assume that it is looking for something in the mod directory. This is what was happening in your config.html file where you had: helpbutton('access_key', 'Amazon FPS', 'enrol/amazon') I changed this to: helpbutton('access_key', 'Amazon FPS', 'enrol_amazon') which then has the following two paths in the list of possible locations to search in: /lang/en_utf8/help/enrol_amazon/access_key.html /enrol/amazon/lang/en_utf8/help/amazon/access_key.html So I moved the help file to that new location and it works fiine (essentially I just moved /enrol/amazon/lang/en_utf8/help/enrol/amazon/* to /enrol/amazon/lang/en_utf8/help/amazon/* What I do not like about this is that it is not completely consistent with where it should search. I think the help.php file should have the following possible locations to search in: /lang/en_utf8/help/enrol_amazon/access_key.html /enrol/amazon/lang/en_utf8/help/enrol_amazon/access_key.html That way the /lang and /enrol paths follow the same basic structure of looking for */help/enrol_amazon/access_key.html rather than having one look in /help/enrol_amazon and the other in /help/amazon. I will see if I can address this in core because get_string (at least as I recall) behaves in this way. Let me know if this explanation makes sense or only muddies the waters further. Peace - Anthony
Hide
Anthony Borrow added a comment -

Mauro - I created an issue in the tracker that I think would allow for better handling of searching for plugin help files so I am linking the issues. Peace - Anthony

Show
Anthony Borrow added a comment - Mauro - I created an issue in the tracker that I think would allow for better handling of searching for plugin help files so I am linking the issues. Peace - Anthony
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: