Closed ericmerrill closed 6 years ago
Hi Eric.
It took me a while to follow your meaning. But I see what you mean. Yes this would explain the odd ghost that we see which inexplicably never converts.
I am impressed that you understood the whole Poodll flow so closely. I had thought we were overwriting the draft file also, but its possible that we are not. Or that we do not overwrite all instances of the filename match, just the first one. I will look at this before the next release. Thanks for bringing it to my attention
The basic jist is that if you make a recording in a textarea somewhere, save, go back in to edit the textarea, and while you are editing it, the conversion/transcoding completes, when you save, the converted file will be overwritten with the poodll placeholder.
This is because when you click to edit, it makes 'copies' of the files in the then current state as the user drafts area, and then when you save, it copies those draft files back into the main file records for the textarea, even if they were overwritten elsewhere in between.
Specific steps to reproduce:
Normally this would be the desired behavior when working with files, so this isn't a bug with Moodle's handling IMO, but I think because of the very specific way PoodLL works, there would be a fix available. Since PoodLL works with unique file names, I think it would safe/desireable to overwrite all placeholder instances of a file with the particular file name, including those in draft areas, with the proper contenthash and filesize.