Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/analyze
In directory sc8-pr-cvs1:/tmp/cvs-serv4930/analyze
Modified Files:
Tag: develop_2_1
Quiz.mpl
Log Message:
This fixes the bug that caused the `Results' link in admin to run into
error. - GG
Index: Quiz.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/analyze/Quiz.mpl,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** Quiz.mpl 10 Jul 2003 20:10:04 -0000 1.2.2.1
--- Quiz.mpl 27 Jul 2003 20:19:55 -0000 1.2.2.2
***************
*** 124,130 ****
local subject,register,ids,action,quizname,quiz,
! qnames,i,istring,qname,question,analysis,entry,
resultstable,questiontable,timedatestring,f,g,
! qlist,nllist;
action := p["Action"];
--- 124,130 ----
local subject,register,ids,action,quizname,quiz,
! qn,qnos,i,qname,question,analysis,entry,
resultstable,questiontable,timedatestring,f,g,
! nl,qlist,nllist;
action := p["Action"];
***************
*** 145,149 ****
analysis := traperror(eval(quiz['GetAnalysis']));
fi;
!
if analysis = NULL then
register := eval(subject['GetRegister']);
--- 145,149 ----
analysis := traperror(eval(quiz['GetAnalysis']));
fi;
!
if analysis = NULL then
register := eval(subject['GetRegister']);
***************
*** 161,164 ****
--- 161,174 ----
nllist := map(q -> [q['Name'],q['PartLabel']],qlist);
+ qn := 0;
+ qnos := NULL;
+ for nl in nllist do
+ if member(nl[2], {"", ".1"}) then
+ qn := qn + 1;
+ fi;
+ qnos := qnos, cat("", qn, nl[2]);
+ od;
+ qnos := [qnos];
+
if analysis['AnalysisTime'] = NULL then
timedatestring := "";
***************
*** 197,200 ****
--- 207,211 ----
f := (n,x) -> cat("<td>",x['MarkString',op(n)],"</td>\n");
+ #f := (n,x) -> cat("<td>",convert(eval(x['MarkCodeTable][op(1,n)])),"</td>\n");
g := proc(entry,nllist)
***************
*** 224,229 ****
"<th>",__("ID"),"</th>\n",
"<th>",__("Name"),"</th>\n",
! seq(sprintf("<th><a href='#Q%d'>%d</a></th>\n",i,i),
! i=1..nops(nllist)),
"<th>",__("Total"),"</th>\n",
"</tr>",
--- 235,239 ----
"<th>",__("ID"),"</th>\n",
"<th>",__("Name"),"</th>\n",
! seq(sprintf("<th><a href='#Q%s'>%s</a></th>\n",qn,qn),qn=qnos),
"<th>",__("Total"),"</th>\n",
"</tr>",
***************
*** 246,250 ****
for i to nops(nllist) do
- istring := sprintf("%d",i);
question := qlist[i];
if type(question,`aim/Question`) then
--- 256,259 ----
***************
*** 252,256 ****
questiontable['AddContents',
["tr",
! ["td",[["a", "name" = cat("Q",istring)],istring]],
["td",qname],
["td",question['PartLabel']],
--- 261,265 ----
questiontable['AddContents',
["tr",
! ["td",[["a", "name" = cat("Q",qnos[i])],qnos[i]]],
["td",qname],
["td",question['PartLabel']],
|