Outils pour utilisateurs

Outils du site


format:page:installguide

Ceci est une ancienne révision du document !


Page format : Installation Guide

The page format is a very powerful format, but its installation may be non-trivial. It is not recommended for people not having a minimal architectural knowledge of Moodle, and with low coding skill in LAMP open-source platforms.

The installation process focusses:

  • Install the necessary components for the operation of the format (standard)
  • Install the necessary customizations (customscripts)
  • Install some patchs for enhanced features (optional)
  • Edit the themes used to include additional layouts (layouts) in the page format

Necessary components

In addition to the “format/page” component, you will need to install:

  • The Page Module block: This block is responsible for proxying Moodle's activity modules as blocks to unify the page construction process.
  • The Course Summary block: This block offers a simple menu consisting of the pages available from a given root. Its implementation is kept simple.

Installation process

Download and install components
  1. Unpack the page format archive in the /course/format directory of your Moodle installation
  2. Unpack the Page Module block archive in the /blocks directory of your Moodle installation.
  3. Unpack the course Summary block in the /blocks directories of your Moodle installation.
  4. Navigate to administration notifications to proceed with the “logical” installation of the added components.

Activation of "customizations"

The page format archive comes with a number of add-ins located in the customscripts and theme directories of the distribution.

  1. Create (if you have not already) the Moodle customization directory. The use is, in general, that it is called customscripts and is located at the root of the Moodle installation (but may be eslewhere).
  2. Copy the contents of the __customscripts directory to this directory. WARNING: if your installation already has customizations on identical path files for reasons other than the page format, it will be necessary to ask an integrator to merge the changes.
  3. In the configuration file of Moodle (config.php at the root) add the following line:
 $CFG->customscripts = '/path/to/my/moodle/customscripts';
 

Added additional theme elements

The __theme add-in contains a pseudo-theme “page”. This theme is potentially usable as such, but its use is not recommended because it will not track the customizations of the themes exploited on the platform.

This add-in is here to provide you with the items to add in the themes you otherwise use in Moodle.

This package essentially contains a 'page.php' layout that must be added to the themes you use in the operating platform.

To activate this layout, edit the config.php file of the target theme and add the following lines in the layout definition (Php table):

  'format_page' => array(
      'file' => 'page.php',
      'regions' => array('side-pre', 'main', 'side-post', 'footer-left', 'footer-middle', 'footer-right'),
      'defaultregion' => 'side-post',
  ),
  
  'format_page_action' => array(
      'file' => 'page.php',
      'regions' => array('side-pre', 'side-post', 'main', 'footer-left', 'footer-middle', 'footer-right'),
      'options' => array('langmenu' => true, 'noblocks' => true),
      'defaultregion' => 'side-post',
  ),

You will probably have to review the header and footer sequences in the layout page.php file. Indeed, each theme producer has his own writing of these sequences. The “active” part of the layout is:

  <!-- END OF HEADER -->
  <!-- START CUSTOMMENU AND NAVBAR -->
  <!-- END OF CUSTOMMENU AND NAVBAR -->
  <!-- page content -->
      <div id="format-page-content" class="format-page-content container-fluid">
          <!-- EVERYTHING HERE IS DEFERRED TO format.php OF THE COURSE FORMAT -->
          <? php echo $OUTPUT->main_content();? >
      </div>
  <!-- START OF FOOTER -->

You can place any header or footer construction, respectively above and below the corresponding marker, from other layout files in your target theme.

Back to Format Page index

format/page/installguide.1770667206.txt.gz · Dernière modification : de admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki