|
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. 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 Mauro - I will also need for you to apply for CVS write access by filing out an application at http://moodle.org/cvs/
code added to cvs, privileges bumped, component created ... waiting for CVS write request
moving to Enrol: Amazon FPS component
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. 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
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 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 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 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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Features:
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/