Skip to content

Commit 733a327

Browse files
author
Juan Carrera
committed
Initial commit.
0 parents  commit 733a327

File tree

182 files changed

+32773
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+32773
-0
lines changed

LICENSE

+674
Large diffs are not rendered by default.

README.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# eXeLearning SCORM activities for Moodle
2+
3+
Activity-type module to create and edit SCORM packages with eXeLearning (online).
4+
5+
You need the eXeLearning online version installed (ws28 or higher) and access to its configuration files to run
6+
this module.
7+
8+
## Compatibility
9+
10+
This plugin version is tested for:
11+
12+
* Moodle 4.1.3+ (Build: 20230526)
13+
* Moodle 3.11.10+ (Build: 20221007)
14+
* Moodle 3.9.2+ (Build: 20200929)
15+
16+
## Installing via uploaded ZIP file ##
17+
18+
1. Log in to your Moodle site as an admin and go to _Site administration >
19+
Plugins > Install plugins_.
20+
2. Upload the ZIP file with the plugin code. You should only be prompted to add
21+
extra details if your plugin type is not automatically detected.
22+
3. Check the plugin validation report and finish the installation.
23+
24+
## Installing manually ##
25+
26+
The plugin can be also installed by putting the contents of this directory to
27+
28+
{your/moodle/dirroot}/mod/exescorm
29+
30+
Afterwards, log in to your Moodle site as an admin and go to _Site administration >
31+
Notifications_ to complete the installation.
32+
33+
Alternatively, you can run
34+
35+
$ php admin/cli/upgrade.php
36+
37+
to complete the installation from the command line.
38+
39+
## Configuration
40+
41+
Go to the URL:
42+
43+
{your/moodle/dirroot}/admin/settings.php?section=modsettingexescorm
44+
45+
* Remote URI: *exescorm | exeonlinebaseuri*
46+
* eXeLearning (online) base URI
47+
48+
* Signing Key: *exescorm | hmackey1*
49+
* Key used to sign data sent to the eXeLearning server, to check the data origin. Use up to 32 characters.
50+
51+
* Token expiration: *exescorm | tokenexpiration*
52+
* Max time (in seconds) to edit the package in eXeLearning and get back to Moodle.
53+
54+
* New package template: *exescorm | template*
55+
* Package uploaded there will be used as the default package for new activities.
56+
57+
* Send template: *exescorm | sendtemplate*
58+
* Sends uploaded (or default) template to eXeLearning when creating a new activity.
59+
60+
* Mandatory files RE list: *exescorm | mandatoryfileslist*
61+
* A mandatory files list can be configurad here. Enter each mandatory file as a PHP regular expression (RE) a new line.
62+
63+
* Forbidden files RE list: *exescorm | forbiddenfileslist*
64+
65+
* A forbidden files list can be configurad here. Enter each forbidden file as a PHP regular expression (RE) on a new line.
66+
67+
## About
68+
69+
Copyright 2023:
70+
Centro Nacional de Desarrollo Curricular en Sistemas no Propietarios (CeDeC) /
71+
INTEF (Instituto Nacional de Tecnologías Educativas y de Formación del Profesorado)
72+
73+
### License
74+
75+
This program is free software; you can redistribute it and/or modify
76+
it under the terms of the GNU General Public License as published by
77+
the Free Software Foundation; either version 2 of the License, or
78+
(at your option) any later version.
79+
80+
This program is distributed in the hope that it will be useful,
81+
but WITHOUT ANY WARRANTY; without even the implied warranty of
82+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83+
GNU General Public License for more details.
84+
85+
You should receive a copy of the GNU General Public License
86+
along with this program.

aicc.php

+458
Large diffs are not rendered by default.

