From ab9887973c733fbc432c6712a4b9c755f1e3861a Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 7 Dec 2020 12:58:10 +0900
Subject: acrotex 2020-03-14

---
 texmf-dist/tex/latex/acrotex/aebjs.def | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'texmf-dist/tex/latex/acrotex/aebjs.def')

diff --git a/texmf-dist/tex/latex/acrotex/aebjs.def b/texmf-dist/tex/latex/acrotex/aebjs.def
index 0c57f67b..2d01029f 100644
--- a/texmf-dist/tex/latex/acrotex/aebjs.def
+++ b/texmf-dist/tex/latex/acrotex/aebjs.def
@@ -18,7 +18,7 @@
 %% License, or (at your option) any later version.      %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \ProvidesFile{aebjs.def}
- [2020/01/01 v8.5.8 %
+ [2020/03/14 v8.5.10 %
  Exerquiz document level JavaScript (dps)]
 \def\aeb@array{new Array}
 \def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]}
@@ -977,7 +977,7 @@ function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
     for (var i=1; i < RightWrong.length; i++)
     {
         if ( (typeof RightWrong[i] == "object" ) %
-            && ( RightWrong[i][0] == "grp" ) ) {
+&& ( RightWrong[i][0] == "grp" ) ) {
             // grouped question
                 Score += GrpRight(RightWrong[i], i, qtfield);
                 var aWeights = ProbValue[i].slice(2);
@@ -997,9 +997,11 @@ function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
                     if (RightWrong[i][1] == 1)
                         ProbDist[i]=(typeof ProbValue[i]=="object") ?
                             1*ProbValue[i][1] : 1*ProbValue[i];
-                    else
+                    else {
                         ProbDist[i]=(typeof ProbValue[i] == "object") ?
                             1*ProbValue[i][1] : 0;
+                        if (!negPointsAllowed && !negPointsMarkupAllowed) if (ProbDist[i]<0) ProbDist[i]=0
+                    }
                     ptScore += (1*ProbDist[i]);
                 }
             } else {
-- 
cgit v1.2.3

