call moodle with an iframe - IE cookie problem

call moodle with an iframe - IE cookie problem

by Marcus Schürstedt -
Number of replies: 2

Just found, that when calling moodle within an iframe, IE has a cookie problem. I did not find a solution in the forum, but found a solution how to solve this (this is not a moodle specific problem).


IE needs some privace settings, so that it will allow cookies from iframes which come from another source (e.g. xyz.com has an iframe, pointing to moodlexyz.com). Otherwise it will not accept the cookies from moodle and you receive a cookie error when login in.


To solve this, I put the following header in the login/index.php:


header('P3P: CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"');

I put it just after the require_once...

Before that I tested it with this header in the main index.php, which solved the issue for IE8, but not for IE7.

As I do not know, if this is a known problem, just wanted to share this. If this is already known, please ignore my posting smile.

Have fun.

Marcus


Average of ratings: Useful (1)
In reply to Marcus Schürstedt

Re: call moodle with an iframe - IE cookie problem

by Melissa Benson -

Is there a way to do this in HTML code or javascript if you dont have access to the php?

In reply to Marcus Schürstedt

Re: call moodle with an iframe - IE cookie problem

by Melissa Benson -

Hmm I can't seem to get this to work. It seems like it has some effect... if I don't have that code in there it takes me to the front page and I can't get into the course but when it's in login/index.php and index.php I CAN click on the course and get it.

 

But it still takes me initially to the front page.

 

Ideas?