Installing the elgg block

Installing the elgg block

by Clive Thomas -
Number of replies: 49

Setup: On my PC, WinXP. moodle 1.6 beta5, elgg 0.6, DeveloperSide.NET web server

Following the instructions from the elgg page, I've downloaded the elgg block and put it in the block directory, then started moodle, logged in as admin and gone to the admin page (nothing happens there) and then went on to the blocks admin page and the eportfolio block does not show up. I looked in the block's zip and saw that eportfolio was inside a folder, so I tried putting just the eportfolio folder in the blocks directory - still the same result.

I am new to moodle (3 weeks) and would like to get this working for rollout in September. Any help would be appreciated, thanks.

Average of ratings: -
In reply to Clive Thomas

Odp: Installing the elgg block

by Łukasz Leszewski -
If you want to install new block after you put it into block directory you must start Maintenance mode. In maintenance mode moodle will install your block.
In reply to Łukasz Leszewski

Re: Odp: Installing the elgg block

by Carles Bellver -
Putting the moodle into maintenance mode doesn't start the block installation for me.

But I've read in the forums the elgg block is working with postgresql only, no mysql support right now. I suppose this is the problem.
In reply to Carles Bellver

Re: Odp: Installing the elgg block

by Martín Langhoff -
Indeed -- it is PostgreSQL only at the moment. I think Dave Tosh jumped the gun a bit in announcing it to the world mixed

Patches adding MySQL support are welcome wink
In reply to Martín Langhoff

Re: Odp: Installing the elgg block

by Carles Bellver -
> Indeed -- it is PostgreSQL only at the moment.

I think Catalyst should mention the postgresql requirement in the MoodleElggHOWTO page smile

> Patches adding MySQL support are welcome

Just duplicate postgres7.php in the eportfolio/db dir and rename i to mysql.php. Then create this mysql.sql file in the same dir:

CREATE TABLE prefix_block_eportfolio_action (
`id` INT NOT NULL AUTO_INCREMENT,
`userid` INT NOT NULL ,
`timesent` INT NOT NULL ,
`action` VARCHAR( 30 ) NOT NULL ,
PRIMARY KEY ( `id` )
);

This will trigger the block installation for you MySQL users. It's working for me now in my Moodle 1.6 beta 5 (on a Mac OS X Server 10.4.x) smile
Average of ratings: Useful (1)
In reply to Carles Bellver

Ang: Re: Odp: Installing the elgg block

by Jens Gammelgaard -
Picture of Translators
Hi Carles,

It does not seem to work with the Moodle 1.6 version of today, - let's see what tomorrow brings smile
In reply to Jens Gammelgaard

Re: Ang: Re: Odp: Installing the elgg block

by Penny Leach -
Sorry, I have only just seen this thread!

I have just committed to CVS the mysql schema file. My fault entirely, I told Ben Werdmuller that we were ready to let the world know about it, and the reason was that I had no idea I hadn't written the msyql file!


Silly Penny. At any rate, it's there now smile
In reply to Carles Bellver

Re: Odp: Installing the elgg block

by Clive Thomas -

Nice one! Thanks Carles, I followed your instructions and got eportfolio to install in maintenance mode and it appeared on the block menu so I could set it up.

I've come to my next (and hopefully last) problem - SSH. Okay, I'm no newbie when it comes to Unix/linux, I cut my programming teeth on Unix in the early '80's smile Problem is I've never had occassion to use ssh, so here's the question - Should I install openssh, a cygwin derivation, or can I generate the keys on my Mac (OSX 10.4) and move them over to the PC?

If you guys have mixed feelings about either option, I suppose I could gut one of my PCs and install linux etc. but that sounds like to much work at this time of the year, what with end of year admin and project marking etc.

In reply to Clive Thomas

Re: Installing the elgg block

by Martín Langhoff -
Hi Clive!

The Elgg-Moodle block is still a bit green -- it works but it is not necessarily easy to setup, and definitely requires experienced administrators for the setup. It has never been tested on Windows servers -- this means that it will probably take someone with a bit of unix and windows knowledge to bridge the gap.
In reply to Martín Langhoff

Re: Installing the elgg block

by Clive Thomas -

