Moodle

missing on unload hook in new PAGE framework?

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: General
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

I was working on iplookup and could not find any way to replace old unload hook previously in header meta code, what is the current way?

TODO left in iplookup/index.php

Issue Links

Activity

Hide
Tim Hunt added a comment -

Actually, that was not in the meta parameter, but in the $bodytags parameter, which adds extra attributes to the <body> tag.

Anyway, the correct way to fix this is to add the unload handler during the load event.

I think this patch fixes it, but I cannot work out how to test the iplookup page. It will only give me error messages. So I am attaching the fix here for you to test.

Show
Tim Hunt added a comment - Actually, that was not in the meta parameter, but in the $bodytags parameter, which adds extra attributes to the <body> tag. Anyway, the correct way to fix this is to add the unload handler during the load event. I think this patch fixes it, but I cannot work out how to test the iplookup page. It will only give me error messages. So I am attaching the fix here for you to test.
Hide
Petr Škoda (skodak) added a comment -

testing

Show
Petr Škoda (skodak) added a comment - testing
Hide
Petr Škoda (skodak) added a comment -

thanks Tim, works fine after adding some echos

Show
Petr Škoda (skodak) added a comment - thanks Tim, works fine after adding some echos
Hide
Tim Hunt added a comment -

Grrr! stupid bloody API that needs you to echo everything. Who invented it

Thanks Petr

Show
Tim Hunt added a comment - Grrr! stupid bloody API that needs you to echo everything. Who invented it Thanks Petr

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: