In this section we will take a look at a real world block. This block was originally created for a large college. It's called the Instructor Contact Block. It is designed to make it easier for students to communicate with their instructors. Although we won't cover every line of code, there are a couple of things to pay special attention to. First, we will see a real world example of creating a new block to improve Moodle's functionality. Secondly, we will see how to access some information from a user profile and display it on the screen. Additionally, we will take a quick look at how to gather some configuration data for our block.
Let's have a look at the overall results of the Instructor Contact Block. The following screenshot shows an example of the block configured for an instructor in a course:
The next screenshot shows the settings screen for this block:
We will now look in more detail at the code that generates this configuration screen.