Skip to content

Commit e72d0a9

Browse files
author
Juan Carrera
committed
Change from exescorm to mod_exescorm on get_string component name ocurrences.
1 parent a86d945 commit e72d0a9

35 files changed

+364
-361
lines changed

classes/completion/custom_completion.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ public function get_custom_rule_descriptions(): array {
193193
}
194194

195195
return [
196-
'completionstatusrequired' => get_string("completiondetail:completionstatus{$statusrequired}", 'exescorm'),
197-
'completionscorerequired' => get_string('completiondetail:completionscore', 'exescorm', $scorerequired),
198-
'completionstatusallscos' => get_string('completiondetail:allscos', 'exescorm'),
196+
'completionstatusrequired' => get_string("completiondetail:completionstatus{$statusrequired}", 'mod_exescorm'),
197+
'completionscorerequired' => get_string('completiondetail:completionscore', 'mod_exescorm', $scorerequired),
198+
'completionstatusallscos' => get_string('completiondetail:allscos', 'mod_exescorm'),
199199
];
200200
}
201201

classes/exescorm_package.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function validate_file_list($filelist) {
4646
foreach ($mandatoryfilesrearray as $mfre) {
4747
$found = preg_grep($mfre, $filepaths);
4848
if (empty($found)) {
49-
$errors['packagefile'] = get_string('badexelearningpackage', 'exescorm');
49+
$errors['packagefile'] = get_string('badexelearningpackage', 'mod_exescorm');
5050
return $errors;
5151
}
5252
// We unset mandatory files, so can be an exception for forbidden ones.
@@ -57,7 +57,7 @@ public static function validate_file_list($filelist) {
5757
// Check for forbidden paths. Return as soon as any forbidden RE is found.
5858
foreach ($forbiddenfilesrearray as $ffre) {
5959
if (preg_grep($ffre, $filepaths)) {
60-
$errors['packagefile'] = get_string('badexelearningpackage', 'exescorm');
60+
$errors['packagefile'] = get_string('badexelearningpackage', 'mod_exescorm');
6161
return $errors;
6262
}
6363
}

classes/external.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ public static function get_exescorm_sco_tracks($scoid, $userid, $attempt = 0) {
594594
'item' => 'attempt',
595595
'itemid' => $params['attempt'],
596596
'warningcode' => 'notattempted',
597-
'message' => get_string('notattempted', 'exescorm')
597+
'message' => get_string('notattempted', 'mod_exescorm')
598598
);
599599
}
600600

@@ -697,7 +697,7 @@ public static function get_exescorms_by_courses($courseids = array()) {
697697
'item' => 'exescorm',
698698
'itemid' => $exescorm->id,
699699
'warningcode' => $warningkey,
700-
'message' => get_string($warningkey, 'exescorm', $warningdata)
700+
'message' => get_string($warningkey, 'mod_exescorm', $warningdata)
701701
);
702702
}
703703
} else {

classes/output/userreportsactionbar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function export_for_template(renderer_base $output): array {
8484
$interactions = new moodle_url('/mod/exescorm/report/userreportinteractions.php',
8585
['id' => $this->id, 'user' => $this->userid, 'attempt' => $this->attempt, 'mode' => $this->mode]);
8686

87-
$reportmenu[$learnobjects->out(false)] = get_string('scoes', 'exescorm');
88-
$reportmenu[$interactions->out(false)] = get_string('interactions', 'exescorm');
87+
$reportmenu[$learnobjects->out(false)] = get_string('scoes', 'mod_exescorm');
88+
$reportmenu[$interactions->out(false)] = get_string('interactions', 'mod_exescorm');
8989

9090
if ($this->reporttype === 'learning') {
9191
$userreporturl = $learnobjects->out(false);

classes/privacy/provider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ public static function export_user_data(approved_contextlist $contextlist) {
198198
$context = \context::instance_by_id($contextid);
199199
array_walk($attemptsdata, function($data, $attempt) use ($context) {
200200
$subcontext = [
201-
get_string('myattempts', 'exescorm'),
202-
get_string('attempt', 'exescorm'). " $attempt"
201+
get_string('myattempts', 'mod_exescorm'),
202+
get_string('attempt', 'mod_exescorm'). " $attempt"
203203
];
204204
writer::with_context($context)->export_data(
205205
$subcontext,
@@ -247,7 +247,7 @@ public static function export_user_data(approved_contextlist $contextlist) {
247247
array_walk($alldata, function($data, $contextid) {
248248
$context = \context::instance_by_id($contextid);
249249
$subcontext = [
250-
get_string('myaiccsessions', 'exescorm')
250+
get_string('myaiccsessions', 'mod_exescorm')
251251
];
252252
writer::with_context($context)->export_data(
253253
$subcontext,

classes/report.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ protected function generate_master_checkbox(): string {
6262
global $OUTPUT;
6363

6464
// Build the select/deselect all control.
65-
$selectalltext = get_string('selectall', 'exescorm');
66-
$deselectalltext = get_string('selectnone', 'exescorm');
65+
$selectalltext = get_string('selectall', 'mod_exescorm');
66+
$deselectalltext = get_string('selectnone', 'mod_exescorm');
6767
$mastercheckbox = new \core\output\checkbox_toggleall('exescorm-attempts', true, [
6868
'name' => 'exescorm-selectall-attempts',
6969
'value' => 1,
@@ -99,7 +99,7 @@ protected function generate_row_checkbox(string $name, string $value): string {
9999
protected function generate_delete_selected_button(): string {
100100
$deleteselectedparams = array(
101101
'type' => 'submit',
102-
'value' => get_string('deleteselected', 'exescorm'),
102+
'value' => get_string('deleteselected', 'mod_exescorm'),
103103
'class' => 'btn btn-secondary',
104104
'data-action' => 'toggle',
105105
'data-togglegroup' => 'exescorm-attempts',

datamodels/debug.js.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ function toggleLog () {
7373
if (getLoggingActive() == "A") {
7474
AppendToLog("Moodle Logging Deactivated", 0);
7575
setLoggingActive('N');
76-
logButton.innerHTML = '-><?php echo addslashes_js(get_string('exescormloggingoff', 'exescorm')); ?>';
76+
logButton.innerHTML = '-><?php echo addslashes_js(get_string('exescormloggingoff', 'mod_exescorm')); ?>';
7777
} else {
7878
setLoggingActive('A');
7979
AppendToLog("Moodle Logging Activated", 0);
80-
logButton.innerHTML = '<?php echo addslashes_js(get_string('exescormloggingon', 'exescorm')); ?>';
80+
logButton.innerHTML = '<?php echo addslashes_js(get_string('exescormloggingon', 'mod_exescorm')); ?>';
8181
logPopUpWindow.focus();
8282
}
8383
}
@@ -88,11 +88,11 @@ function toggleLog () {
8888
var logPopUpWindow = "N";
8989
var debugEXESCORMVersion = '<?php echo $exescorm->version; ?>';
9090
<?php
91-
$lmsprefix = (exescorm_version_check($exescorm->version,EXESCORM_SCORM_12) || empty($exescorm->version)) ? 'LMS' : '';
92-
$lmsapi = (exescorm_version_check($exescorm->version,EXESCORM_SCORM_12) || empty($exescorm->version)) ? 'API' : 'API_1484_11';
91+
$lmsprefix = (exescorm_version_check($exescorm->version, EXESCORM_SCORM_12) || empty($exescorm->version)) ? 'LMS' : '';
92+
$lmsapi = (exescorm_version_check($exescorm->version, EXESCORM_SCORM_12) || empty($exescorm->version)) ? 'API' : 'API_1484_11';
9393

9494
$lmselements = array();
95-
if (exescorm_version_check($exescorm->version,EXESCORM_SCORM_12) || empty($exescorm->version)) {
95+
if (exescorm_version_check($exescorm->version, EXESCORM_SCORM_12) || empty($exescorm->version)) {
9696
$lmselements = array( 'cmi.core._children',
9797
'cmi.core.student_id',
9898
'cmi.core.student_name',
@@ -766,9 +766,9 @@ function LogAPICall(func, nam, val, rc) {
766766
logButton.name = 'logToggle';
767767
logButton.href = 'javascript:toggleLog();';
768768
if (getLoggingActive() == "A") {
769-
logButton.innerHTML = '<?php echo addslashes_js(get_string('exescormloggingon', 'exescorm')); ?>';
769+
logButton.innerHTML = '<?php echo addslashes_js(get_string('exescormloggingon', 'mod_exescorm')); ?>';
770770
} else {
771-
logButton.innerHTML = '<?php echo addslashes_js(get_string('exescormloggingoff', 'exescorm')); ?>';
771+
logButton.innerHTML = '<?php echo addslashes_js(get_string('exescormloggingoff', 'mod_exescorm')); ?>';
772772
}
773773
var content = safeGetElement(document, 'exescormpage');
774774
content.insertBefore(logButton, content.firstChild);

datamodels/scormlib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ function exescorm_get_manifest($blocks, $scoes) {
559559
define('DEBUGGING_PRINTED', 1);
560560
}
561561
echo $OUTPUT->notification(
562-
get_string('invalidmanifestresource', 'exescorm') . ' ' . implode(', ', $manifestresourcesnotfound)
562+
get_string('invalidmanifestresource', 'mod_exescorm') . ' ' . implode(', ', $manifestresourcesnotfound)
563563
);
564564
}
565565
return $scoes;

index.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
$event->add_record_snapshot('course', $course);
3838
$event->trigger();
3939

40-
$strexescorm = get_string("modulename", "exescorm");
41-
$strexescorms = get_string("modulenameplural", "exescorm");
40+
$strexescorm = get_string("modulename", "mod_exescorm");
41+
$strexescorms = get_string("modulenameplural", "mod_exescorm");
4242
$strname = get_string("name");
4343
$strsummary = get_string("summary");
44-
$strreport = get_string("report", 'exescorm');
44+
$strreport = get_string("report", 'mod_exescorm');
4545
$strlastmodified = get_string("lastmodified");
4646

4747
$PAGE->set_title($strexescorms);
@@ -89,14 +89,14 @@
8989
$trackedusers = exescorm_get_count_users($exescorm->id, $exescorm->groupingid);
9090
if ($trackedusers > 0) {
9191
$reportshow = html_writer::link('report.php?id='.$exescorm->coursemodule,
92-
get_string('viewallreports', 'exescorm', $trackedusers));
92+
get_string('viewallreports', 'mod_exescorm', $trackedusers));
9393
} else {
94-
$reportshow = get_string('noreports', 'exescorm');
94+
$reportshow = get_string('noreports', 'mod_exescorm');
9595
}
9696
} else if (has_capability('mod/exescorm:viewscores', $context)) {
9797
require_once('locallib.php');
9898
$report = exescorm_grade_user($exescorm, $USER->id);
99-
$reportshow = get_string('score', 'exescorm').": ".$report;
99+
$reportshow = get_string('score', 'mod_exescorm').": ".$report;
100100
}
101101
$options = (object)array('noclean' => true);
102102
if (!$exescorm->visible) {

lang/en/exescorm.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
$string['enter'] = 'Enter';
132132
$string['entercourse'] = 'Enter course';
133133
$string['errorlogs'] = 'Errors log';
134+
$string['erroraccessingreport'] = 'Error accessing report';
134135
$string['eventattemptdeleted'] = 'Attempt deleted';
135136
$string['eventinteractionsviewed'] = 'Interactions viewed';
136137
$string['eventreportviewed'] = 'Report viewed';

0 commit comments

Comments
 (0)