Skip to content

Commit 8cb0a77

Browse files
committed
Fixing lots of warnings and code style errors detected by Moodle's bot.
1 parent eb32072 commit 8cb0a77

12 files changed

+340
-261
lines changed

Diff for: amd/src/buttons_states.js

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
// This file is part of the Moodle module "EJSApp"
1+
// This file is part of the Moodle block "EJSApp File Browser"
22
//
3-
// EJSApp is free software: you can redistribute it and/or modify
3+
// EJSApp File Browser is free software: you can redistribute it and/or modify
44
// it under the terms of the GNU General Public License as published by
5-
// the Free Software Foundation, either moodle_version 3 of the License, or
6-
// (at your option) any later moodle_version.
5+
// the Free Software Foundation, either version 3 of the License, or
6+
// (at your option) any later version.
77
//
8-
// EJSApp is distributed in the hope that it will be useful,
8+
// EJSApp File Browser is distributed in the hope that it will be useful,
99
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1010
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1111
// GNU General Public License for more details.
1212
//
13-
// The GNU General Public License is available on <http://www.gnu.org/licenses/>
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/>.
1415
//
15-
// EJSApp has been developed by:
16-
// - Luis de la Torre: [email protected]
17-
// - Ruben Heradio: [email protected]
16+
// EJSApp File Browser has been developed by:
17+
// - Luis de la Torre: [email protected]
18+
// - Ruben Heradio: [email protected]
1819
//
19-
// at the Computer Science and Automatic Control, Spanish Open University
20-
// (UNED), Madrid, Spain
20+
// at the Computer Science and Automatic Control, Spanish Open University
21+
// (UNED), Madrid, Spain.
2122

2223
/**
2324
* Actions associated to the buttons "Show" and "Hide" of the block.
2425
*
25-
* @package block
26-
* @subpackage ejsapp_file_browser
26+
* @package block_ejsapp_file_browser
2727
* @copyright 2016 Luis de la Torre and Ruben Heradio
2828
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2929
*/
3030

