Moodle

nested site policy when forcelogin enabled and policy file stored in coursefiles

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8.1
  • Component/s: Authentication
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

When uploading an html file and filling the policy location on the Moodle Amdin Settings, policy.php page shows itself in a nested fashion in the iframe where the uploaded html should appear. To reproduce:
1. create a html file, either ISO8559-1 or UTF8 encoded, either using strict or loose DTD.
2. upload the file and fill the policy admin setting
3. logoff and manually create a new account
4. after receiving the email confirmation, click on the link to confirm the new account
5. look at the policy.php page, nesting istelf in the IFRAME.

The problem appears both on IE7 and Firefox 1.5. Apparently in a random fashion, the problem may not appear, so to fully troubleshoot the problem please try again if the page displays correclty.

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

What is your forcelogin setting?

You can not view uploaded files before confirming the policy if forcelogin enabled. The randomness could be caused by browser caching.

I am evaluating option to skip require login in file.php for policy file itself...

Show
Petr Škoda (skodak) added a comment - What is your forcelogin setting? You can not view uploaded files before confirming the policy if forcelogin enabled. The randomness could be caused by browser caching. I am evaluating option to skip require login in file.php for policy file itself...
Hide
Andrea Bicciolo added a comment -

Forcelogin is enabled. Would it be simpler to let admins edit policies directly using a browser rather than uploading a file? Would it leave easier teh solution?

Show
Andrea Bicciolo added a comment - Forcelogin is enabled. Would it be simpler to let admins edit policies directly using a browser rather than uploading a file? Would it leave easier teh solution?
Hide
Andrea Bicciolo added a comment -

Another possible solution to this issue: let people accept the policy when creating a new account.

Currently formslib support all the existing mdl_users database fields, including "policyagreed". Thus:
1. add a flag into admin settings, "new account must agree policy" (instead of policy path)
2. add a editor box where policy can be added
3. if new "account must agree" is true, then signup_form.php will display a checkbox and the text entered in point.2
4. checkbox shall be stored in "policyagreed" into mdl_user table.

Very rough code to be refined prior to add to signup_form.php:

$privacystring = 'I agree.......';
$mform->addElement('checkbox', 'policyagreed', $privacystring);
$mform->setType('policyagreed', PARAM_BOOL);
$mform->addRule('policyagreed', 'You have to accept policy to create e new account', 'required', null, 'client');

Show
Andrea Bicciolo added a comment - Another possible solution to this issue: let people accept the policy when creating a new account. Currently formslib support all the existing mdl_users database fields, including "policyagreed". Thus: 1. add a flag into admin settings, "new account must agree policy" (instead of policy path) 2. add a editor box where policy can be added 3. if new "account must agree" is true, then signup_form.php will display a checkbox and the text entered in point.2 4. checkbox shall be stored in "policyagreed" into mdl_user table. Very rough code to be refined prior to add to signup_form.php: $privacystring = 'I agree.......'; $mform->addElement('checkbox', 'policyagreed', $privacystring); $mform->setType('policyagreed', PARAM_BOOL); $mform->addRule('policyagreed', 'You have to accept policy to create e new account', 'required', null, 'client');
Hide
Petr Škoda (skodak) added a comment -

I have already discussed the site policy on signup page - it will be in 1.9, no new features in 1.8.x, sorry

I am going to commit a patch soon and some other fixes too.

Show
Petr Škoda (skodak) added a comment - I have already discussed the site policy on signup page - it will be in 1.9, no new features in 1.8.x, sorry I am going to commit a patch soon and some other fixes too.
Hide
Petr Škoda (skodak) added a comment -

oh
... discussed with Martin...

Show
Petr Škoda (skodak) added a comment - oh ... discussed with Martin...
Hide
Petr Škoda (skodak) added a comment -

should be fixed in cvs, thanks for the report.

Show
Petr Škoda (skodak) added a comment - should be fixed in cvs, thanks for the report.
Hide
Ray Lawrence added a comment -

Updated to latest 1.8+ today. This issue is still present i.e. policy is still nested. Policy file is a html file in site files.

Causes lock up in IE 6.

Force log in is off.

Show
Ray Lawrence added a comment - Updated to latest 1.8+ today. This issue is still present i.e. policy is still nested. Policy file is a html file in site files. Causes lock up in IE 6. Force log in is off.
Hide
Petr Škoda (skodak) added a comment -

hmm, it always worked with forcelogin off, I think this is different problem. Please describe exacts steps needed to reproduce the problem (file names, locations, etc.) and please send me a test account via email and URL (skodak at moodle dot org).

thanks

Show
Petr Škoda (skodak) added a comment - hmm, it always worked with forcelogin off, I think this is different problem. Please describe exacts steps needed to reproduce the problem (file names, locations, etc.) and please send me a test account via email and URL (skodak at moodle dot org). thanks
Hide
Ray Lawrence added a comment -

Create a html file policy.html
Upload to site files in 1.8.+ site
Enter path to above file at .....moodle/admin/settings.php?section=sitepolicies i.e http://mysite.co.uk/moodle/file.php/1/policy.html
Attempt to log in.
Site policy "pane" was filled with nested site policies on client machine, now testing in office and site policy is displayed without nesting.
On both computers when the button is clicked to accept the policy the browser hangs.

Only in IE 6, FF works fine

Show
Ray Lawrence added a comment - Create a html file policy.html Upload to site files in 1.8.+ site Enter path to above file at .....moodle/admin/settings.php?section=sitepolicies i.e http://mysite.co.uk/moodle/file.php/1/policy.html Attempt to log in. Site policy "pane" was filled with nested site policies on client machine, now testing in office and site policy is displayed without nesting. On both computers when the button is clicked to accept the policy the browser hangs. Only in IE 6, FF works fine
Hide
Ray Lawrence added a comment -

Update, I received this warning in IE6. When I cleared the message I was able to accept the policy and enter.

Show
Ray Lawrence added a comment - Update, I received this warning in IE6. When I cleared the message I was able to accept the policy and enter.
Hide
Petr Škoda (skodak) added a comment -

Works fine for me in nonIE browsers, you could try to fix the policy file to contain valid HTML (it is missing html and body tags).

Show
Petr Škoda (skodak) added a comment - Works fine for me in nonIE browsers, you could try to fix the policy file to contain valid HTML (it is missing html and body tags).
Hide
Ray Lawrence added a comment -

Fixed. Still not working in IE6. Confirm works fine here using Firefox.

Show
Ray Lawrence added a comment - Fixed. Still not working in IE6. Confirm works fine here using Firefox.
Hide
Petr Škoda (skodak) added a comment -

the problem is in IE itself, it can not redirect when the policy page contains object tag
I am going to file a new issue for it.

Show
Petr Škoda (skodak) added a comment - the problem is in IE itself, it can not redirect when the policy page contains object tag I am going to file a new issue for it.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: