In my module, I need to update the item image (pie chart) when specific item fields change.
I am doing that by calling an update_piechart function which then calls a view using jrCore_download_file. The view returns the new image which is then saved to the item.
But (unless I have a browser tab open with the image-making view) the $_user data is not available in that view - I am not logged in.
Should I be able to see the $_user data for the logged in user there?
I tried checking using flags, but they are also not available in that view. Are flags deleted when a new view is called?
I'm coping with that by updating the item before using jrCore_download_file, then checking that the item has just been updated in the view producing the image, but that doesn't feel quite right, so I'm wondering if there is a better way to do this?
Any suggestions would be appreciated!
Thanks
--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
updated by @ultrajam: 06/14/16 10:11:00PM