Diff for /loncom/homework/grades.pm between versions 1.59 and 1.66.2.1

version 1.59, 2002/11/22 18:55:18 version 1.66.2.1, 2003/03/17 19:12:56
Line 672  sub sub_page_js { Line 672  sub sub_page_js {
     pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");      pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");
     pWin.document.write("<td>Subject</td>");      pWin.document.write("<td>Subject</td>");
     pWin.document.write("<td align=\\"center\\"><input name=\\"subchk\\" type=\\"checkbox\\"" +shwsel+"></td>");      pWin.document.write("<td align=\\"center\\"><input name=\\"subchk\\" type=\\"checkbox\\"" +shwsel+"></td>");
     pWin.document.write("<td><input name=\\"msgsub\\" type=\\"text\\" value=\\""+msg+" \\"size=\\"60\\" maxlength=\\"80\\"></td></tr>");      pWin.document.write("<td><input name=\\"msgsub\\" type=\\"text\\" value=\\""+msg+"\\"size=\\"60\\" maxlength=\\"80\\"></td></tr>");
 }  }
   
 function displaySavedMsg(ctr,msg,shwsel) {    function displaySavedMsg(ctr,msg,shwsel) {
     pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");      pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");
     pWin.document.write("<td align=\\"center\\">"+ctr+"</td>");      pWin.document.write("<td align=\\"center\\">"+ctr+"</td>");
     pWin.document.write("<td align=\\"center\\"><input name=\\"msgn"+ctr+"\\" type=\\"checkbox\\"" +shwsel+"></td>");      pWin.document.write("<td align=\\"center\\"><input name=\\"msgn"+ctr+"\\" type=\\"checkbox\\"" +shwsel+"></td>");
     pWin.document.write("<td><input name=\\"msg"+ctr+"\\" type=\\"text\\" value=\\""+msg+" \\" size=\\"60\\" maxlength=\\"80\\"></td></tr>");      pWin.document.write("<td><textarea name=\\"msg"+ctr+"\\" cols=\\"60\\" rows=\\"3\\">"+msg+"</textarea></td></tr>");
 }  }
   
   function newMsg(newmsg,shwsel) {    function newMsg(newmsg,shwsel) {
     pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");      pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");
     pWin.document.write("<td align=\\"center\\">New</td>");      pWin.document.write("<td align=\\"center\\">New</td>");
     pWin.document.write("<td align=\\"center\\"><input name=\\"newmsgchk\\" type=\\"checkbox\\"" +shwsel+"></td>");      pWin.document.write("<td align=\\"center\\"><input name=\\"newmsgchk\\" type=\\"checkbox\\"" +shwsel+"></td>");
     pWin.document.write("<td><input name=\\"newmsg\\" type=\\"text\\" onchange=\\"javascript:this.form.newmsgchk.checked=true\\" value=\\""+newmsg+" \\" size=\\"60\\" maxlength=\\"80\\"></td></tr>");      pWin.document.write("<td><textarea name=\\"newmsg\\" cols=\\"60\\" rows=\\"3\\" onchange=\\"javascript:this.form.newmsgchk.checked=true\\" >"+newmsg+"</textarea></td></tr>");
 }  }
   
   function msgTail() {    function msgTail() {
Line 846  sub submission { Line 846  sub submission {
   
  # option to display problem, only once else it cause problems    # option to display problem, only once else it cause problems 
         # with the form later since the problem has a form.          # with the form later since the problem has a form.
  if ($ENV{'form.vProb'} eq 'yes') {   if ($ENV{'form.vProb'} eq 'yes' or !$ENV{'form.vProb'}) {
     &show_problem($request,$symb,$uname,$udom,0);      &show_problem($request,$symb,$uname,$udom,0);
  }   }
   
Line 1173  sub get_last_submission { Line 1173  sub get_last_submission {
  for ($version=1;$version<=$returnhash{'version'};$version++) {   for ($version=1;$version<=$returnhash{'version'};$version++) {
     foreach (sort(split(/\:/,$returnhash{$version.':keys'}))) {      foreach (sort(split(/\:/,$returnhash{$version.':keys'}))) {
  $lasthash{$_}=$returnhash{$version.':'.$_};   $lasthash{$_}=$returnhash{$version.':'.$_};
  if ($returnhash{$version.':'.$_} =~ /(SUBMITTED|DRAFT)$/) {  # if ($returnhash{$version.':'.$_} =~ /(SUBMITTED|DRAFT)$/) {
    $timestamp = scalar(localtime($returnhash{$version.':timestamp'}));     $timestamp = scalar(localtime($returnhash{$version.':timestamp'}));
        }   #       } 
     }      }
  }   }
  foreach ((keys %lasthash)) {   foreach ((keys %lasthash)) {
Line 1199  sub keywords_highlight { Line 1199  sub keywords_highlight {
     (my $styleoff = $styleon) =~ s/\</\<\//;      (my $styleoff = $styleon) =~ s/\</\<\//;
     my @keylist   = split(/[,\s+]/,$ENV{'form.keywords'});      my @keylist   = split(/[,\s+]/,$ENV{'form.keywords'});
     foreach (@keylist) {      foreach (@keylist) {
  $string =~ s/\b$_(\b|\.)/\<font color\=$ENV{'form.kwclr'} $size\>$styleon$_$styleoff\<\/font\>/gi;   $string =~ s/\b\Q$_\E(\b|\.)/\<font color\=$ENV{'form.kwclr'} $size\>$styleon$_$styleoff\<\/font\>/gi;
     }      }
     # This is not really the right place to do this, but I cannot find a      # This is not really the right place to do this, but I cannot find a
     # better one at this time.  So here we go - the m in the s:::mg causes      # better one at this time.  So here we go - the m in the s:::mg causes
Line 1226  sub processHandGrade { Line 1226  sub processHandGrade {
   
     my $includemsg = $ENV{'form.includemsg'.$ctr};      my $includemsg = $ENV{'form.includemsg'.$ctr};
     my ($subject,$message,$msgstatus) = ('','','');      my ($subject,$message,$msgstatus) = ('','','');
     if ($includemsg =~ /savemsg|new$ctr/) {      if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) {
  $subject = $ENV{'form.msgsub'} if ($includemsg =~ /^msgsub/);   $subject = $ENV{'form.msgsub'} if ($includemsg =~ /^msgsub/);
  my (@msgnum) = split(/,/,$includemsg);   my (@msgnum) = split(/,/,$includemsg);
  foreach (@msgnum) {   foreach (@msgnum) {
     $message.=$ENV{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne '');      $message.=$ENV{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne '');
  }   }
  $message =~ s/\s+/ /g;   #$message =~ s/\s+/ /g;
  $msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom,   $msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom,
        $ENV{'form.msgsub'},$message);         $ENV{'form.msgsub'},$message);
     }      }
Line 1725  sub viewstudentgrade { Line 1725  sub viewstudentgrade {
  '<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom.   '<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom.
  '\')"; TARGET=_self>'.$fullname.'</a>'.   '\')"; TARGET=_self>'.$fullname.'</a>'.
  '</td><td>'.$uname.'</td><td align="middle">'.$udom.'</td>'."\n";   '</td><td>'.$uname.'</td><td align="middle">'.$udom.'</td>'."\n";
     foreach my $part (@$parts) {      foreach my $apart (@$parts) {
  my ($part,$type) = &split_part_type($part);   my ($part,$type) = &split_part_type($apart);
  my $score=$record{"resource.$part.$type"};   my $score=$record{"resource.$part.$type"};
  if ($type eq 'awarded') {   if ($type eq 'awarded') {
     my $pts = $score eq '' ? '' : $score*$$weight{$part};      my $pts = $score eq '' ? '' : $score*$$weight{$part};

Removed from v.1.59  
changed lines
  Added in v.1.66.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>