|
12:
Re: Re: Re: Re: Re: Re: Re: Re: Integrating LAMS into home-brewed application?
|
In response to 11
|
04/03/08 01:47 PM |
|
Got it! The only problem was that I wasn't passing the lsid. I didn't realize that parameter was referring to the id of the page you would like to open.
This is a little weird though... the Congratulations page isn't working. Firebug is showing me and error that reads: "uncaught exception: Permission denied to get property Window.contentFrame"
However, if I access just the LAMS survey in my main browser window, the messages appear just fine. It's only in the iframe of my application that the problem occurs. Any idea what could be going on?
Also, the interface is displayed properly, but the lesson doesn't appear to load unless I click the 'Resume' button. Otherwise, it just displays a message saying "The next task is loading. Please wait....". Weird, right?
And one other problem... for my main test user everything is working ok, but when I use another user account, without changing anything else, I get an error in the LAMS sidebar and the lesson doesn't load. It just says that "A following System Error has occurred: You may need to restart the browser window...". Any clue what could be causing this?
Sorry to keep bugging you with all these problems, but thanks for the all the help so far! It's much appreciated!
Posted by Keith Kamholz
|
|
|
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 |
|
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 |
|
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 |
|
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
|
|
|
|
|
|
|
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 |
|
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
|
|
|