I'm a bit green ;) when it comes to moodle and moreso with elgg (about 3 days!!) and this is my main hurdle, not yet knowing the inner workings of either. I've read/researched about various combos with druple, joomla, civicspace etc. and it was a toss-up between joomla, which I really liked, and elgg, then I saw the posting at elgg about the 0.6 integration and decided to bit the bullet and go for elgg.  There again, I'm open to suggestions... But I do need to get something working soon.

As per my above reply, I just have to get the ssh bit working, and I don't mind being the guinee-pig if I can get this working smile

In reply to Clive Thomas

Re: Installing the elgg block

by Clive Thomas -

Okay guys, still having problems with this ssh-keygen.

System WinXP, using copSSH ( a Cygwin derivetive)

Directory structure:
   Web server is in j:\www\

And the document root is
   j:\www\webroot\

All the elgg folders are in:
   j:\webroot\

As well as
   j:\webroot\moodle\
   j:\webroot\moodledata\
   j:\webroot\moodleuser\

And I have created:
   j:\www\webroot\moodleuser\.ssh\

I then opened a shell and cd'ed to j:\www, ran ssh-keygen, path was 'authorized_keys' and no password. this created the two files in j:\www. I opened authorized_keys.pub in notepad and saved it to j:\www\webroot\moodleuser\.ssh\authorized_keys. Then I did the rest of the config as per instructions.

I also created a user 'moodleuser' in elgg. Back in Moodle, logged on as Admin, added an assignment to a course.

Logged off then went back as a student and submitted a file. Hit the Join button and used the same username/password to create an acc. in elgg. From elgg I couldn't see the file as any user, so I looked for it and found it in j:\www\webroot\moodledata\2\moddata\assignment\2\4\.

On subsequent logons to Moodle the eportfolio show two 'No activity's in the e-portfolio block the first is a link the second is plain text. It links to the elgg activity page only if I previously logged on, otherwise it shows the URL http://localhost/activity/ and it's a blank white page.

On subsequent logons to elgg, under 'Your LMS hosts:' it shows the 'name' (DistantLearners) twice and they both link back to the elgg user's index page. Under 'Community memberships' it shows the installid's name (stc) which links to the elgg community page for stc.

One other thing when I log in or out or even return to the Moodle homepage in Moodle, it takes me to the elgg homepage and not logged on.

I think that's about all ;) Have any of you guys/gals got any hints please?

In reply to Clive Thomas

Re: Installing the elgg block

by Clive Thomas -
Just a quick addition. I just discovered if I right-click on 'No activity' and open it in a new window, it successfully logs in the correct user and shows their activity page. 
In reply to Clive Thomas

Re: Installing the elgg block

by Penny Leach -
I have no idea about the ssh key set up in windows, but you should be able to avoid if if you're on the same machine by using 'cp' as your copy files method. You only need ssh if your moodle and elgg installations are on separate machines.

From what you've posted about the weird links between moodle and elgg it certainly looks as though you've set up some of the urls wrong. Check that your elgg $CFG->wwwroot is the same as what you've told moodle your elgg base url is, and that your moodle $CFG->wwwroot is the same as what you've told elgg your moodle base url is.

Also ensure they're IDENTICAL. If one has www at the start, and the other doesn't, it won't work.
In reply to Penny Leach

Re: Installing the elgg block

by Clive Thomas -

Okay, I've removed all the ssh stuff, that's one less complication ;)
These are the various settings:

elgg config.php

$CFG->sitename = 'Distant Learners';
$CFG->wwwroot = 'http://localhost/';
$CFG->dirroot = 'J:\www\webroot\';
$CFG->sysadminemail =
'tlc@dsl.pipex.com';
$CFG->defaultlocale = 'en_GB';
$CFG->publicreg = true;
$CFG->default_access = "LOGGED_IN";
$CFG->lmshosts = array('stc' => array('token' => 'sinister', 'confirmurl' => 'http://localhost/moodle/blocks/eportfolio/confirm.php',

'baseurl' => 'http://localhost', 'name' => 'Distant Learners'));

=====================================================================
moodle config.php

$CFG->wwwroot   = 'http://localhost/moodle';
$CFG->dirroot   = 'J:\www\webroot\moodle';
$CFG->dataroot  = 'J:\www\webroot\moodledata';

