changing the url for a file ressource

changing the url for a file ressource

by snadly Mohamed Amine -
Number of replies: 0

Hi

I am trying to download a ressource file in moodle from an android client , I've successfuly done it when I specify the url in my java code.

But I want something generic, I mean when I select a file name from my application , I download it .

The idea is clear in my mind, but something in the ressource url (in open mode) bothers me , it's the contextid. For exemple :

http://192.168.1.2:8888/moodle/pluginfile.php/30/mod_resource/content/2/and3.pdf

this is the url displayed when I open and3.pdf file in "Open" mode (not embaded or automatic). The "30" in the url is the file contextid.

I want to change the generation of the url so the contextid will be no longer part of it .But I don't know what to modify in moodle code , I am a java developper and PHP is not my point of strengh.

Please Help me

Regards

Average of ratings: -