Moodle File Permissions Recomendation

1. moodledata directory dan semua all konten-kontennya (dan subdirectories, termausk sessions):

owner: apache user (apache, httpd, www-data, whatever; see above)
group: apache group (apache, httpd, www-data, whatever; see above)
permissions: 700 on directories, 600 on files

2. moodle directory dan semua konten-kontent nya dan subdirektori (termasuk: config.php):

owner: root
group: root
permissions: 755 on directories, 644 on files.

Jika dimungkinkan login secara lokal oleh user biasa, maka ada 2 (dua) hal yang perlu diatur:

owner: root
group: apache group (apache, httpd, www-data, whatever; see above)
permissions: 750 on directories, 640 on files.

Reference:

https://docs.moodle.org/403/en/Security_recommendations#Most_secure.2Fparanoid_file_permissions

Bulk Backup dan Restore

Plugin ini tergolong sudah tua, latest release saat tulisan ini dibuat adalah 4 tahun yang lalu. Walaupun demikian plugins ini tetap bisa digunakan, walaupun Anda tetap perlu memastikannya.

Plugin yang digunakan : Backup and Restore Command-Line Interface
Admin tools ::: tool_brcli

Plugin site : BrCLI

Tujuan penggunaan:

Melakukan backup dan restore courses yang berada pada/ke sebuah course category.
Courses yang berada pada category yang dipilih akan dibuat backup sebuah file *mbz untuk masing-masing course

Sedangkan untuk restore, file-file course-backup (*.mbz) harus berada pada sebuah direktory/folder tertentu dan akan menuju ke category_id tertentu pula

Enlightlite bugs resolve

Moodle specification:
Version 3.9.x, 3.10.x
Theme: Enlightlite

changing in enlightlite/classes/core/course_renderer.php
search: top_course_menu

$sql = "SELECT a.category , a.cnt from ( SELECT category , count(category) as cnt FROM {course} C";
$sql .= " INNER JOIN {course_categories} cc ON cc.id = c.category WHERE category != 0 and c.visible <>1 and cc.visible<>1 group by category ) as a order by a.cnt desc ";

Custom Moodle User Profile Page

Follow these steps to customize the user profile page. 

1. Go to theme/config.php file and find this code.

  // My public page.

    ‘mypublic’ => array(

        ‘file’ => ‘columns2.php’,

        ‘regions’ => array(‘side-pre’),

        ‘defaultregion’ => ‘side-pre’,

    ),

2. Create your custom layout file in layout folder and replace it like below

  // My public page.

    ‘mypublic’ => array(

        ‘file’ => ‘yourcustomlayout.php’,

        ‘regions’ => array(‘side-pre’),

        ‘defaultregion’ => ‘side-pre’,

    ),3. Create a template file(yourcustom.mustache) in templates folder in theme.

4. in your custom layout php file get all user information and render it on .mustache file like below

echo $OUTPUT->render_from_template(‘theme_custom/mypublic’, $templatecontext);

Reference:
https://moodle.org/mod/forum/discuss.php?d=370809

1 2