Time for action – installing the My Courses block
To install the My Courses block, which is a block that allows users and the site administrator to access the courses they are enrolled in or are permitted to access, follow these steps:
First go to Modules and plugins in the Downloads tab of Moodle.org and search for My Courses.
If the search does not return an entry for My Courses and instead only lists My Courses 2 and other similar items, navigate to the forum found at the following link and download the block from the forums. A packaged version will appear towards the bottom of the forum dated sometime in October 2010.
Forum thread title: New myCourses block released
If the My Courses block, contributed by Rosario Carcò, is listed in the Modules and plugins area, proceed to step 4. (Note—The MyCourses block is scheduled to appear in the Modules and plugins database on Moodle.org sometime in December 2010).
Click on My Courses and then click on the Download latest version link to download the block files.
This will download a compressed package containing all of the files for the block called
myCourses.zip
. To install the block on your local MAMP package, expand the package with a compression/expansion tool.Expanding the package will create a folder titled
myCourses
that must be placed in theblocks
folder located in your Moodle directory. For a MAMP package on the Mac OS, you can find the appropriate folder by opening the folder that contains your MAMP directory and then navigating to theblocks
folder. The path is as follows:Applications/MAMP/htdocs/moodle19/blocks
.Drag-and-drop or copy the
myCourses
folder into theblocks
folder.After copying the contents to the
blocks
folder in your Moodle directory, your blocks folder will contain folders for the standard blocks plus the newly installedmyCourses
folder, as shown in the following screenshot:Next you must log in to your site as admin and click on the Notifications link found in the Site Administration block. This will start the installation of the block components and create tables in the database that will be used by the block.
You will see a message informing you that the tables have been set up correctly. Click the Continue button, shown in the following screenshot, to proceed:
The next screen will be the main Notifications page. From this point, you can get back to the front page by clicking on the leftmost breadcrumb on the top-left side of the browser window.
Now that the My Courses block has been installed it can be inserted into the front page by turning on editing and selecting it from the drop-down Blocks menu. Our front page, with the My Courses added and moved to the top-left of the page, now looks like the following screenshot:
Finally, we can access the configuration settings for the My Courses block by clicking on the Modules link found in the Site Administration block.
Next, click on Blocks and then on the MyCourses link. The various configuration settings are modifiable from this screen. You can toggle these settings at any time to see how they affect the appearance of the My Courses block by returning to this page. Use the following settings for our test site:
Show scrollbars: Untick this because we will set up the site with the categories that house our courses and won't need them.
Show all courses: Tick this to provide a link at the bottom of the block for easy access to all of the courses on the site.
Show long names: Leave unticked to keep long course names from cluttering the block.
Show category links: Tick to make each category title a link that will take you to the list of courses offered in that category.
Show flat list: Untick this or your courses will not be displayed in their categories.
Show course search box: Leave this unticked as we won't use the Course Search box.
Toggle own courses: Tick this to allow the admin to toggle between his or her own courses and all courses.
Toggle active courses: Tick this to allow the admin to toggle active course visibility off and on.
Toggle inactive courses: Tick this to allow the admin to toggle inactive course visibility off and on.
Return to the front page of your site to view the block. Note however, it will not fill with categories and courses until we have them, which we will work on in Chapter 2, Building the Foundation—Creating Categories and Courses and Chapter 3, Student Account Creation and Enrollment.
What just happened?
We have just installed the My Courses block and modified the settings that control how it will display categories and courses to the site administrator. As we fill our site with both categories and courses in subsequent chapters, the convenience of this block will become more and more obvious as we'll be using it regularly to access specific courses in the site.