amd/build/fullscreen.min.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/fullscreen.min.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/fullscreen.js

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// This file is part of Moodle - http://moodle.org/
2+
//
3+
// Moodle is free software: you can redistribute it and/or modify
4+
// it under the terms of the GNU General Public License as published by
5+
// the Free Software Foundation, either version 3 of the License, or
6+
// (at your option) any later version.
7+
//
8+
// Moodle is distributed in the hope that it will be useful,
9+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
// GNU General Public License for more details.
12+
//
13+
// You should have received a copy of the GNU General Public License
14+
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
15+
16+
/**
17+
*
18+
* @author 2021 3iPunt <https://www.tresipunt.com/>
19+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
20+
*/
21+
22+
/* eslint-disable no-unused-vars */
23+
/* eslint-disable no-console */
24+
25+
define([
26+
'jquery',
27+
'core/str',
28+
'core/ajax',
29+
'core/templates'
30+
], function($, Str, Ajax, Templates) {
31+
"use strict";
32+
/**
33+
* @constructor
34+
*/
35+
function Fullscreen() {
36+
$('#toggleFullscreen').on('click', this.toggleFullScreen.bind(this));
37+
document.addEventListener('fullscreenchange', this.changeFullScreen, false);
38+
document.addEventListener('mozfullscreenchange', this.changeFullScreen, false);
39+
document.addEventListener('MSFullscreenChange', this.changeFullScreen, false);
40+
document.addEventListener('webkitfullscreenchange', this.changeFullScreen, false);
41+
}
42+
43+
Fullscreen.prototype.changeFullScreen = function(e) {
44+
let btnToggle = document.getElementById('toggleFullscreen');
45+
let page = document.getElementById('exescormpage');
46+
47+
if (page.classList.contains('fullscreen')) {
48+
btnToggle.classList.remove('actived');
49+
page.classList.remove('fullscreen');
50+
} else {
51+
btnToggle.classList.add('actived');
52+
page.classList.add('fullscreen');
53+
}
54+
};
55+
56+
Fullscreen.prototype.toggleFullScreen = function(e) {
57+
58+
if (document.fullscreenElement ||
59+
document.webkitFullscreenElement ||
60+
document.mozFullScreenElement ||
61+
document.msFullscreenElement) {
62+
if (document.exitFullscreen) {
63+
document.exitFullscreen();
64+
} else if (document.mozCancelFullScreen) {
65+
document.mozCancelFullScreen();
66+
} else if (document.webkitExitFullscreen) {
67+
document.webkitExitFullscreen();
68+
} else if (document.msExitFullscreen) {
69+
document.msExitFullscreen();
70+
}
71+
} else {
72+
var element = $('#exescormpage')[0];
73+
if (element.requestFullscreen) {
74+
element.requestFullscreen();
75+
} else if (element.mozRequestFullScreen) {
76+
element.mozRequestFullScreen();
77+
} else if (element.webkitRequestFullscreen) {
78+
element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
79+
} else if (element.msRequestFullscreen) {
80+
element.msRequestFullscreen();
81+
}
82+
}
83+
84+
};
85+
86+
/** @type {jQuery} The jQuery node for the region. */
87+
Fullscreen.prototype.node = null;
88+
89+
return {
90+
/**
91+
* @return {Fullscreen}
92+
*/
93+
init: function() {
94+
return new Fullscreen();
95+
}
96+
};
97+
}
98+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
* Defines backup_exescorm_activity_task class
19+
*
20+
* @package mod_exescorm
21+
* @category backup
22+
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
23+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24+
*/
25+
26+
defined('MOODLE_INTERNAL') || die();
27+
28+
require_once($CFG->dirroot . '/mod/exescorm/backup/moodle2/backup_exescorm_stepslib.php');
29+
30+
/**
31+
* Provides the steps to perform one complete backup of the EXESCORM instance
32+
*/
33+
class backup_exescorm_activity_task extends backup_activity_task {
34+
35+
/**
36+
* No specific settings for this activity
37+
*/
38+
protected function define_my_settings() {
39+
}
40+
41+
/**
42+
* Defines a backup step to store the instance data in the exescorm.xml file
43+
*/
44+
protected function define_my_steps() {
45+
$this->add_step(new backup_exescorm_activity_structure_step('exescorm_structure', 'exescorm.xml'));
46+
}
47+
48+
/**
49+
* Encodes URLs to the index.php and view.php scripts
50+
*
51+
* @param string $content some HTML text that eventually contains URLs to the activity instance scripts
52+
* @return string the content with the URLs encoded
53+
*/
54+
public static function encode_content_links($content) {
55+
global $CFG;
56+
57+
$base = preg_quote($CFG->wwwroot, "/");
58+
59+
// Link to the list of exescorms.
60+
$search = "/(".$base."\/mod\/exescorm\/index.php\?id\=)([0-9]+)/";
61+
$content = preg_replace($search, '$@EXESCORMINDEX*$2@$', $content);
62+
63+
// Link to exescorm view by moduleid.
64+
$search = "/(".$base."\/mod\/exescorm\/view.php\?id\=)([0-9]+)/";
65+
$content = preg_replace($search, '$@EXESCORMVIEWBYID*$2@$', $content);
66+
67+
return $content;
68+
}
69+
}

0 commit comments

Comments
 (0)