Moodle 1.7 & 1.8 breaks amember pro

Discussion in 'Integration' started by chemistry2004, Jan 26, 2007.

  1. gw0udm

    gw0udm New Member

    Joined:
    Jul 7, 2007
    Messages:
    4
    Some small problems

    Hi,

    This looks very interesting, exactly what I've been waiting for!

    I've had a play around with it, and it does seem to work except that when users log in to Moodle with their Amember details, they initially are presented with a blank screen. If they then re-enter the URL for the course they are logged in ok.

    I'm not entirely clear what the relationship is between the Moodle and Amember user lists. Presumably the idea is that people only need to register with Amember, and then they automatically will have access to Moodle?

    The other thing I have noticed is that the site does seem rather slow, but I'm not sure if this is an issue with the script or with my hosting!

    I'd be grateful for any advice, particularly on the 'blank screen' issue. THis at present would prevent me from using it, as it is not really acceptable for end users.

    Thanks

    James
  2. chemistry2004

    chemistry2004 Member

    Joined:
    Jan 26, 2007
    Messages:
    78
    Sorry there was a problem in the earlier plugin module. I have attached the recent one. This should not give blank screen problem. Send your feedback.
  3. gw0udm

    gw0udm New Member

    Joined:
    Jul 7, 2007
    Messages:
    4
    Thanks very much for this. The helpdesk had already fixed my problem (very quickly!), presumably with the same version as posted.

    It now works perfectly! I'm very impressed with the result, a great improvement on what was previously available.

    Thanks again

    James
  4. jimmyp

    jimmyp New Member

    Joined:
    Jul 31, 2007
    Messages:
    2
    I tried the above integration but got the following error:

    WARNING: Invalid argument supplied for foreach() in line 296 of file moodle.inc.php
    WARNING: Cannot modify header information - headers already sent by (output started at /home/horsefro/public_html/amember/rconfig-zend.inc.php-bin:329) in line 272 of file moodle.inc.php
    WARNING: Cannot modify header information - headers already sent by (output started at /home/horsefro/public_html/amember/rconfig-zend.inc.php-bin:329) in line 273 of file moodle.inc.php
    WARNING: Cannot modify header information - headers already sent by (output started at /home/horsefro/public_html/amember/rconfig-zend.inc.php-bin:329) in line 274 of file moodle.inc.php
    WARNING: Cannot modify header information - headers already sent by (output started at /home/horsefro/public_html/amember/rconfig-zend.inc.php-bin:329) in line 275 of file moodle.inc.php
    WARNING: Cannot modify header information - headers already sent by (output started at /home/horsefro/public_html/amember/rconfig-zend.inc.php-bin:329) in line 276 of file moodle.inc.php
    WARNING: Cannot modify header information - headers already sent by (output started at /home/horsefro/public_html/amember/rconfig-zend.inc.php-bin:329) in line 39 of file new_rewrite.inc.php
    WARNING: Cannot modify header information - headers already sent by (output started at /home/horsefro/public_html/amember/rconfig-zend.inc.php-bin:329) in line 43 of file free.inc.php

    Any ideas anybody?

    Best regards,

    James Phillips

    Problem fixed! I was being quite stupid and using user info from a failed attempt at installing the integration previously.
  5. golfguy

    golfguy New Member

    Joined:
    Aug 6, 2007
    Messages:
    3
    Is this the latest and greatest intergration script for Moodle?

    I just bought aMember to intergrate with Moodle and can't find a plugin or documentaion for intergration any where on the amemeber site.
  6. chemistry2004

    chemistry2004 Member

    Joined:
    Jan 26, 2007
    Messages:
    78
    Yes this is the latest one. You can download it and test it. Since, this is still under testing, amember team have not put up the updated one so far. Once, all of us are satisfied, we can ask them to modify the existing script to this.

    I am presently testing this with moodle v1.9
  7. jimriley

    jimriley New Member

    Joined:
    Aug 29, 2006
    Messages:
    2
    Please could someone let me know what the default course enrollment settings need to be when using the Amember Moodle plugin.

    In adminstrator mode in Moodle, it asks for the following settings:

    -------------
    Please choose the enrolment plugins you wish to use. Don't forget to configure the settings properly.

    You have to indicate which plugins are enabled, and one plugin can be set as the default plugin for interactive enrolment. To disable interactive enrolment, set "enrollable" to "No" in required courses.

    Name Enable Default Settings
    Authorize.net Payment Gateway
    External Database
    Flat file
    IMS Enterprise file
    Internal Enrolment
    LDAP
    Paypal
    aMember integration

    ===============

    Which of these should be "enabled" and which is the default?

    Also, within the enrollment settings for each course, what should I put for enrollment?

    Jim
  8. chemistry2004

    chemistry2004 Member

    Joined:
    Jan 26, 2007
    Messages:
    78
    1. You need to choose amember as default enrollment

    2. Make all course Not Enrollable in course setting in moodle.

    3. Change the moodle.php in lang to do what when the course is not enrollable. You need to point to amember/member.php for course subscription
  9. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    Need Some Clarification in Moodle Plu-In

    Guys,

    I was the original person that approached Alex about writing the first aMember-Moodle plug-in. A number of years ago I left the Moodle platform but have just recently come back for a new project.

    It is good to see that the integration is still being supported. Looks like chemistry2004 and others have worked had to get out the new single login plug-in. That's great!

    So I am trying to integrate aMember to a 1.8.2 version of Moodle using the plug-in provided by chemistry2004. I am having some problems and hope I can get some clarification or help on the installation.

    I have aMember installed and the aMember part of the plug-in all installed and all seems well on that side.

    I am having problems installing the Moodle side of the plug-in:

    There are two sets of instructions in the zip file, looks like one is from the aMember programmer and one is from venkatesan (aka chemistry2004). They differ slightly.

    Step 1: I placed the contents of the "auth" directory from the zipped files to the auth directory in Moodle. So I ended up with moodle/auth/amember/ and the four provided files. I think this is right...

    Step 2: In the aMember programmer notes there are instructions for placing an "auth.php" like this: moodledata/lang/en_utf8_local/auth.php
    This step was not mentioned in the venkatesan directions...

    Step 3: I Logged in as Admin > Goto Site Administrator > Users > Authentication. From that screen I clicked on the aMember eyeball (enabled). No other authentication types are enabled. All the information about the aMember database found under the settings link is correct.

    ==== This is the end of both instructions (except for some additional information on login / logout) ========

    Step 4: Based on posts in this thread, it look like at this point you should be able to go to: Site Administrator > Courses > Enrollments and see the aMember plug-in listed. You are to then enable the aMember plug-in and set it as the default plug-in from this page. No matter what I do, I cannot get the aMember plug-in to show up on this page??? I think this has something to do with my problem.

    Thanks in advance for any help on this!

    PS: Once I figure out this new plug-in I would be willing to write a nice verbose set of instructions on how to do this, including information about the redirects etc.
  10. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    I got it figured out

    I kept working at it and finally got it figured out. Working off two sets of instructions and the posts in this thread made it kinda fuzzy. I had worked with aMember and Moodle in the past so that helped.

    After a fair amount of tweaking I have a real slick integration, I like it!

    Thanks to aMember and chemistry2004 for getting this new plug-in worked out!

    The site is under development and is not ready for use, but if anybody wants to go see the integration and try to break it, please do. Right now there are two classes set up, (virtually empty at the moment). They are both set up as free and I am not requiring email validation either. You can sign up for either class separately or choose the combo class that enrolls you in both.

    When I go live, I will clear out the members area and start fresh.

    http://digitalliteracyproject.com

    I am open to all input both good and not so good, so let me know....
  11. nestguy

    nestguy New Member

    Joined:
    Sep 7, 2007
    Messages:
    9
    Grant - Can you post your instructions for getting it to work? It seems that all the different readme files and instructions here are making it fuzzy for a lot of folks (myself included).
  12. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    I am knee deep into something at the moment, but I will try to put together a detailed paper in about a week.
  13. nestguy

    nestguy New Member

    Joined:
    Sep 7, 2007
    Messages:
    9
    That's great Grant. One thing I haven't been able to determine is how to offer everything at one time.

    I don't want to have each course be a separate product, because "site membership" is the product with all the courses available to members.

    Any thoughts on that one?
  14. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    If you want one product to enroll a person in all classes simply set up one aMember product, and assign all the classes to that one aMember product. If you have enabled the plug-ins right you should see a scroll box towards the bottom of the aMember product page. Hold down the <Ctrl> button and click on all the Moodle classes you want the membership to include. Then when they subscribe to the aMember product they will be enrolled in all the Moodle classes.

    A few more pointers...

    1. Disable start and end dates for Moodle classes, aMember handles that.

    2. Also set all Moodle classes to "Unenrollable". That way when a person tries to enter a class that they are not enrolled in, they will see the "You are not enrolled in this class" message. Edit that message to give them a link to amember/member.php so they can enroll if they want.

    Note that they only get this page if they are logged in but trying to enter a class that they are not enrolled in. If they try to enter a class and are not yet logged in, Moodle shows them the Login page.

    3. Go to my site and enroll in one of the two courses. After you log in, try to enter the class you are not enrolled in and you will see an example.

    4. I only send users to aMember to initially register. Then I have them log-in using the standard Moodle log-in page.

    5. If you want to assure they also get logged out of aMember when they log out of Moodle you should make the modification to the moodle/login/logout.php. Towards the top it should look like this:

    Code:
     // can be overriden by auth plugins
        $redirect = "/amember/logout.php";
    5. If you get this all configured right when a user tries to enter a course and is not yet logged in, or clicks on the log-in link, they will get just a Moodle log-in prompt and not all the signup directions that are normally on the right. You need to edit the language file of the login page to give them a link to the amember/signup.php page. Again, look at my site's login page for an example of this.

    6. Make sure you enable aMember plugin at Users > Authentication. Disable all other plug-ins and also turn off self register towards the lower part of the page

    7. You will not see the aMember plug-in listed on the Courses > Enrollment page like somebody in the thread said. At least I don't have it listed and it works AOK. Since this page uses radio buttons for setting the default enrollment module you must pick something. Mine is set to "Internal Enrollment"

    8. I also added a link in main menu block on the Moodle front page to amember/member.php I labeled it "Account Information". Is a user is logged in and clicks on it they go to a page that displays their account information and gives them access to affiliate features. If they are not logged in and click on it they will see the "log-in" page which also includes a sign-up link. So it all kinda works out :)

    ==================================================

    You can see this integration at http://digitalliteracyproject.com

    I am just setting the site up and anybody is welcome to go pound on it. The two classes don't have any content in them yet. They are set up as no cost; therefore you do not have to use a credit card. I have also turned off email verification so you will not have to hassle with that either. Sometime in November 07 I will load up the classes with content and then clear out all past members that used the site as a aMember/Moodle demo site.

    That is all I can think of at the moment, it is getting late... Hope that gets you going. If not ask away :)
  15. nestguy

    nestguy New Member

    Joined:
    Sep 7, 2007
    Messages:
    9
    Man, Grant -- what an easy solution on the one product deal.

    I was dancing all around it with these complex approaches. Good ol' Occam, huh? ;)

    Thanks for the pointers. I'll keep them close as I work on the integration.
  16. chemistry2004

    chemistry2004 Member

    Joined:
    Jan 26, 2007
    Messages:
    78
    Dear Grant,

    Thanks for your detailed notes about integration. Your amember template looks great. Can I have a look at it?

    The amember integration also works with 1.9 beta also
  17. chemistry2004

    chemistry2004 Member

    Joined:
    Jan 26, 2007
    Messages:
    78
    Again it breaks in v1.9 beta +

    Sorry for my earlier post. Actually it is working in one of my test domain with moodle v1.9 beta +. But, it breaks in another domain. the amember auth.php could not duplicate the user from amember database to moodle database. I am in contact with helpdesk.
  18. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    I am using it on Moodle 1.8 and planned on staying with that version for quite a while. Good to know you are working on getting it compatible with the next Moodle release.

    Over the next week I will write a detailed set of instructions on how I implemented this plug-in and will attach the modified aMember templates that I use.
  19. chemistry2004

    chemistry2004 Member

    Joined:
    Jan 26, 2007
    Messages:
    78
    Already I have started working with v1.9beta in my production server (probably a big risk). It is working when moodle and amember are uploaded in to a sub-folder of public_html and does not work when it is there in public_html itself. I think it is some kind of path problem. I am with help desk to solve this problem
  20. slhawk98

    slhawk98 New Member

    Joined:
    Nov 26, 2007
    Messages:
    5
    Can you provide link to your website that used aMember and Moodle?
    I am looking for examples of site that are successfully using this combination.

    Thanks

Share This Page