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
defined('MOODLE_INTERNAL') || die();
18
 
19
function xmldb_hvp_install() {
20
 
21
    // Try to install all the default content types.
22
    require_once(__DIR__ . '/../autoloader.php');
23
 
24
    // Fetch info about library updates.
25
    $core = \mod_hvp\framework::instance('core');
26
    $core->fetchLibrariesMetadata();
27
 
28
    // Check that plugin is set up correctly.
29
    $core->checkSetupForRequirements();
30
 
31
    // Print any messages.
32
    echo '<h3>' . get_string('welcomeheader', 'hvp') . '</h3>' .
33
         '<p>' .
34
         get_string('welcomegettingstarted', 'hvp', array(
35
             'moodle_tutorial' => 'href="https://h5p.org/moodle" target="_blank"',
36
             'example_content' => 'href="https://h5p.org/content-types-and-applications" target="_blank"'
37
         )) .
38
         '</p>' .
39
         '<p>' .
40
         get_string('welcomecommunity', 'hvp', array(
41
             'forums' => 'href="https://h5p.org/forum" target="_blank"'
42
         )) .
43
         '</p>' .
44
         '<p>' . get_string('welcomecontactus', 'hvp',
45
            'href="https://h5p.org/contact" target="_blank"') .
46
         '</p>';
47
 
48
    // Notify of communication with H5P Hub.
49
    // @codingStandardsIgnoreLine
50
    echo "<p>H5P fetches content types directly from the H5P Hub. In order to do this the H5P plugin will communicate with the Hub once a day to fetch information about new and updated content types. It will send in anonymous data to the Hub about H5P usage. Read more at <a href=\"https://h5p.org/tracking-the-usage-of-h5p\">the plugin communication page at H5P.org</a>.</p>";
51
 
52
    \mod_hvp\framework::printMessages('info', \mod_hvp\framework::messages('info'));
53
    \mod_hvp\framework::printMessages('error', \mod_hvp\framework::messages('error'));
54
}