I remember we discussed it before, I objected that the use of session will result in a lot of confusion when using multiple windows. Unfortunately it is worse than I expected
Example:
1/ enable Download plugin
2/ create new forum with some posts
3/ "Save" posts one by one
4/ now open "Save..." of first post in new window
5/ close that new window
6/ save another post
result - first post is saved instead of the second, this feels very confusing to me
====
if the export fails with "You tried to repeat the export of some information, or start an empty export. To do that properly you should go back to the original location and start again. This sometimes happens if you use the back button after an export has completed, or by bookmarking an invalid url." the continue button leads to $CFG->wwwroot
====
Obvious solution is to use Ajax popups.
Alternative solution would be to use hidden params for original tracking where possible and only exceptionally rely on session data in plugins that do not have callbacks with custom parameters
.