Page Course Format

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Page Course Format.

[Doc in progress]

This course format is the straight forward migration of the original Flexpage format to moodle 2, keeping all architecture concepts, datamodel, GUI principles while adding a lot of functionnal enhancements collected from several integration projects.

A bit of history

the origin Flexpage format was ordered by Intel(r) to MoodleRooms for the Intel Teach Essentials Online (tm) project in 2004.

Flexpage format has then been published as GPL code, and reused by Intel(tm) on the Teach Advanced Online(tm) (TAO) project with help of Catalyst, and at the same time derivated to the Pairform@nce project in France for Ministry of Education by MyLearningFactory experts.

The Intel(tm) hired teams collaborated closely at launch of the TAO project, for adapting this flexpage format to several requirements. Flexpage from Pairform@nce has then been reused in many institutional medium and big size projects, that needed a technologic continuity to 2.x version because having a lot of flexpage content.

Unfortunately, MoodleRooms decided to disrupt the technical track, changing the whole architecture of flexpage to something that appeared very different thinking from the original, and with a structural impossibility to upgrade old content.

Funded on several project tracks that was needing such upgradability of their content, MyLearningFactory lauched the project to rebuild a full moodle 2 version of this format, while integrating and publishing all the functional enhancements that were added in the meanwhile.

New additional components (blocks) where designed to work with this format, and some versions of well-known contibutions have been reworked to be compatible with some of the features (f.e. Checklist reworked as LearningTimeCheck / MyLearnignFactory)

Page Course Format Features

  • Manage pages of contents in the course
  • Let a complete flexible layout (block and ativites) in three columns
  • Reuse activities on several pages from an "activity bag" managed independantly from pages
  • Allow per page layout tuning for column width and feeding
  • Page management

New added features

  • Page copy: allows cloning a fully equiped page, copying activity references, and cloning blocks.
  • Page full copy: allows fully clonong a page, by creating new module activity instances and blocks.
  • Page quick reorder: integrating a DHTMLX tree to drag and drop reorder the pages
  • Move one item quickly in the page: mark and replace elements in any column at any position.
  • Page templating: let some course pages be defined as site-wide template for reusing when creating a new page in a course
  • Page access: Now some pages can be set really public (no login)
  • Page access: Now some pages can be set published to teacher (though published)
  • Page access: Now some pages can be published to connected students (this was the actual use case).
  • Page access: Now some pages can be given to named students (individualiation by page)
  • Page access: Now some pages can be given access to some groups
  • Page override: A page can be now completely overriden by an activity. (Usually this will need some customscripting of some main activity view.php script in order to add multipage navigation in activities).
  • Conditional page: A page can be accessible ONLY if some activity has been completed
  • Discussion side page: Alike a wiki, we added a side discussion page for helping teacher and author team to comment and discuss about a pcourse page design
  • Fine grain individualisation: As everything that is published on pages is proxied by a Page Module block instance, we added an experimental fine grain individualization feature that let choosing "per student" and "per page item" the composition of the course for each student individually.
  • Current sticky page: Depending on a capability, the currently visited page is stored in user profile so he will come back to that page when comming back to that course. People who DO NOT have this capability allowed will start on the first accessible page in the hierarchy.

Page Course Format components

  • Course page format (format_page) itself
  • Page module block: a mandatory block that proxies activiy modules and blocks as page items for the pages
  • Page tracker: An accessory block that provides a "learning station" simple menu with links to pages and visit markers
  • Pagemenu module: A local flexible navigation menu that aggegates page structures and external links or links to activities


Installation will need several operations.

1. Course format installation

Deploy the format package into your moodle installation in the directory course/format as course/format/page The format package contains resources to use as customscripts for course index replacement and some other core pages replacements.

2. Setting up theme additions

Because of renegociating many parts of the page layout, you need to integrate page specific additions into your active themes. These are :

  • additional page layout mappings in the theme config
  • aditional layout php scripts in the theme/layout directory.

You will get full instructions in the Readme file of the theme_page package. Note that this package IS NOT a directly usable theme, although installs properly into your Moodle, but provides resources to alter other activate themes adding page feature additions. Consider it as a source code template.

Essential steps to follow are :

  1. copy page.php layout into your theme.
  2. add the following page mappings to the config.php file of your theme
   'format_page' => array(
       'file' => 'page.php',
       'regions' => array('side-pre', 'main', 'side-post'),
       'defaultregion' => 'side-post', // avoid putting in main, or standard course will fail showing the new block menu 
       'options' => array('langmenu' => true)
   'format_page_action' => array(
       'file' => 'page.php',
       'regions' => array(),
       'options' => array('langmenu' => true, 'noblocks' => true),

Probably the best way to integrate it is using the "base" course format, that applies to all other formats, but often header and footer sections have been redrawn for each theme. So it will be more convenient to copy the page.php file into each used theme, and reshape header and footer sections to what your theme needs.

Other theme discrepancies

We noticed that base theme of moodle forces standard header to be float:left without real use. This cause an issue of postionning to our "page editing tool" widget (may roll over important controls in the page header). Override this rule in your theme to float:none.

this can be done in the pagelayout.css file in theme/base/style


3. Customscripts

Some customscripts are necessary to deroute some execution from core hard choices. The course index needs alteration to choose the appropriate page layout "page", when appropriate, and also derivate the standard block manager to a specially designed page_block_manager when required. If this step is not executed, the course format will not work properly.

1. Activate custom scripts in your main configuration file

 $CFG->customscripts = 'path/to/script/root';

2. Copy the content of the __goodies/customscript/<version> folder of the page format distribution into that location.

The customscript pages have been packaged on the Moodle 2.4 version. Page specific changes have been marked. If you plan to use the page format on other moodle versions, maybe some light adaptations have to be done.

4. Installing other components

DO NOT forget installing the Page Module block wich is mandatory for the page format to work correctly.


We worked a lot to avoid any core patch to be added to the solution, reworking the 1.9 version and seeking how to eliminate them one by one. We could get rid of all of them but one, that blocks the whiziwhig editor when editing page format block settings.


  • Course content page
  • Page settings
  • Page management list
  • Page reordering screen
  • Page access assignation screen
  • Activity pool management
  • Page side discussion page
  • Individualisation board


Page format brings his own capabilities to control which role can perform some actions :

  • format/page:editpages
  • format/page:viewhiddenpages
  • format/page:addpages
  • format/page:storecurrentpage
  • format/page:managepages
  • format/page:viewpagesettings
  • format/page:discuss
  • format/page:individualize