=====================================================================
eportfolio block settings

block_eportfolio_server: localhost
block_eportfolio_baseurl:
http://localhost

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


One thought I have had is about the $CFG->dirroot and $CFG->dataroot. Should these be the hard-drive paths as I have or should they be for example /localhost/moodle?

Since removing the ssh stuff:
In moodle, when I try to login, the following appears in the address bar,
http://localhost/moodle/?profile_name=moodle, and I now have a blank browser window.

I also checked the Apache error logs to see if I could get a clue there, it came up with error on line 17 of the elgg config.php. Which line 17?
If it is the 17th line it's the:
    $CFG->sysadminemail =
'tlc@dsl.pipex.com';

If it's the 17th line of code (ignoring remarks) it's:
$CFG->lmshosts = array('stc' => array('token' => 'sinister', 'confirmurl' => 'http://localhost/moodle/blocks/eportfolio/confirm.php',
'baseurl' => 'http://localhost', 'name' => 'Distant Learners'));

and I can't see an error in either.

In reply to Clive Thomas

Re: Installing the elgg block

by Roberto Pérez -

Hello, I have installed the eportfolio block, but now when I try to access to elgg I have this error:

"Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. "

Here is the configuration of elgg (config.php):

$CFG->lmshosts = array('MundiviaFormacion' => array('token' => 'mundivia','confirmurl' => 'http://etf0281/moodle6/blocks/eportfolio/config.php', 'baseurl' => 'http://etf0281/moodle6', 'name' => 'Formacion'));

 ..and moddle.module:

block_eportfolio_server: etf0281

block_eportfolio_token: mundivia

block_eportfolio_installid: MundiviaFormacion

block_eportfolio_baseurl:

 block_eportfolio_copymethod: cp

 block_eportfolio_exportable: no

Is it right?

both are installed in the same machine...

 Thank you for your support... Cheers.

In reply to Roberto Pérez

Re: Installing the elgg block

by Penny Leach -
Hi, you should change the confirm url to end in confirm.php, not config.php

smile Penny
In reply to Penny Leach

Ang: Re: Installing the elgg block

by Jens Gammelgaard -
Picture of Translators

Dear Penny,

I am getting a NO SUCH LMSHOST, when I click Join Now.

I suspect it has to do with the installid,- is the the install id the same as the full site name, defined in Admin > Site Settings?

Any other possible reasons..?

Please advice...

Thanks smiler

Kind Regards
Jens 

In reply to Jens Gammelgaard

Re: Ang: Re: Installing the elgg block

by Penny Leach -
Hi Jens!

You need installid to be set in your elgg config.php exactly the same as the installid in Admin -> Blocks -> eportfolio settings, not the Admin -> Site Settings
In reply to Penny Leach

Ang: Re: Ang: Re: Installing the elgg block

by Jens Gammelgaard -
Picture of Translators
Hi Penny smile

In my elgg config.php the only place I see the word installid is the lms part line:

$CFG->lmshosts = array('installid' =>...

So if makes little sense that the installid is not = name of my Moodle installation,- could you please elaborate it further?

Thanks,

BR
Jens
In reply to Jens Gammelgaard

Re: Ang: Re: Ang: Re: Installing the elgg block

by Roberto Pérez -

hi again, I´m trying to change the block name (e-portfolio) ...how can I do it?

cheers

In reply to Jens Gammelgaard

Re: Ang: Re: Installing the elgg block

by Michaela Bell -
hi, for me changing the 'confirmurl' from /config.php into /confirm.php solved the problem..

penny, i get to the login in / create new account form when i click on join now - but only for the first time. the next time i log on to moodle i get an error message when clicking on join now (object id #15).

any idea what im doing wrong?

cheers, michi
In reply to Michaela Bell

Re: Ang: Re: Installing the elgg block

by Michaela Bell -
hi, as already mentioned, i have the same problem that is described in this post  - any idea how to solve that one? thank you in advance, michi
In reply to Jens Gammelgaard

Re: Ang: Re: Installing the elgg block

by Paolo Oprandi -
Like Jens, I am getting NO SUCH LMSHOST, when I click Join Now.

And just before I do I get:

Warning: Invalid argument supplied for foreach() in .../blocks/eportfolio/signupredirect.php on line 27

...because $data is empty.
Any ideas?

In reply to Paolo Oprandi

Re: Ang: Re: Installing the elgg block

by Penny Leach -
To the people who are getting NO SUCH LMSHOST, it means that your installid that you have configured in the moodle admin -> blocks -> eportfolio settings page does not match what you have keyed the array on in elgg's config.php.

For example, if, in moodle, you have set your installid to be mymoodleinstallation, the config.php fragment of elgg should look like:

$CFG->lmshosts = array('mymoodleinstallation' =>

I suspect that you're not changing this from its initial

$CFG->lmshosts = array('installid' =>
In reply to Penny Leach

Re: Ang: Re: Installing the elgg block

by Paolo Oprandi -
Hi Penny,

This is my LMShosts array:

$CFG->lmshosts = array('moodledev' => array('token' => 'bgHJu7', 'confirmurl' => 'https://moodledev.sussex.ac.uk/blocks/eportfolio/confirm.php', 'baseurl' => 'https://
moodledev.sussex.ac.uk', 'name' => 'Study Direct'));

And this is my settings page:
elgg config
In reply to Paolo Oprandi

Re: Ang: Re: Installing the elgg block

by Penny Leach -
hrmm, I can't see anything wrong with that. You're getting the NO SUCH LMS error? But you said $data was empty, that's surely the problem. I can't see why $data would be empty in signupredirect, it's a straight POST from where the block is.

Can you go to the page that has the block on it with the Join Now button and save out that HTML and upload it here? I want to have a look at it.
In reply to Penny Leach

Re: Ang: Re: Installing the elgg block

by Paolo Oprandi -
Thanks for this; page attached
In reply to Paolo Oprandi

Re: Ang: Re: Installing the elgg block

by Paolo Oprandi -
Quick thought, in function data_submit match_refer() returns null as none of these are true:

return (($referer == $goodreferer) or ($referer == $CFG->wwwroot .'/') or ($referer == $CFG->wwwroot .'/index.php'));

...so $_POST is not returned from data_submitted.

Having said that I have tried using $_POST instead of $data in signupredirect.php and I get other errors (well actually the page goes blank). I won't get carried away investigating (particularly after last time smile) until you have a look at the file.
In reply to Paolo Oprandi

Re: Ang: Re: Installing the elgg block

by Penny Leach -
I suspect it's something to do with you using https...Are you having any other problems with forms being submitted? Your form action in that file you attached is https://moodledev.sussex.ac.uk/blocks/eportfolio/signupredirect.php

I'm guessing that you're submitting that form from a non https page.
In reply to Penny Leach

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Penny Leach

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Ang: Re: Installing the elgg block

by Paolo Oprandi -
Bravo! very good! Yes, that is the case.

Perhaps if you are running Moodle on a secure server you don't need to set secure forms, but if so, that should be made clear on the config page.

There was a OU thread in the developer's forum about data_submitted.. can't remembered what it concluded though.
In reply to Paolo Oprandi

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Ang: Re: Installing the elgg block

by Paolo Oprandi -

Off surfing again, no doubt smile

In reply to Paolo Oprandi

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Paolo Oprandi

Re: Ang: Re: Installing the elgg block

by Randy Ahn -

NO SUCH LMSHOST continues to plague me.

I'm running moodle and elgg via ssl. When I disable ssl for all directories and turn off secure forms as suggested above, the block works!  Re-enabling ssl with secure forms off also throws the LMSHOST error. I'm not sure about this but it may be of interest to some, but, when I had ssl disabled, I believe that I was able to turn secure forms back on once a user had intially joined, and the block still worked for that user.

In reply to Deleted user

Re: Ang: Re: Installing the elgg block

by Mark Penny -
Yup. That does it. Thanks, Dave.

My only problem after the fix was an invalid ip address. I'd added :xxxx to complete the address. Once I removed the suffix, everything worked as advertised.
In reply to Paolo Oprandi

Re: Ang: Re: Installing the elgg block

by Udo Scharf -
In the signupdirect.php is a function called data_submitted().
But this function is not implemented....
I try to read the $_POST[ - stuff an everything works fine.
Which lib should be included to use the function data_submitted()?

Udo
In reply to Jens Gammelgaard

Re: Ang: Re: Installing the elgg block

by Elín Jóna Traustadóttir -

Like you I get this NO SUCH LMSHOST

Did you find out how to fix this?

I am going crazy

Thanks Ella Jona

In reply to Clive Thomas

Re: Installing the elgg block

by Will Taylor -
Nearly there, but ...

(Unix server, Moodle 1.6, latest build of elgg (rev 383 2006-09-07 from the SVN repository); MySQL, using the MySQL files you created a couple days ago; elgg is in a subdirectory w/in my Moodle installation (...moodleroot/elgg ); using cp copy method as on same machine)

No problem setting up the elgg config file or block settings for the ePortfolio block
The ePortfolio block takes me first time to the registration page of elgg, lets me sign up for an account, which then works; (i.e., I can use this login data to log in to elgg directly)
but the link thereafter from the Moodle block does not really sign me in to elgg
it takes me to an entirely blank "activity" page ( ...elgg/_activity/) - with no content or error message
if I erase the last segment of the url in the address bar, to end just in .../elgg, it then LOOKS like I'm signed in - there's my icon & welcome msg for me as registered - but any link from this page takes me to a crippled page, with "welcome guest / login" at the top; "view activity" takes me back to the entirely blank white page at ...elgg/_activity/

appears that somehow, the link failed to log me in

All appears to be OK if I close elgg without logging out, and then visit it via the Moodle block - then I'm fully logged in (still) of course;
but if I've logged out of elgg before closing it, then visit it via the Moodle block, I get the behavior above. Or if I fail to log out of elgg on identity#1 before closing it, then log out of moodle and log back in to Moodle as another user, and visit elgg as this second user, I enter elgg as the first (still not logged-out) user.

The test integration site at eduforge is working OK for me, none of this strange behavior.
In reply to Will Taylor

Re: Installing the elgg block

by Penny Leach -
quick question - is your wwwroot inside elgg different to what you have configured moodle to point to elgg as?

For example, does one have www. on the beginning and the other one doesn't? That would definitely cause this problem.

Or, if you have something like http://foobar/ vs http://foobar.yournetwork.com/ ?

It sounds as if the cookie domain is being set differently....
In reply to Penny Leach

Re: Installing the elgg block

by Will Taylor -
hey hey,
are you clever or what ...
it's those little sometimes dispensible w's that were in the way.
thanks so much, Penny -
this integration is truly awesome.

Am working with this on a test site at present, in July will be upgrading our school's MOODLE site & setting this up with that.  Will send you the link when time comes so's you can see how others are using your creation.

- will
In reply to Will Taylor

Re: Installing the elgg block

by Penny Leach -
Thanks! Happy to help smile
In reply to Penny Leach

Re: Installing the elgg block--OBJECT Returned

by Bhupinder Singh -

Hi Penny,

I have installed the Elgg and Moodle and completed the integration.

After much trouble i was able to debug and login to elgg from moodle by going through the Eportfolio block was able to log into elgg. smile

The second time when I tried through a different user what was returned is a blank screen with the word OBJECT and nothing else. thoughtful

Pressing the Join button on the Eportfolio the screens that were referred to and in the sequence are as under:

First:

http://localhost/LMS/blocks/eportfolio/signupredirect.php

Second:

http://localhost/elgg/lms/join.php

RESULT :

Return on screen  =    OBJECT.

This is happening again and again.

I am stuck now and do not know how to proceed further. Look forward for your help and that of other moodlers to get out of this trouble. sad

Thanks

Garry

 

In reply to Bhupinder Singh

Re: Installing the elgg block--OBJECT Returned

by Luke Hudson -
Hi there,  if you haven't seen this forum, please have a look.  Hopefully some of the suggestions there may solve the problem.  However, between this forum and that one, there seem to be several different bugs which have been discovered.

Cheers,
 - Luke
In reply to Penny Leach

Re: Installing the elgg block

by Hugo Javier Fernandez Canchi -
Holas!!! Necesito me ayudes con la integracion Moodle-ellg... no se como hacerlo, no se de donde descargar "moodle/elgg eportfolio integration block" ... me podrias explicar bien como hacerlo?? es para mi tesis para poder recibirme... muchas gracias...