Whispeak: Show invalid assert messages in request - refs BT#18476

pull/3814/head
Angel Fernando Quiroz Campos 5 years ago
parent 6ec0b00b22
commit 3d4bafbb79
  1. 6
      plugin/whispeakauth/Request/ApiRequest.php

@ -178,11 +178,9 @@ class ApiRequest
if (isset($json['asserts'])) {
foreach ($json['asserts'] as $assert) {
// Removed message filter because Whispeak indicates that all message should be presented to student.
// Leaving the code and only commenting because if it's not modified on their side it should come back
// if (in_array($assert['value'], ['valid_audio', 'invalid_audio'])) {
if ('invalid_' === substr($assert['value'], 0, 8)) {
$message .= $assert['message'].PHP_EOL;
// }
}
}
} elseif (empty($json['message'])) {
$message = $requestException->getMessage();

Loading…
Cancel
Save