Skip to content

Commit

Permalink
Merge pull request #340 from oat-sa/fix/LSI-5044/runtime-error-in-dia…
Browse files Browse the repository at this point in the history
…gnostic

Fix/LSI-5044/Runtime-error-in-diagnostic
  • Loading branch information
jsconan authored Nov 8, 2024
2 parents 7860034 + 0f919c8 commit b47cbef
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions views/js/tools/diagnostic/diagnostic.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2016-2021 (original work) Open Assessment Technologies SA ;
* Copyright (c) 2016-2024 (original work) Open Assessment Technologies SA ;
*/
define([
'jquery',
Expand All @@ -40,7 +40,7 @@ define([
'tpl!taoClientDiagnostic/tools/diagnostic/tpl/feedback',
'tpl!taoClientDiagnostic/tools/diagnostic/tpl/quality-bar',
'css!taoClientDiagnosticCss/diagnostics'
], function(
], function (
$,
_,
__,
Expand Down Expand Up @@ -418,7 +418,7 @@ define([
// launch each testers in series, then display the results
async.series(testers, () => {
// pick the lowest percentage as the main score
const total = _.minBy(scores, 'globalPercentage');
const total = _.minBy(Object.values(scores), 'globalPercentage');

// get a status according to the main score
const status = getStatus(total.globalPercentage, _thresholds);
Expand Down Expand Up @@ -631,7 +631,7 @@ define([
* @private
*/
function toggleFields(state) {
_.forEach(fields, function(fieldName) {
_.forEach(fields, function (fieldName) {
toggleControl(fieldName, state);
});
}
Expand Down Expand Up @@ -696,9 +696,7 @@ define([
{}
);

this.changeStatus(__('Getting school name...'))
.cleanUp()
.disable();
this.changeStatus(__('Getting school name...')).cleanUp().disable();

if (_.isFunction(validate)) {
validate(values)
Expand Down

0 comments on commit b47cbef

Please sign in to comment.