Petr ?koda [31/Aug/06 03:57 PM]
Try this patch, it allows redirect delay 0, usage:
redirect('yoururl', '', 0)
There is IMO nothing else that can be done in redirect(), because the continue link must be printed for non-javascript compatibility. In any case you should fix the code in 1.7 to not print header before redirect().
To Mark:
Please read Petr's message again: for the 3 seconds [irritating] delay to be suppressed, you still have to modify \mod\lesson\action\continue.php line 596 as per my message in MDL-6503
redirect("view.php?id=$cm->id&action=navigation&pageid=$newpageid","","0");
i.e. add empty message and 0 seconds delay when calling redirect()
To Petr
I do NOT understand why we still bother about non-javascript compatibility in Moodle!? If Javascript is not enabled in a navigator, then it is quite impossible to use most of Moodle's functions anyway, so why why why?
Joseph
From Petr Skoda (skodak at centrum.cz) Monday, 15 May 2006, 03:24 PM:
redirect should be used alone - no page output before,
working on a solution to allow redirect also after other output.
It should print continue + footer + die and try to redirect if possible.
From Petr Skoda (skodak at centrum.cz) Thursday, 18 May 2006, 02:08 AM:
fixed in CVS, you can now use error() and redirect() after print_header() :-D