Forum LAMS for Tech-Heads - General Forum: Re: Re: Integrating Microsoft SharePoint Server (MOSS2007) with LAMS


 
Search: 

3: Re: Re: Integrating Microsoft SharePoint Server (MOSS2007) with LAMS
In response to 2 03/26/09 11:58 PM
[ Reply | Forward ]
Hello Luke,

Thanks for your response.

Yes, SP and LAMS are installed on seperate servers - actually seperate VMs within the same domain. The servers can communicate to each other. I have tested via telnet that SP can communicate to the LAMS server via port 8080 (where I have installed LAMS).

The id and key values are the same on both servers. I have included both below:

Maintain LAMS : Maintaint integrated Servers
********************************************
Id: lamssharepoint
Key: lamsserverkey
Name: SharePoint
Description: sharepoint portal server
Prefix: sp
User Information URL: http://dummy
Timeout URL: http://dummy

LAMS Integration Settings
*************************
LAMS Server ID: lamssharepoint
LAMS Server Key: lamsserverkey
LAMS Server Url: http://servername:8080/lams
LAMS Request Source: SharePoint

From the server logs, I notice that LAMS is performing a callback to sharepoint as it is trying to obtain user information from the http://dummy URL and subsequently a UnknownHostException is thrown. From the installation instructions, I got the impression that LAMS shouldn't need to access this URL and that the integration itself should handle the authentication process. Is LAMS accessing this URL as a fallback in this case?

I'm not entirely clear about how the SP Integration handles authentication without the callback as is the case for the Moodle Integration? Does it just obtain the user credentials from the login request coming from SP?

I looked at the localhost_access_log.log file and it looks like LAMS is obtaining the credentials (with the username and hashed password) from SharePoint via its request: "GET /lams/LoginRequest?&sid=lamssharepoint&courseid=content_efdb6cc1-aa32-4756-af4c-330e38136324&uid=spsetupadmin&ts=1238131465257&hash=12ae1ce7fc14f87b6aab927ea12d10f4685ce15c&lang=en&country=AU&requestSrc=SharePoint&method=author&siteLang=1033¬ifyCloseURL= HTTP/1.1"

I will attach relevent entries contained in the \lams\jboss-4.0.2\server\default\log\lams.log file. This may give you some more insight to why this may not be working.

Any further suggestions would be much appreciated.

Thanks,
Praveen.

Posted by Praveen Pawar

Attachments:
4: Re: Re: Re: Integrating Microsoft SharePoint Server (MOSS2007) with LAMS
In response to 3 03/29/09 06:03 PM
[ Reply | Forward ]
Hi Praveen,

You'll have to excuse me as I haven't looked at this code for a couple of years. But I have had a look back at the code and it tells me a few things.

Yes you are right, there shouldn't be a callback, the user credentials should be getting sent through the request. This is different to the moodle integration.

The author url call to LAMS (from your localhost_access_log.log) looks to be incorrect, im not sure how it is happening, but this part of the URL:

&hash=12ae1ce7fc14f87b6aab927ea12d10f4685ce15c〈=en&country=AU

should read more like:

&hash=12ae1ce7fc14f87b6aab927ea12d10f4685ce15c&lang=en&country=AU&firstName=(name)&lastName=(name)&email=(email)

it looks like the firstName, lastName and email parameters are not being added, and also something is going wrong with the url concatenation so the "&lang=en" bit is "〈=en".

By any chance did you set a server farm setting for the lams integration that tells it to use user profiles? If so, that could be the source of the problem and turning it off might fix it.

Also, something I would suggest would be to try a different key as the hash seems to be getting mashed somehow, perhaps you have discovered a bug in the integration.

Luke

Posted by Luke Foxton

5: Re: Re: Re: Re: Integrating Microsoft SharePoint Server (MOSS2007) with LAMS
In response to 4 03/29/09 06:10 PM
[ Reply | Forward ]
Edit on the last post.

> and also something is going wrong with the url concatenation so the "〈=en" bit is "〈=en".

I think this is just the html editor for this forum, it is supposed to read (&)lang=en (without the brackets), but this must be some sort of reserved string in this html editor and it is replacing it with "〈=en"

so disregard this line.

Luke

Posted by Luke Foxton

6: Re: Re: Re: Re: Integrating Microsoft SharePoint Server (MOSS2007) with LAMS
In response to 4 03/31/09 08:40 PM
[ Reply | Forward ]
Hello Luke,

Thanks for the tips.

I think the reason the integration isn't working for me is the request URL. I manually amended the request URL to include the firstname, last and email parameters and re-submitted. I was then able to access LAMS via Sharepoint. This action created the appropriate entries in the LAMS database. Subsequent attempts with the same SP user still works, as presumably it is just using the the username to validate against existing credentials.

I think what you mentioned about the server farm setting is applicable here. Looking at the integration code below, if the below condition is not met, the additional parameters are not added to URL.

if ((string)myFarm.Properties["LAMSUseProfiles"] == "False"...))

However, I don't recall explicitly setting the LAMSUseProfiles anywhere hence it probably doesn't have a value, it is not contained in the Admin page for LAMS Integration Settings under Site Collection Administration . Under ideas where I can set/change this value?

Posted by Praveen Pawar

7: Re: Re: Re: Re: Re: Integrating Microsoft SharePoint Server (MOSS2007) with LAMS
In response to 6 03/31/09 10:11 PM
[ Reply | Forward ]
Hi Praveen,

Im not 100% sure where this can be set, It is an old setting that is no longer used, and to be honest it shouldnt be there in the code to begin with. I believe the setting used to be under the central administration pages, but im not sure its there anymore.

What I have done is rebuilt the .wsp file (attached) with that check removed in the code. Hopefully re-installing with this will fix the problem.

What you need to do it go to thee LamsSharePointIntegration-1.0 folder (from the package you downloaded), replace the LamsSharePointIntegration.wsp file with the one attached. Then run the RemoveSolution.cmd followed buy the InstallSolution.cmd.

Sorry about making you re-install but at this point Im not sure what else can be done, the setting seems to be out-of-date.

Hope this fixes your problem

Luke

Posted by Luke Foxton

Attachments:
8: Re: Re: Re: Re: Re: Re: Integrating Microsoft SharePoint Server (MOSS2007) with LAMS
In response to 7 04/23/09 11:36 PM
[ Reply | Forward ]
Hi Luke, apologies for the delay in responding. I re-installed the feature with your updated wsp file and re-tested and the integration works fine.
Much appreciated,
Praveen.

Posted by Praveen Pawar

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum