Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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
$block18introsubtitle = format_text(theme_universe_get_setting('block18introsubtitle'), FORMAT_HTML, array('noclean' => true));
30
$block18introtitle = format_text(theme_universe_get_setting('block18introtitle'),
31
      FORMAT_HTML,
32
      array('noclean' => true));
33
$block18introcontent = format_text(theme_universe_get_setting('block18introcontent'),
34
      FORMAT_HTML,
35
      array('noclean' => true));
36
$block18html = format_text(theme_universe_get_setting('block18htmlcontent'),
37
      FORMAT_HTML,
38
      array('noclean' => true));
39
$block18footer = format_text(theme_universe_get_setting('block18footercontent'),
40
      FORMAT_HTML,
41
      array('noclean' => true));
42
$block18class = theme_universe_get_setting('block18class');
43
$block18css = theme_universe_get_setting('block18customcss');
44
 
45
$block18customcss = '';
46
if (!empty($block18css)) {
47
      $block18customcss = ' style="' . $block18css . '"';
48
} else {
49
      $block18customcss = null;
50
}
51
 
52
// Customm ID for the block.
53
$block18customid = theme_universe_get_setting('block18id');
54
$fpblockid18 = 'block18';
55
if (!empty($block18customid)) {
56
    $fpblockid18 = $block18customid;
57
}
58
// End.
59
 
60
echo '<!-- Start Block 18-->';
61
echo '<div id="' . $fpblockid19 . '" class="wrapper-lg rui-block-margin-top rui-fp-block--18 ' . $block18class . '"' . $block18customcss . '>';
62
if (!empty($block18introtitle) || !empty($block18introcontent)) {
63
      echo '<div class="wrapper-sm rui-fp-block-mb">';
64
}
65
if (!empty($block18introsubtitle)) {
66
    echo '<h4 class="rui-block-subtitle">' . $block18introsubtitle . '</h4>';
67
}
68
if (!empty($block18introtitle)) {
69
      echo '<h3 class="rui-block-title">' . $block18introtitle . '</h3>';
70
}
71
if (!empty($block18introcontent)) {
72
      echo '<div class="rui-block-desc">' . $block18introcontent . '</div>';
73
}
74
if (!empty($block18introtitle) || !empty($block18introcontent)) {
75
      echo '</div>';
76
}
77
 
78
echo '<div class="wrapper-fw">' . $block18html . '</div>';
79
 
80
$block18count = theme_universe_get_setting('block18count');
81
echo '<div class="wrapper-md mt-6">';
82
echo '<div class="accordion" id="block18Accordion">';
83
for ($i = 1; $i <= $block18count; $i++) {
84
 
85
      $q = format_text(theme_universe_get_setting("block18question" . $i),
86
            FORMAT_HTML, array('noclean' => true));
87
      $a = format_text(theme_universe_get_setting("block18answer" . $i),
88
            FORMAT_HTML, array('noclean' => true));
89
      echo '<div class="accordion-item">';
90
      echo '<h3 class="accordion-header" id="heading' .
91
            $i .
92
            '">';
93
      echo '<button class="accordion-button collapsed"
94
            type="button" data-toggle="collapse"
95
            data-target="#collapse' .
96
            $i .
97
            '" aria-expanded="false" aria-controls="collapse' .
98
            $i .
99
            '">';
100
      echo $q;
101
      echo '</button>';
102
      echo '</h3>';
103
      echo '<div id="collapse' .
104
            $i .
105
            '" class="accordion-collapse collapse" aria-labelledby="heading' .
106
            $i .
107
            '" data-parent="#block18Accordion">';
108
      echo '<div class="accordion-body">';
109
      echo $a;
110
      echo '</div>';
111
      echo '</div>';
112
      echo '</div>';
113
}
114
echo '</div><!-- accortion-->';
115
echo '</div><!-- wrapper-md -->';
116
 
117
if (!empty($block18footer)) {
118
      echo '<div class="rui-block-footer wrapper-md">' . $block18footer . '</div>';
119
}
120
 
121
echo '</div>';
122
if (theme_universe_get_setting("displayhrblock18") == '1') {
123
      echo '<hr class="rui-block-hr" />';
124
}
125
echo '<!-- End Block 18 -->';