Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.
   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * Prints the compliance data registry main page.
  19   *
  20   * @copyright 2018 onwards Adrian Greeve <adriangreeve.com>
  21   * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  22   * @package tool_dataprivacy
  23   */
  24  
  25  require_once(__DIR__ . '/../../../config.php');
  26  require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/dataprivacy/lib.php');
  27  
  28  $url = new moodle_url('/' . $CFG->admin . '/tool/dataprivacy/summary.php');
  29  $title = get_string('summary', 'tool_dataprivacy');
  30  
  31  $context = \context_system::instance();
  32  $PAGE->set_url($url);
  33  $PAGE->set_context($context);
  34  $PAGE->set_title($title);
  35  $PAGE->set_heading($SITE->fullname);
  36  
  37  // If user is logged in, then use profile navigation in breadcrumbs.
  38  if ($profilenode = $PAGE->settingsnav->find('myprofile', null)) {
  39      $profilenode->make_active();
  40  }
  41  
  42  $PAGE->navbar->add($title);
  43  
  44  $output = $PAGE->get_renderer('tool_dataprivacy');
  45  echo $output->header();
  46  $summarypage = new \tool_dataprivacy\output\summary_page();
  47  echo $output->render($summarypage);
  48  echo $output->footer();