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