Forum LAMS for Tech-Heads - General Forum: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?


 
Search: 

13: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 12 04/03/08 05:57 PM
[ Reply | Forward ]
I suspect the permission denied and the "The next task is loading" is something to do with Javascript permissions. We run into problems with the integrations that stuff we are allowed to do in Javascript when LAMS opens the window is different to what we can do in Javascript when another site opens the window, all to do with Javascript permissions in the browser.

Can you temporarily make the window a popup window, rather than sticking it in an iframe and see what happens? I know you want an iframe, but making it a popup might help us work out what permission problems we might be encountering.

As for the system error one - can you dig out the lams.log and server.log again (after reproducing the problem)? When you have gone to other account, something has probably gone wrong in creating the new user on the LAMS side. So when its tried to add the user to the lesson, its failed and then it can't display the learner window.

Fiona

Posted by Fiona Malikoff

15: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 13 04/16/08 12:51 PM
[ Reply | Forward ]
I figured out a fix for the problem. You're right, it's a Javascript issue, but its not a permissions problem. It's just an issue with how your script refers to the content frame when it's loading content.

It refers to:
top.frames['contentFrame'].location.href = "...";

And the fix is to use:
parent.frames['contentFrame'].location.href = "...";

This doesn't seem to break anything, and makes a lot more sense. The change refers to the frame relative to its own location in the DOM, whereas the 'top' reference breaks any time you try to nest LAMS in a frame/iframe/etc.

Is there any chance of getting that changed in the next version? For now, I assume the only option is to go in and make the change in all the source files, which might need to happen in several places, and recompile it all. I found instructions for building from the source at http://wiki.lamsfoundation.org/display/lams/Building+LAMS.

Would I need to go through that whole setup if I just need to build a new WAR file to deploy on our server? Or can I just ignore all the database stuff and build the modified war? To do so, would, I just run "assemble-ear"?

Thanks!

Posted by Keith Kamholz

16: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 15 04/16/08 05:38 PM
[ Reply | Forward ]
I suspect we are using top.frames to ensure that if we end up inside an extra frameset like chat & scribe, forum & scribe, etc then it breaks out of the extra frameset.

I'll have a look at whether it can be fixed in time for the next release.

I think there are three files that will need looking at, all in lams-learning.war: progress.jsp, requestURL.jsp and welcome.jsp.  I think it is progress.jsp that has the most potential to break if we change it.

You don't need to do a whole build if you just want to change a few jsps containing this string. War files are actually zip format, so you can unzip them, change the files and rezip them back up again. You probably want to take a backup of the .war file first!

Just be careful when you rezip them - some of the nice GUI zip  tools end up putting an extra directory in the zip file ie you end up with everything in a folder lams-learning within the zip file. That will completely confuse Java.

Warning: if you ever do "assemble-ear" then you will find all the tool's will disappear from your LAMS server. So if you can do it by just unzipping and rezipping, that's the way to go for now.

Fiona

Posted by Fiona Malikoff

17: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 16 04/24/08 12:50 PM
[ Reply | Forward ]
Excellent, you're right, that's a much better solution.

I just changed requestURL.jsp and welcome.jsp, but I didn't see a progress.jsp file in lams-learning.war. There's a progressBroken.jsp, but that doesn't appear to need the change. I'll give what I have now a shot though, and I'll let you know how it works out. Thanks yet again!

Posted by Keith Kamholz

18: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 17 04/24/08 03:45 PM
[ Reply | Forward ]
We think we have it fixed for the next release (as of last night), but we haven't tested it fully yet. We will be testing it next week and if it is all working then we'll let you know.

If you want to see what we've done and can read source code difference reports, have a look at
http://lamscvs.melcoe.mq.edu.au/fisheye/changelog/lams/lams_learning?cs=MAIN:asukkar:20080424010733

As I said, it hasn't been through my "do weird and wonderful things that will break stuff" testing, so there may be more changes to come.

Fiona

Posted by Fiona Malikoff

19: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 18 04/28/08 07:53 PM
[ Reply | Forward ]
Keith,

I've tested Anthony's changes yesterday (to fix the javascript error), so you should be right to copy them into your server.

Fiona

Posted by Fiona Malikoff

20: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 19 05/15/08 03:50 PM
[ Reply | Forward ]
Ok, so with all your help, our integration seems to be working quite nicely. However, we just encountered a cross-browser issue where the lesson hangs on the 'Next task is loading' message in Internet Explorer. I've been using my own fix for that one Javascript issue that we addressed, so I don't know if my fix broke it in IE or if it was already broken. Do you know if everything was completely functional in IE before?

Posted by Keith Kamholz

21: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
In response to 20 05/15/08 05:01 PM
[ Reply | Forward ]
LAMS itself should have been working in IE. We consider IE one of our supportd browsers, so we do test it regularly in IE. I test it occasionally in IE7 and haven't encountered any issues.

Firefox is probably the best tested (and tuned for) browser, as that is what most of the development team use day to day but some of our other staff use IE regularly so I'm sure they would tell us in a hurry if the "next" in IE was broken.

But (and it is a big but) we don't run with our windows inserted in another frame, so it may be something to do with IE and how it handles frames. Did you have a look at the changes Anthony made for 2.1 to see if they would work any better?

It could also be something to do with the settings in IE - occasionally I get tripped up when I've turned on some security setting in IE and something that seems completely unrelated to me stops working.

Fiona

Posted by Fiona Malikoff

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