The pagelib library is used for constructing and displaying pages in Moodle. This chapter will cover the basic concepts of using pagelib. pagelib is an important core library, but has little, if any, official documentation. Although the source code includes comments, most of the functions are not documented in PHP Doc format and so are not visible from the Moodle Xref site. They can only be viewed by direct inspection of the /lib/pagelib.php
file. This chapter covers the following major topics:
Page classes
Core modules that use pagelib
pagelib core functions
Requirements for using pagelib
Updating activity Foo! to use pagelib
Related libraries
Note that the ultimate goal of this chapter is to show you how to use pagelib in your development projects. Because there is little reference material available in the Moodle community on pagelib, we have included it in this chapter. If you want to see the practical application,...