Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1082/WEB-INF/maple/aim
Modified Files:
MultiQuestion.mpl Question.mpl Quiz.mpl
Log Message:
Fixed bugs related to image lists, and made changes to display the value of questions to students.
Index: MultiQuestion.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/MultiQuestion.mpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MultiQuestion.mpl 10 Mar 2004 02:04:44 -0000 1.6
--- MultiQuestion.mpl 17 Sep 2004 14:02:05 -0000 1.7
***************
*** 222,226 ****
],
! ['Field','TopImages'::list(integer),
"The list of numbers of images associated with this question version,
and not associated with any subquestion. The numbers are assigned by
--- 222,226 ----
],
! ['Field','TopImages'::list(integer) = [],
"The list of numbers of images associated with this question version,
and not associated with any subquestion. The numbers are assigned by
***************
*** 236,242 ****
",
proc(this)
! local q;
[op(this['TopImages']),
! op(map(q -> q['Images'], this['TopSubQuestions']))]
end
],
--- 236,244 ----
",
proc(this)
! local t,q;
! t := this['TopImages'];
! if t = NULL then t := []; fi;
[op(this['TopImages']),
! op(map(q -> op(q['Images']), this['TopSubQuestions']))]
end
],
Index: Question.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Question.mpl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Question.mpl 11 Mar 2004 13:39:42 -0000 1.12
--- Question.mpl 17 Sep 2004 14:02:05 -0000 1.13
***************
*** 1546,1554 ****
"Return a copy of this history, modified so that it contains
only the first @attemptnum@ attempts.
- <br><br>
- <font color='red'>
- There are problems with the question review page, which may
- be due to bugs in this method.
- </font>
",
proc(this,attemptnum::integer)
--- 1546,1549 ----
***************
*** 1568,1586 ****
allattempts := this['Attempts'];
attempts := [];
! i := 1;
n := 0;
! while (i <= nops(allattempts)) and
(n + allattempts[i]['Count'] < attemptnum) do
! attempts := [op(attempts),allattempts[i]];
n := n + allattempts[i]['Count'];
! i := i + 1;
od;
! if (i <= nops(allattempts)) and
(n < attemptnum - 1) then
a := eval(allattempts[i]['ShortAttempt']);
m := `new/aim/Question/MultipleAttempt`(a);
m['Count'] := attemptnum - 1 - n;
! attempts := [op(attempts),m];
fi;
h['Attempts'] := attempts;
--- 1563,1581 ----
allattempts := this['Attempts'];
attempts := [];
! i := nops(allattempts);
n := 0;
! while (i > 0) and
(n + allattempts[i]['Count'] < attemptnum) do
! attempts := [allattempts[i],op(attempts)];
n := n + allattempts[i]['Count'];
! i := i - 1;
od;
! if (i > 0) and
(n < attemptnum - 1) then
a := eval(allattempts[i]['ShortAttempt']);
m := `new/aim/Question/MultipleAttempt`(a);
m['Count'] := attemptnum - 1 - n;
! attempts := [m,op(attempts)];
fi;
h['Attempts'] := attempts;
***************
*** 1980,1983 ****
--- 1975,1981 ----
rawans := "";
fi;
+ elif quizcontext['QuizReviewMode'] or
+ quizcontext['QuestionReviewMode'] then
+ rawans := history['LastRawAnswer'];
fi;
***************
*** 2045,2051 ****
fi;
! history['AddAttempt',eval(attempt),quizcontext['MarkRequested']];
!
! vrsion['AdjustMark',eval(history)];
this['Version'] := eval(vrsion);
--- 2043,2051 ----
fi;
! if not(quizcontext['QuizReviewMode'] or
! quizcontext['QuestionReviewMode']) then
! history['AddAttempt',eval(attempt),quizcontext['MarkRequested']];
! vrsion['AdjustMark',eval(history)];
! fi;
this['Version'] := eval(vrsion);
***************
*** 2290,2294 ****
if not(trymode or reviewmode) then
href := sprintf("javascript:Focus('%s');",
! this['Label']);
nav['AddContents',
["td",
--- 2290,2294 ----
if not(trymode or reviewmode) then
href := sprintf("javascript:Focus('%s');",
! this['Label']);
nav['AddContents',
["td",
***************
*** 2307,2311 ****
[["td", "align" = "left"],
[["a", "name" = this['Label']],
! ["b",__("Question")," ",this['Label']]]],
[["td", "align" = "right"],
["table",
--- 2307,2314 ----
[["td", "align" = "left"],
[["a", "name" = this['Label']],
! ["b",__("Question")," ",this['Label']]]," ",
! `if`(this['Value'] = 1,
! __("(1 mark)"),
! sprintf(__("(%A marks)"),this['Value']))],
[["td", "align" = "right"],
["table",
***************
*** 2387,2392 ****
else # level > 0
header :=
! cat("<div class='questionheader'><a name='",
! this['Label'],"'><b>",this['Label'],"</b></a></div>\n");
fi;
RETURN(header);
--- 2390,2399 ----
else # level > 0
header :=
! sprintf(
! "<div class='questionheader'><a name='%s'><b>%s</b></a> %s</div>\n",
! this['Label'],this['Label'],
! `if`(this['Value'] = 1,
! __("(1 mark)"),
! sprintf(__("(%A marks)"),this['Value'])));
fi;
RETURN(header);
Index: Quiz.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Quiz.mpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Quiz.mpl 11 Mar 2004 13:39:42 -0000 1.7
--- Quiz.mpl 17 Sep 2004 14:02:05 -0000 1.8
***************
*** 2134,2140 ****
"",
proc(this)
! cat(this['StudentSurname']," ",
! this['StudentFirstName']," ",
! this['StudentID']);
end
]
--- 2134,2141 ----
"",
proc(this)
! `Util/ToLowerCase`(
! cat(this['StudentSurname']," ",
! this['StudentFirstName']," ",
! this['StudentID']));
end
]
|