customcert plugin just generate pluginfile_AUTOGENERATEDCODE.php in android

customcert plugin just generate pluginfile_AUTOGENERATEDCODE.php in android

by Wai Phyo YGN -
Number of replies: 2
Our moodle is 4.0.11 version and we use customcert 4.0.5 plugin and it working fine on web and iOS version and it is not working android version because it generate .php extension not .pdf and if we change the file extension manually from .php to .pdf, it is working. Please let us know the problems and how we can solve. 
Average of ratings: -
In reply to Wai Phyo YGN

Re: customcert plugin just generate pluginfile_AUTOGENERATEDCODE.php in android

by Marcellino Santoso -
Ah, nice to know that I am not the only one experiencing this. My environment is Moodle 4.1.5 with the customcert 4.1.1.

Using the browser, the certificates are generated nicely (Thanks Mark!!), but indeed on Android running Moodle App (the generic one from PlayStore, not a BMA, version 4.3.0) the generated downloaded file is pluginfile_AUTOGENERATEDCODE.php. The rest of the findings are exactly how OP described: if the said file is renamed to .PDF, it opens just fine.

While it is OK for us the "techies", it may be counter-intuitive for the users. I tried with my limited knowledge to look for this in classes/template.php and regeneratecertificates.php, but failed to identify which part that may generate the pluginfile_AUTOGENERATEDCODE.php part.

Can anybody help us on identifying where to look and/or change?

TIA.
In reply to Marcellino Santoso

Re: customcert plugin just generate pluginfile_AUTOGENERATEDCODE.php in android

by Marcellino Santoso -
Replying to myself: classes/output/mobile.php:78 and :99 are apparently the ones which sends out the pluginfile_AUTOGENERATEDCODE.php

@Wai Phyo YGN can you do modify something on this and share the result?