Moodle - How to disassemble Locks

Asked

Viewed 111 times

3

How to use blocks to get layout elements?


Example:

<?php echo $OUTPUT->blocks('course_summary', 'cssCourse'); ?>

I want to use the block with the course_summary id, only it does not appear on the first page...
................................................................

Or something else I found I couldn’t develop further on top is this:

<?php echo $OUTPUT->login_info(); ?>

It prints the block of login information, where you can do loggof and edit profile, etc... But I can no longer get over the other blocks, nor disassemble the login info to separate for example the user’s avatar from his name...etc...

I keep waiting for help and examples...

1 answer

2


I managed to disassemble the login area, to print the default block is like this:

<?php echo $OUTPUT->login_info(); ?>

To disassemble it in several blocks there are a few ways, example:

<?php echo echo $USER->firstname; ?>

So you disassemble the login_info block and print only the first name of the user q appears in the login_info block... To dismantle the rest just follow the same path...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.