3131
define(['jquery'], function($) {
3232
var t = {
33-
init : function(reproducing) {
34-
$("#hide_blockly").click(function(){
33+
init: function(reproducing) {
34+
$("#hide_blockly").click(function() {
3535
$("#blocklyControl").hide();
3636
});
3737

38-
$("#show_blockly").click(function(){
38+
$("#show_blockly").click(function() {
3939
$("#blocklyControl").show();
4040
});
4141

42-
$("#hide_interaction").click(function(){
42+
$("#hide_interaction").click(function() {
4343
$("#captureInteraction").hide();
4444
});
4545

46-
$("#show_interaction").click(function(){
46+
$("#show_interaction").click(function() {
4747
$("#captureInteraction").show();
4848
});
4949

@@ -56,28 +56,28 @@ define(['jquery'], function($) {
5656
$("#playCaptureBut").prop('disabled', true);
5757
}
5858

59-
$("#startCaptureBut").click(function(){
59+
$("#startCaptureBut").click(function() {
6060
$("#startCaptureBut").prop('disabled', true);
6161
$("#stopCaptureBut").prop('disabled', false);
6262
$("#resetCaptureBut").prop('disabled', false);
6363
$("#playCaptureBut").prop('disabled', true);
6464
$("#stepCaptureBut").prop('disabled', true);
6565
});
6666

67-
$("#stopCaptureBut").click(function(){
67+
$("#stopCaptureBut").click(function() {
6868
$("#startCaptureBut").prop('disabled', false);
6969
$("#stopCaptureBut").prop('disabled', true);
7070
$("#resetCaptureBut").prop('disabled', false);
7171
});
7272

73-
$("#resetCaptureBut").click(function(){
73+
$("#resetCaptureBut").click(function() {
7474
$("#startCaptureBut").prop('disabled', false);
7575
$("#stopCaptureBut").prop('disabled', true);
7676
$("#resetCaptureBut").prop('disabled', true);
7777
$("#playCaptureBut").prop('disabled', false);
7878
});
7979

80-
$("#playCaptureBut").click(function(){
80+
$("#playCaptureBut").click(function() {
8181
$("#startCaptureBut").prop('disabled', true);
8282
$("#stopCaptureBut").prop('disabled', true);
8383
$("#resetCaptureBut").prop('disabled', false);

Diff for: block_ejsapp_file_browser.php

+129-78
Large diffs are not rendered by default.

Diff for: db/access.php

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
<?php
2-
// This file is part of Moodle - http://moodle.org/
2+
// This file is part of the Moodle block "EJSApp File Browser"
33
//
4-
// Moodle is free software: you can redistribute it and/or modify
4+
// EJSApp File Browser is free software: you can redistribute it and/or modify
55
// it under the terms of the GNU General Public License as published by
66
// the Free Software Foundation, either version 3 of the License, or
77
// (at your option) any later version.
88
//
9-
// Moodle is distributed in the hope that it will be useful,
9+
// EJSApp File Browser is distributed in the hope that it will be useful,
1010
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212
// GNU General Public License for more details.
1313
//
1414
// You should have received a copy of the GNU General Public License
15-
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
15+
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16+
//
17+
// EJSApp File Browser has been developed by:
18+
// - Luis de la Torre: [email protected]
19+
// - Ruben Heradio: [email protected]
20+
//
21+
// at the Computer Science and Automatic Control, Spanish Open University
22+
// (UNED), Madrid, Spain.
1623

1724
/**
1825
* Private files block caps.
1926
*
20-
* @package block
21-
* @subpackage ejsapp_file_browser
27+
* @package block_ejsapp_file_browser
2228
* @copyright 2012 Luis de la Torre and Ruben Heradio
2329
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2430
*/

Diff for: edit.php

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
// This file is part of the Moodle block "EJSApp File Browser"
43
//
54
// EJSApp File Browser is free software: you can redistribute it and/or modify
@@ -12,25 +11,24 @@
1211
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1312
// GNU General Public License for more details.
1413
//
15-
// The GNU General Public License is available on <http://www.gnu.org/licenses/>
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/>.
1616
//
1717
// EJSApp File Browser has been developed by:
18-
// - Luis de la Torre: [email protected]
19-
// - Ruben Heradio: [email protected]
18+
// - Luis de la Torre: [email protected]
19+
// - Ruben Heradio: [email protected]
2020
//
21-
// at the Computer Science and Automatic Control, Spanish Open University
22-
// (UNED), Madrid, Spain
23-
21+
// at the Computer Science and Automatic Control, Spanish Open University
22+
// (UNED), Madrid, Spain.
2423

2524
/**
2625
* Manage files in folder in private area
27-
*
28-
* @package block
29-
* @subpackage ejsapp_file_browser
26+
*
27+
* @package block_ejsapp_file_browser
3028
* @copyright 2012 Luis de la Torre and Ruben Heradio
3129
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3230
*/
3331

3432
require('../../config.php');
35-
33+
require_login(0, false);
3634
redirect(new moodle_url('/user/files.php'));

Diff for: lang/en/block_ejsapp_file_browser.php

+11-12
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,24 @@
1111
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212
// GNU General Public License for more details.
1313
//
14-
// The GNU General Public License is available on <http://www.gnu.org/licenses/>
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/>.
1516
//
1617
// EJSApp File Browser has been developed by:
17-
// - Luis de la Torre: [email protected]
18-
// - Ruben Heradio: [email protected]
18+
// - Luis de la Torre: [email protected]
19+
// - Ruben Heradio: [email protected]
1920
//
20-
// at the Computer Science and Automatic Control, Spanish Open University
21-
// (UNED), Madrid, Spain
22-
21+
// at the Computer Science and Automatic Control, Spanish Open University
22+
// (UNED), Madrid, Spain.
2323

2424
/**
2525
* English labels for the ejsapp_file_browser block
26-
*
27-
* @package block
28-
* @subpackage ejsapp_file_browser
26+
*
27+
* @package block_ejsapp_file_browser
2928
* @copyright 2012 Luis de la Torre and Ruben Heradio
3029
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3130
*/
32-
31+
3332
$string['title_of_the_block'] = 'EJSApp File Browser';
3433
$string['managemyfiles'] = 'Manage my files';
3534
$string['pluginname'] = 'EJSApp "private files" browser';
@@ -51,11 +50,11 @@
5150
$string['play_capture'] = 'Load';
5251
$string['change_speed'] = 'Velocity:';
5352

54-
// settings.php:
53+
// Strings in settings.php.
5554
$string['auto_refresh_header_config'] = 'Configure the block\'s auto-refresh property';
5655
$string['auto_refresh'] = 'Auto-refresh frequency';
5756
$string['auto_refresh_description'] = 'Time in miliseconds. Write "0" to disable auto-refresh.';
5857

59-
//Capabilities
58+
// Strings for capabilities.
6059
$string['ejsapp_file_browser:addinstance'] = 'Add a new private files block for EJSApp';
6160
$string['ejsapp_file_browser:myaddinstance'] = 'Add a new private files block for EJSApp to My home';

Diff for: lang/es/block_ejsapp_file_browser.php

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
// This file is part of the Moodle block "EJSApp File Browser"
43
//
54
// EJSApp File Browser is free software: you can redistribute it and/or modify
@@ -12,21 +11,20 @@
1211
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1312
// GNU General Public License for more details.
1413
//
15-
// The GNU General Public License is available on <http://www.gnu.org/licenses/>
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/>.
1616
//
1717
// EJSApp File Browser has been developed by:
18-
// - Luis de la Torre: [email protected]
19-
// - Ruben Heradio: [email protected]
18+
// - Luis de la Torre: [email protected]
19+
// - Ruben Heradio: [email protected]
2020
//
21-
// at the Computer Science and Automatic Control, Spanish Open University
22-
// (UNED), Madrid, Spain
23-
21+
// at the Computer Science and Automatic Control, Spanish Open University
22+
// (UNED), Madrid, Spain.
2423

2524
/**
2625
* Spanish labels for the ejsapp_file_browser block
27-
*
28-
* @package block
29-
* @subpackage ejsapp_file_browser
26+
*
27+
* @package block_ejsapp_file_browser
3028
* @copyright 2012 Luis de la Torre and Ruben Heradio
3129
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3230
*/
@@ -52,11 +50,11 @@
5250
$string['play_capture'] = 'Cargar';
5351
$string['change_speed'] = 'Velocidad:';
5452

55-
// settings.php:
53+
// Strings in settings.php.
5654
$string['auto_refresh_header_config'] = 'Configurar la propiedad de auto-refresco del bloque';
5755
$string['auto_refresh'] = 'Frecuencia de auto-refresco';
5856
$string['auto_refresh_description'] = 'Tiempo en milisegundos. Escriba "0" para deshabilitar el auto-refresco.';
5957

60-
//Capabilities
58+
// Strings for capabilities.
6159
$string['ejsapp_file_browser:addinstance'] = 'Añadir un nuevo bloque de ficheros privados para EJSApp';
6260
$string['ejsapp_file_browser:myaddinstance'] = 'Añadir un nuevo bloque de ficheros privados para EJSApp al &Aacute;rea personal';

0 commit comments

Comments
 (0)