MDL-39929, it was detected that different implementations of the xxxx_pluginfile() methods (mainly in activity modules) were showing some inconsistencies/differences that would be worth reviewing.
Some of them include:
- Handling of the $forcedownload parameter, sometimes used, other ignored when finally sending the file.
- Potentially missing the $options param when sending the file.
- Heterogeneous use of require_login() and require_course_login(), sometimes allowing autologinguests, others forbidding it.
- Different implementations (sometimes using a big "switch case" like conditional use of "if...else", others sending not found...
In any case, we should review them and, while assuming they are working, try to homogenize (and cover with acceptance tests) all them. For clarity and because core implementations are often used as a reference for devs out there.
That is it, ciao