Skip to content

Commit 467262f

Browse files
author
Juan Carrera
committed
Make code pass Code checker errors (warning still there).
1 parent e72d0a9 commit 467262f

File tree

13 files changed

+27
-22
lines changed

13 files changed

+27
-22
lines changed

classes/external.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,9 @@ public static function get_exescorms_by_courses_returns() {
768768
[
769769
'packagesize' => new external_value(PARAM_INT, 'EXESCORM zip package size', VALUE_OPTIONAL),
770770
'packageurl' => new external_value(PARAM_URL, 'EXESCORM zip package URL', VALUE_OPTIONAL),
771-
'version' => new external_value(PARAM_NOTAGS, 'EXESCORM version EXESCORM_SCORM_12,EXESCORM_SCORM_13,EXESCORM_SCORM_AICC)',
772-
VALUE_OPTIONAL),
771+
'version' => new external_value(PARAM_NOTAGS,
772+
'EXESCORM version EXESCORM_SCORM_12,EXESCORM_SCORM_13,EXESCORM_SCORM_AICC)',
773+
VALUE_OPTIONAL),
773774
'maxgrade' => new external_value(PARAM_INT, 'Max grade', VALUE_OPTIONAL),
774775
'grademethod' => new external_value(PARAM_INT, 'Grade method', VALUE_OPTIONAL),
775776
'whatgrade' => new external_value(PARAM_INT, 'What grade', VALUE_OPTIONAL),

datamodels/debug.js.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,10 @@ function UpdateLog(s) {
661661
+ ' id="commitButton"'
662662
+ ' name="commitButton">'
663663
+ ' <input type="button"'
664-
+ ' value="<?php echo exescorm_version_check($exescorm->version,EXESCORM_SCORM_12) ?
664+
+ ' value="<?php echo exescorm_version_check($exescorm->version, EXESCORM_SCORM_12) ?
665665
'LMSFinish' : 'Terminate'; ?>() "'
666666
+ ' onclick="try'
667-
+ ' <?php echo exescorm_version_check($exescorm->version,EXESCORM_SCORM_12) ?
667+
+ ' <?php echo exescorm_version_check($exescorm->version, EXESCORM_SCORM_12) ?
668668
'LMSFinish' : 'LMSTerminate'; ?>();"'
669669
+ ' id="finishButton"'
670670
+ ' name="finishButton">'

lang/en/exescorm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
$string['displaysettings'] = 'Display settings';
126126
$string['dnduploadexescorm'] = 'Add an eXescorm SCORM package';
127127
$string['domxml'] = 'DOMXML external library';
128-
$string['editonlinebtnlabel' ] = 'Edit';
129-
$string['editonlinebtnlabel_help' ] = 'Send package to eXescorm for edition.';
128+
$string['editonlinebtnlabel'] = 'Edit';
129+
$string['editonlinebtnlabel_help'] = 'Send package to eXescorm for edition.';
130130
$string['element'] = 'Element';
131131
$string['enter'] = 'Enter';
132132
$string['entercourse'] = 'Enter course';

lang/es/exescorm.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
$string['deleteattemptcheck'] = '¿Está totalmente seguro que quiere eliminar completamente estos intentos?';
111111
$string['deleteallattempts'] = 'Eliminar todos los intentos SCORM';
112112
$string['deleteselected'] = 'Eliminar los intentos seleccionados';
113-
$string['deleteattemptcheck'] = '¿Está totalmente seguro que quiere eliminar completamente estos intentos?';
114113
$string['details'] = 'Detalles del rastreo SCO';
115114
$string['directories'] = 'Mostrar enlaces de directorio';
116115
$string['disabled'] = 'Deshabilitado';

lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ function exescorm_reset_userdata($data) {
876876
exescorm_reset_gradebook($data->courseid);
877877
}
878878

879-
$status[] = array('component' => $componentstr, 'item' => get_string('deleteallattempts', 'mod_exescorm'), 'error' => false);
879+
$status[] = ['component' => $componentstr, 'item' => get_string('deleteallattempts', 'mod_exescorm'), 'error' => false];
880880
}
881881

882882
// Any changes to the list of dates that needs to be rolled should be same during course restore and course reset.

loadSCO.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
if ($sco->exescormtype == 'asset') {
7272
$attempt = exescorm_get_last_attempt($exescorm->id, $USER->id);
73-
$element = (exescorm_version_check($exescorm->version,EXESCORM_SCORM_13)) ? 'cmi.completion_status' : 'cmi.core.lesson_status';
73+
$element = (exescorm_version_check($exescorm->version, EXESCORM_SCORM_13)) ? 'cmi.completion_status' : 'cmi.core.lesson_status';
7474
$value = 'completed';
7575
exescorm_insert_track($USER->id, $exescorm->id, $sco->id, $attempt, $element, $value);
7676
}
@@ -91,7 +91,7 @@
9191
}
9292

9393
// We expect a SCO: select which API are we looking for.
94-
$lmsapi = (exescorm_version_check($exescorm->version,EXESCORM_SCORM_12) || empty($exescorm->version)) ? 'API' : 'API_1484_11';
94+
$lmsapi = (exescorm_version_check($exescorm->version, EXESCORM_SCORM_12) || empty($exescorm->version)) ? 'API' : 'API_1484_11';
9595

9696
echo html_writer::start_tag('html');
9797
echo html_writer::start_tag('head');

locallib.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ function exescorm_get_attempt_status($user, $exescorm, $cm = null) {
13531353
}
13541354
$result .= html_writer::end_tag('p');
13551355
if ($attemptcount >= $exescorm->maxattempt && $exescorm->maxattempt > 0) {
1356-
$result .= html_writer::tag('p', get_string('exceededmaxattempts', 'mod_exescorm'), array('class' => 'exceededmaxattempts'));
1356+
$result .= html_writer::tag('p', get_string('exceededmaxattempts', 'mod_exescorm'), ['class' => 'exceededmaxattempts']);
13571357
}
13581358
if (!empty($cm)) {
13591359
$context = context_module::instance($cm->id);
@@ -1954,8 +1954,7 @@ function exescorm_get_toc($user, $exescorm, $cmid, $toclink=EXESCORM_TOCJSLINK,
19541954
if ($tocheader) {
19551955
$result->toc = html_writer::start_div('yui3-g-r', array('id' => 'exescorm_layout'));
19561956
$result->toc .= html_writer::start_div('yui3-u-1-5 loading', array('id' => 'exescorm_toc'));
1957-
/*$result->toc .= html_writer::div('', '', array('id' => 'exescorm_toc_title'));*/
1958-
$result->toc .= html_writer::start_div('', array('id' => 'exescorm_tree'));
1957+
$result->toc .= html_writer::start_div('', ['id' => 'exescorm_tree']);
19591958
}
19601959

19611960
if (!empty($currentorg)) {

prereqs.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
$result = true;
7373
$request = null;
7474
if (has_capability('mod/exescorm:savetrack', context_module::instance($cm->id))) {
75-
$result = exescorm_get_toc($USER, $exescorm, $cm->id, EXESCORM_TOCJSLINK, $currentorg, $scoid, $mode, $attempt, true, false);
75+
$result = exescorm_get_toc($USER, $exescorm, $cm->id, EXESCORM_TOCJSLINK, $currentorg,
76+
$scoid, $mode, $attempt, true, false);
7677
echo $result->toc;
7778
}
7879
}

report/basic/classes/report.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ public function display($exescorm, $cm, $course, $download) {
460460
]
461461
);
462462
$row[] = $OUTPUT->pix_icon($trackdata->status, $strstatus, 'exescorm') . '<br>' .
463-
\html_writer::link($url, $score, array('title' => get_string('details', 'mod_exescorm')));
463+
\html_writer::link($url, $score, ['title' => get_string('details', 'mod_exescorm')]);
464464
} else {
465465
$row[] = $score;
466466
}

settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
$settings->add(new admin_setting_configcheckbox('exescorm/sendtemplate',
5555
get_string('exescorm:sendtemplate', 'mod_exescorm'), get_string('exescorm:sendtemplate_desc', 'mod_exescorm'), 0));
5656

57-
// eXescorm package validation rules.
57+
// The eXescorm package validation rules.
5858
$mandatoryfilesre = implode("\n", [
5959
'/^contentv[\d+]\.xml$/',
6060
'/^content\.xsd$/',

0 commit comments

Comments
 (0)