Monday, December 21, 2015

Change Maximum Number of Uploaded Files

by: Nur Q | alfiyahibnumalik@gmail.com | Surabaya | Indonesia

Bismillah. This was my posting in
moodle dev forum https://moodle.org/mod/forum/discuss.php?d=227606

I am running moodle 2.9.2+. I think, I have found a way to change Maximum Number of Uploaded Files in Assignment. The site give a limitation only 20 files, but I need to give a space for 30 uploaded file, just for very very special case.

The setting was saved in database:
mdl_config_plugins > [plugin] assignsubmission_file > [name] maxfiles > [value] 20

All we need to do is only change the value. Don't change manually using phpmyadmin or something else, because it will not make any effect, instead, use moodle function set_config

the function is:

       set_config($name, $value, $plugin);

so... the code

       set_config('maxfiles', 30, 'assignsubmission_file');

Execute in any php files within moodle folder after
require_once(__DIR__ .'/../../config.php');
 
The Kaaba is the holiest site in Islam, and is often called by names such as the House of God or the House of Allah. https://en.wikipedia.org/wiki/Kaaba
And remember Ibraham and Ishmael raised the foundations of the House (With this prayer): "Our Lord! Accept (this service) from us: For Thou art the All-Hearing, the All-knowing.  — The Holy Quran, Chapter 2 (Al-Baqarah) verse 127
 
INDONESIAN

Moodle membatasi max 20 file untuk di-upload sebagai Assignment. Setting itu disimpan di database:
mdl_config_plugins > [plugin] assignsubmission_file > [name] maxfiles > [value] 20

Perhatian: Jangan diubah secara manual melalui phpmyadmin atau semisalnya, karena tidak akan berpengaruh. Gunakan fungsi moodle berikut untuk mengubah setting menjadi 30 file.

       set_config($name, $value, $plugin)

sehingga
 
       set_config('maxfiles', 30, 'assignsubmission_file');

Reference: https://docs.moodle.org/dev/Developer_FAQ
 
Thats all.... All Praise for Allah... The Creator and Sustainer of The Universe

No comments:

Post a Comment