Skip to content

Commit 99f379e

Browse files
author
michaelkotlyar
committed
Change error messages
1 parent 1a95fcc commit 99f379e

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

classes/local/store/azure/client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function test_permissions($testdelete) {
241241
// Write could have failed.
242242
if ($errorcode !== 'BlobNotFound') {
243243
$details = $this->get_exception_details($e);
244-
$permissions->messages[get_string('settings:readfailure', 'tool_objectfs') . $details] = 'notifyproblem';
244+
$permissions->messages[get_string('settings:permissionreadfailure', 'tool_objectfs') . $details] = 'notifyproblem';
245245
$permissions->success = false;
246246
}
247247
}

classes/local/store/s3/client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public function test_permissions($testdelete) {
312312
// Write could have failed.
313313
if ($errorcode !== 'NoSuchKey') {
314314
$details = $this->get_exception_details($e);
315-
$permissions->messages[get_string('settings:readfailure', 'tool_objectfs') . $details] = 'notifyproblem';
315+
$permissions->messages[get_string('settings:permissionreadfailure', 'tool_objectfs') . $details] = 'notifyproblem';
316316
$permissions->success = false;
317317
}
318318
}

classes/local/store/swift/client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function test_connection() {
216216
}
217217
} else {
218218
$details = $this->get_exception_details($e);
219-
$connection->messages[get_string('settings:readfailure', 'tool_objectfs') . $details] = 'notifyproblem';
219+
$connection->messages[get_string('settings:connectionreadfailure', 'tool_objectfs') . $details] = 'notifyproblem';
220220
$connection->success = false;
221221
}
222222
}
@@ -243,7 +243,7 @@ public function test_permissions($testdelete) {
243243
$result = $container->getObject('permissions_check_file')->download();
244244
} catch (\OpenStack\Common\Error\BadResponseError $e) {
245245
$details = $this->get_exception_details($e);
246-
$permissions->messages[get_string('settings:readfailure', 'tool_objectfs') . $details] = 'notifyproblem';
246+
$permissions->messages[get_string('settings:permissionreadfailure', 'tool_objectfs') . $details] = 'notifyproblem';
247247
$permissions->success = false;
248248

249249
}

lang/en/tool_objectfs.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@
173173
$string['settings:minimumage_help'] = 'Minimum age that a object must exist on the local filedir before it will be considered for transfer.';
174174
$string['settings:deleteexternal'] = 'Delete external objects';
175175
$string['settings:deleteexternal_help'] = 'Delete external objects when the file is deleted in Moodle. This is not recommended if you intend to share one object store between multiple environments, however this is a requirement for GDPR compliance.
176-
<br/>Delete external file on orphan clean-up - This will delete the external file when the delete orphaned metadata task task runs.
177-
<br/>Delete completely - will tell the external storage to delete the file immediately - (use with caution! - if the same file is being uploaded while being deleted issues could occur.)';
176+
<br/>Delete external file on orphan clean-up - This will delete the external file when the delete orphaned metadata task runs.
177+
<br/>Delete completely - will tell the external storage to delete the file immediately - (use with caution! - if the same file is being uploaded while being deleted, issues could occur.)';
178178
$string['settings:deletelocal'] = 'Delete local objects';
179179
$string['settings:deletelocal_help'] = 'Delete local objects once they are in external object storage after the consistency delay.';
180180
$string['settings:consistencydelay'] = 'Consistency delay';
@@ -249,14 +249,15 @@
249249
$string['presignedurl_testing:checkclientsettings'] = 'Check client settings at ';
250250
$string['presignedurl_testing:checkfssettings'] = 'Check filesystem settings at ';
251251

252-
$string['settings:connectionsuccess'] = 'Could establish connection to the external object storage.';
253-
$string['settings:connectionfailure'] = 'Could not establish connection to the external object storage. {$a}';
254-
$string['settings:writefailure'] = 'Could not write object to the external object storage. ';
255-
$string['settings:readfailure'] = 'Could not read object from the external object storage. ';
256-
$string['settings:deletesuccess'] = 'Could delete object from the external object storage - It is not recommended for the user to have delete permissions. ';
257-
$string['settings:deleteerror'] = 'Could not delete object from the external object storage. ';
252+
$string['settings:connectionsuccess'] = 'Could establish connection to object storage. ';
253+
$string['settings:connectionfailure'] = 'Could not establish connection to object storage. {$a}';
254+
$string['settings:writefailure'] = 'Could not write permissions check file from object storage. ';
255+
$string['settings:connectionreadfailure'] = 'Could not read connection check file from object storage. ';
256+
$string['settings:permissionreadfailure'] = 'Could not read permissions check file from object storage. ';
257+
$string['settings:deletesuccess'] = 'Could delete file from object storage - It is not recommended for the user to have delete permissions. ';
258+
$string['settings:deleteerror'] = 'Could not delete permissions check file from object storage. ';
258259
$string['settings:permissioncheckpassed'] = 'Permissions check passed.';
259-
$string['settings:handlernotset'] = '$CFG->alternative_file_system_class is not set, the file system will not be able to read from the external object storage. Background tasks can still function.';
260+
$string['settings:handlernotset'] = '$CFG->alternative_file_system_class is not set, the file system will not be able to read from object storage. Background tasks can still function.';
260261

261262
$string['settings:testingheader'] = 'Test Settings';
262263
$string['settings:testingdescr'] = 'This setting is mainly for testing purposes and introduces overhead to check the location.';

0 commit comments

Comments
 (0)