Refreshing the private files block using PHP code

Refreshing the private files block using PHP code

by Luis de la Torre -
Number of replies: 1

Hi all,

 

So here is the thing.

We created a PHP code to upload a file to the private files repository for a user. This file is sent from a Java applet using the POST method. This is working fine.

However, and here is my question, the private files repository does not refresh automatically when the file is sent from the client's Java applet to the server Moodle. Im sure it must be possible to refresh the private files block (so the new sent file appears listed) using some php code but I just can't figure out how to do it.

Any help here would be much appretiated.

Thanks in advance for your time smile

Average of ratings: -
In reply to Luis de la Torre

Re: Refreshing the private files block using PHP code

by Luis de la Torre -

Ok, so just in case I wasnt clear about the whole thing, I want to point something out.

I can actually see the file I send from the applet in the private files block if I refresh it manually (either pressing the "manage my private files" button of the block or refreshing the whole Moodle webpage.

My question is how could I just refresh the private files block using some php code. Probably the variables $Output or $Page could have something to do about it but Im just a little bit lost here.

Thanks again!