--- loncom/homework/grades.pm 2004/09/24 21:09:33 1.214 +++ loncom/homework/grades.pm 2004/10/07 22:12:47 1.220 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.214 2004/09/24 21:09:33 albertel Exp $ +# $Id: grades.pm,v 1.220 2004/10/07 22:12:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,16 +25,6 @@ # # http://www.lon-capa.org/ # -# 2/9,2/13 Guy Albertelli -# 6/8 Gerd Kortemeyer -# 7/26 H.K. Ng -# 8/20 Gerd Kortemeyer -# Year 2002 -# June-August H.K. Ng -# Year 2003 -# February, March H.K. Ng -# July, H. K. Ng -# package Apache::grades; use strict; @@ -1001,6 +991,7 @@ sub sub_page_kw_js { my $request = shift; my $iconpath = $request->dir_config('lonIconsURL'); &commonJSfunctions($request); + my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); $request->print(<<SUBJAVASCRIPT); <script type="text/javascript" language="javascript"> @@ -1113,7 +1104,7 @@ sub sub_page_kw_js { pWin = window.open('', 'MessageCenter', 'resizable=yes,toolbar=no,location=no,scrollbars='+scrollbar+',screenx='+xpos+',screeny='+ypos+',width=600,height='+height); pWin.focus(); pDoc = pWin.document; - pDoc.open('text/html','replace'); + pDoc.$docopen; pDoc.write("<html><head>"); pDoc.write("<title>Message Central</title>"); @@ -1244,7 +1235,7 @@ sub sub_page_kw_js { hwdWin = window.open('', 'KeywordHighlightCentral', 'resizeable=yes,toolbar=no,location=no,scrollbars=no,width=400,height=300,screenx='+xpos+',screeny='+ypos); hwdWin.focus(); var hDoc = hwdWin.document; - hDoc.open('text/html','replace'); + hDoc.$docopen; hDoc.write("<html><head>"); hDoc.write("<title>Highlight Central</title>"); @@ -3079,8 +3070,6 @@ sub getSymbMap { $minder++; } } - - $navmap->untieHashes(); return \@titles,\%symbx; } @@ -3213,8 +3202,6 @@ sub displayPage { $curRes = $iterator->next(); } - $navmap->untieHashes(); - $studentTable.='</td></tr></table></td></tr></table>'."\n". '<input type="button" value="Save" '. 'onClick="javascript:checkSubmitPage(this.form,'.$question.');" TARGET=_self />'. @@ -3410,8 +3397,6 @@ sub updateGradeByPage { $curRes = $iterator->next(); } - $navmap->untieHashes(); - $studentTable.='</td></tr></table></td></tr></table>'; $studentTable.=&show_grading_menu_form($ENV{'form.symb'},$ENV{'form.url'}); my $grademsg=($changeflag == 0 ? 'No score was changed or updated.' : @@ -3855,7 +3840,8 @@ sub scantron_find_student { sub scantron_filter { my ($curres)=@_; - if (ref($curres) && $curres->is_problem() && !$curres->randomout) { + # randomout is dysfunctional at best for this purpose + if (ref($curres) && $curres->is_problem()) { #&& !$curres->randomout) { return 1; } return 0; @@ -4007,7 +3993,7 @@ sub scantron_form_start { <input type="hidden" name="selectpage" value="$ENV{'form.selectpage'}" /> <input type="hidden" name="scantron_format" value="$ENV{'form.scantron_format'}" /> <input type="hidden" name="scantron_selectfile" value="$ENV{'form.scantron_selectfile'}" /> - <input type="hidden" name="scantron_maxbubble" value="$max_bubble'" /> + <input type="hidden" name="scantron_maxbubble" value="$max_bubble" /> <input type="hidden" name="scantron_CODElist" value="$ENV{'form.scantron_CODElist'}" /> <input type="hidden" name="scantron_CODEunique" value="$ENV{'form.scantron_CODEunique'}" /> <input type="hidden" name="scantron_options_redo" value="$ENV{'form.scantron_options_redo'}" /> @@ -4660,7 +4646,6 @@ SCANTRONFORM # my $lasttime = &Time::HiRes::time()-$start; # $r->print("<p>took $lasttime</p>"); - $navmap->untieHashes(); $r->print("</form>"); $r->print(&show_grading_menu_form($symb,$url)); return '';