| 1456 | 
           ariadna | 
           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 | 
            *
  | 
        
        
            | 
            | 
           19 | 
            * @package   theme_universe
  | 
        
        
            | 
            | 
           20 | 
            * @copyright 2023 Marcin Czaja (https://rosea.io)
  | 
        
        
            | 
            | 
           21 | 
            * @license   Commercial https://themeforest.net/licenses
  | 
        
        
            | 
            | 
           22 | 
            *
  | 
        
        
            | 
            | 
           23 | 
            */
  | 
        
        
            | 
            | 
           24 | 
              | 
        
        
            | 
            | 
           25 | 
           defined('MOODLE_INTERNAL') || die();
  | 
        
        
            | 
            | 
           26 | 
           global $PAGE, $OUTPUT;
  | 
        
        
            | 
            | 
           27 | 
              | 
        
        
            | 
            | 
           28 | 
           // Variables - Settings.
  | 
        
        
            | 
            | 
           29 | 
           $block8introsubtitle = format_text(theme_universe_get_setting('block8introsubtitle'), FORMAT_HTML, array('noclean' => true));
  | 
        
        
            | 
            | 
           30 | 
           $block8introtitle = format_text(theme_universe_get_setting('block8introtitle'), FORMAT_HTML, array('noclean' => true));
  | 
        
        
            | 
            | 
           31 | 
           $block8introcontent = format_text(theme_universe_get_setting('block8introcontent'), FORMAT_HTML, array('noclean' => true));
  | 
        
        
            | 
            | 
           32 | 
           $block8html = format_text(theme_universe_get_setting('block8htmlcontent'), FORMAT_HTML, array('noclean' => true));
  | 
        
        
            | 
            | 
           33 | 
           $block8footer = format_text(theme_universe_get_setting('block8footercontent'), FORMAT_HTML, array('noclean' => true));
  | 
        
        
            | 
            | 
           34 | 
           $block8class = theme_universe_get_setting('block8class');
  | 
        
        
            | 
            | 
           35 | 
              | 
        
        
            | 
            | 
           36 | 
           $block8css = theme_universe_get_setting('block8customcss');
  | 
        
        
            | 
            | 
           37 | 
              | 
        
        
            | 
            | 
           38 | 
           $block8customcss = '';
  | 
        
        
            | 
            | 
           39 | 
           if (!empty($block8css)) {
  | 
        
        
            | 
            | 
           40 | 
               $block8customcss = ' style="' . $block8css . '"';
  | 
        
        
            | 
            | 
           41 | 
           } else {
  | 
        
        
            | 
            | 
           42 | 
               $block8customcss = null;
  | 
        
        
            | 
            | 
           43 | 
           }
  | 
        
        
            | 
            | 
           44 | 
              | 
        
        
            | 
            | 
           45 | 
           // Customm ID for the block.
  | 
        
        
            | 
            | 
           46 | 
           $block8customid = theme_universe_get_setting('block8id');
  | 
        
        
            | 
            | 
           47 | 
           $fpblockid8 = 'block8';
  | 
        
        
            | 
            | 
           48 | 
           if (!empty($block8customid)) {
  | 
        
        
            | 
            | 
           49 | 
               $fpblockid8 = $block8customid;
  | 
        
        
            | 
            | 
           50 | 
           }
  | 
        
        
            | 
            | 
           51 | 
           // End.
  | 
        
        
            | 
            | 
           52 | 
              | 
        
        
            | 
            | 
           53 | 
           echo '<!-- Start Block 8 -->';
  | 
        
        
            | 
            | 
           54 | 
           echo '<div id="' . $fpblockid8 . '" class="wrapper-lg rui-block-margin-top rui-fp-block--8 ' . $block8class . '"' . $block8customcss . '>';
  | 
        
        
            | 
            | 
           55 | 
           if (!empty($block8introtitle) || !empty($block8introcontent)) {
  | 
        
        
            | 
            | 
           56 | 
               echo '<div class="wrapper-sm rui-fp-block-mb">';
  | 
        
        
            | 
            | 
           57 | 
           }
  | 
        
        
            | 
            | 
           58 | 
           if (!empty($block8introsubtitle)) {
  | 
        
        
            | 
            | 
           59 | 
               echo '<h4 class="rui-block-subtitle">' . $block8introsubtitle . '</h4>';
  | 
        
        
            | 
            | 
           60 | 
           }
  | 
        
        
            | 
            | 
           61 | 
           if (!empty($block8introtitle)) {
  | 
        
        
            | 
            | 
           62 | 
               echo '<h3 class="rui-block-title">' . $block8introtitle . '</h3>';
  | 
        
        
            | 
            | 
           63 | 
           }
  | 
        
        
            | 
            | 
           64 | 
           if (!empty($block8introcontent)) {
  | 
        
        
            | 
            | 
           65 | 
               echo '<div class="rui-block-desc">' . $block8introcontent . '</div>';
  | 
        
        
            | 
            | 
           66 | 
           }
  | 
        
        
            | 
            | 
           67 | 
           if (!empty($block8introtitle) || !empty($block8introcontent)) {
  | 
        
        
            | 
            | 
           68 | 
               echo '</div>';
  | 
        
        
            | 
            | 
           69 | 
           }
  | 
        
        
            | 
            | 
           70 | 
           echo $block8html;
  | 
        
        
            | 
            | 
           71 | 
           if (!empty($block8footer)) {
  | 
        
        
            | 
            | 
           72 | 
               echo '<div class="rui-block-footer wrapper-fw">' . $block8footer . '</div>';
  | 
        
        
            | 
            | 
           73 | 
           }
  | 
        
        
            | 
            | 
           74 | 
           echo '</div>';
  | 
        
        
            | 
            | 
           75 | 
           if (theme_universe_get_setting("displayhrblock8") == '1') {
  | 
        
        
            | 
            | 
           76 | 
               echo '<hr class="rui-block-hr" />';
  | 
        
        
            | 
            | 
           77 | 
           }
  | 
        
        
            | 
            | 
           78 | 
           echo '<!-- End Block 8 -->';
  |