--- loncom/homework/grades.pm 2003/04/04 23:35:17 1.83 +++ loncom/homework/grades.pm 2003/04/11 17:57:37 1.84 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.83 2003/04/04 23:35:17 albertel Exp $ +# $Id: grades.pm,v 1.84 2003/04/11 17:57:37 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -717,7 +717,7 @@ sub sub_page_kw_js { height = 600; scrollbar = "yes"; } -// if (window.pWin) window.pWin.close(); +// if (window.pWin) {window.pWin.close(); window.pWin=null} pWin = window.open('', 'MessageCenter', 'toolbar=no,location=no,scrollbars='+scrollbar+',screenx=70,screeny=75,width=600,height='+height); pWin.focus(); pDoc = pWin.document; @@ -752,11 +752,7 @@ sub sub_page_kw_js { pDoc.write(" includemsg = 1;"); pDoc.write(" }"); pDoc.write(" imgformname = eval(\\"opener.document.SCORE.mailicon\\"+usrctr);"); - pDoc.write(" if (includemsg) {"); - pDoc.write(" imgformname.src = \\"$iconpath/mailto.gif\\";"); - pDoc.write(" } else {"); - pDoc.write(" imgformname.src = \\"$iconpath/mailbkgrd.gif\\";"); - pDoc.write(" }"); + pDoc.write(" imgformname.src = \\"$iconpath/\\"+((includemsg) ? \\"mailto.gif\\" : \\"mailbkgrd.gif\\");"); pDoc.write(" var includemsg = eval(\\"opener.document.SCORE.includemsg\\"+usrctr);"); pDoc.write(" includemsg.value = msgchk;"); @@ -1250,6 +1246,7 @@ KEYWORDS my $lastone = pop @col_fullnames; $msgfor .= ', '.(join ', ',@col_fullnames).' and '.$lastone.'.'; } + $msgfor =~ s/\'/\\'/g; $result.=''."\n". ' '.