Diff for /loncom/interface/lonwhatsnew.pm between versions 1.14 and 1.31

version 1.14, 2005/05/24 15:54:19 version 1.31, 2005/09/21 18:20:22
Line 35  use Apache::lonhtmlcommon(); Line 35  use Apache::lonhtmlcommon();
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::loncoursedata();  use Apache::loncoursedata();
 use Apache::lonnavmaps();  use Apache::lonnavmaps();
   use Apache::lonuserstate;
 use Apache::Constants qw(:common :http);  use Apache::Constants qw(:common :http);
 use Time::Local;  use Time::Local;
   use GDBM_File;
   
 #----------------------------  #----------------------------
 # handler  # handler
Line 105  sub display_main_box { Line 107  sub display_main_box {
                          degdiff => 'Degree of difficulty',                           degdiff => 'Degree of difficulty',
                          numstudents => 'Total number of students with submissions',                           numstudents => 'Total number of students with submissions',
     );      );
       my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
       my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
   
     if ($command eq 'chgthreshold') {      if ($command eq 'chgthreshold') {
         &display_config_box($r,$command,$tabbg,\%threshold_titles);          &display_config_box($r,$command,$tabbg,\%threshold_titles,$cdom,$crs);
     } else {      } else {
         &display_actions_box($r,$command,\%threshold_titles);          &display_actions_box($r,$command,\%threshold_titles,$cdom,$crs);
     }      }
     $r->print(<<END_OF_BLOCK);      $r->print(<<END_OF_BLOCK);
   </td>    </td>
Line 146  ENDHEAD Line 151  ENDHEAD
 #-------------------------------  #-------------------------------
                                                                                                                                                                   
 sub display_actions_box() {  sub display_actions_box() {
     my ($r,$command,$threshold_titles) = @_;      my ($r,$command,$threshold_titles,$cdom,$crs) = @_;
   
     my $rowColor1 = "#ffffff";      my $rowColor1 = "#ffffff";
     my $rowColor2 = "#eeeeee";      my $rowColor2 = "#eeeeee";
Line 162  sub display_actions_box() { Line 167  sub display_actions_box() {
     my @tograde = ();      my @tograde = ();
     my @bombs = ();      my @bombs = ();
     my @warnings = ();      my @warnings = ();
       my %res_title = ();
   
     my $domain=&Apache::loncommon::determinedomain();      my $domain=&Apache::loncommon::determinedomain();
     my $function;      my $function;
Line 173  sub display_actions_box() { Line 179  sub display_actions_box() {
     }      }
   
     my %threshold = (      my %threshold = (
                       av_attempts => 0,                        av_attempts => 2,
                       degdiff => 0.01,                        degdiff => 0.5,
                       numstudents => 0,                        numstudents => 2,
                      );                       );
   
     my $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain);      my $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain);
     my $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain);      my $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain);
   
     unless ($env{'request.course.id'}) {      unless ($env{'request.course.id'}) {
         $r->print('<br /><b><center>You are accessing an invalid course</center></b><br /><br />');          $r->print('<br /><b><center>You are accessing an invalid course.</center></b><br /><br />');
         return;          return;
     }      }
       if (tie(my %bighash,'GDBM_File',$env{'request.course.fn'}.'.db',
       &GDBM_READER(),0640)) {
    my $furl=$bighash{'first_url'};
    $r->print('<font size="+1"><a href="'.$furl.'">Go to first resource</a></font><a href="/adm/preferences?action=changecourseinit"></font><br />Change your preferences</a> to suppress display of this screen when accessing courses as Course Coordinator in the future.<br /><hr />');
    untie(%bighash);
       }
   
     my $result;      my $result;
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};  
     my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};  
   
     if ($command eq 'reset') {      if ($command eq 'reset') {
         $result = &process_reset($cdom,$crs);          $result = &process_reset($cdom,$crs);
Line 198  sub display_actions_box() { Line 208  sub display_actions_box() {
     if ($result) {      if ($result) {
         $r->print($result.'<hr width="100%" />');          $r->print($result.'<hr width="100%" />');
     }      }
       $r->rflush();
   
     &get_curr_thresholds(\%threshold,$cdom,$crs);      &get_curr_thresholds(\%threshold,$cdom,$crs);
     &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\@newdiscussions,\@tograde,\@bombs,\@warnings,$rowColor1,$rowColor2,\%threshold,$cdom,$crs);      &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\@newdiscussions,\@tograde,\@bombs,\@warnings,$rowColor1,$rowColor2,\%threshold,$cdom,$crs,%res_title);
     my ($msgcount,$critmsgcount) = &getmail(\@newmsgs,\@critmsgs);      my ($msgcount,$critmsgcount) = &getmail(\@newmsgs,\@critmsgs);
   
     $r->print('<br /><table border="0" width="100%" cellpadding="2" cellspacing="4"><tr><td align="left" valign="top" width="45%">');      $r->print('<br /><table border="0" width="100%" cellpadding="2" cellspacing="4"><tr><td align="left" valign="top" width="45%">');
Line 254  END Line 265  END
      my $bombnum = 0;       my $bombnum = 0;
      if (@bombs > 0) {       if (@bombs > 0) {
         $r->print('<tr bgcolor="#cccccc"><td><b><small>Resource</small></b></td><td align="right"><b><small>Number of errors</small></b></td></tr>');          $r->print('<tr bgcolor="#cccccc"><td><b><small>Resource</small></b></td><td align="right"><b><small>Number of errors</small></b></td></tr>');
 #        @bombs = sort { &cmp_title($a,$b) } @bombs;          @bombs = sort { &cmp_title($a,$b,\%res_title) } @bombs;
         foreach my $bomb (@bombs) {          foreach my $bomb (@bombs) {
             if ($bombnum %2 == 1) {              if ($bombnum %2 == 1) {
                  $rowColor = $rowColor1;   $rowColor = $rowColor1;
             } else {              } else {
                 $rowColor = $rowColor2;                  $rowColor = $rowColor2;
             }              }
Line 283  END Line 294  END
                </tr>                 </tr>
                 <tr>                  <tr>
                 <td bgcolor="#ffffff">                  <td bgcolor="#ffffff">
                  <table width="100%" cellspacing="0" cellpadding="0" border="0">                   <table width="100%" cellspacing="2" cellpadding="2" border="0">
 END  END
     my $warningnum = 0;      my $warningnum = 0;
     if (@warnings > 0) {      if (@warnings > 0) {
 #        @warnings = sort { &cmp_title($a,$b) } @warnings;          @warnings = sort { &cmp_title($a,$b,\%res_title) } @warnings;
         $r->print('<form name="reset_tracking" method="post">'.          $r->print('<form name="reset_tracking" method="post">'.
                  '  <input type="hidden" name="action" value="reset" />'."\n");                   '  <input type="hidden" name="action" value="reset" />'."\n");
         $r->print('<tr bgcolor="#cccccc"><td><b><small>Resource</small></b></td><td align="right"><b><small>Part</small></b></td><td align="right"><b><small>Num. students</small></b></td><td align="right"><b><small>Av. Attempts</small></b></td><td align="right"><b><small>Deg. Diff</small></b></td><td align="right"><b><small>Last Reset</small></b></td><td align="right"><b><small>Reset Count?</small></b></td></tr>');          $r->print('<tr bgcolor="#cccccc"><td><b><small>Resource</small></b></td><td align="right"><b><small>Part</small></b></td><td align="right"><b><small>Num. students</small></b></td><td align="right"><b><small>Av. Attempts</small></b></td><td align="right"><b><small>Deg. Diff</small></b></td><td align="right"><b><small>Last Reset</small></b></td><td align="right"><b><small>Reset Count?</small></b></td></tr>');
Line 330  END Line 341  END
                                                                                                                                                                       
     if (@newdiscussions > 0) {      if (@newdiscussions > 0) {
         $r->print('<tr bgcolor="#cccccc"><td><b><small>Location</small></b></td><td><b><small>Type</small></b><td align="right"><b><small>Number of new posts</small></b></td></tr>');          $r->print('<tr bgcolor="#cccccc"><td><b><small>Location</small></b></td><td><b><small>Type</small></b><td align="right"><b><small>Number of new posts</small></b></td></tr>');
 #        @newdiscussions = sort { &cmp_title($a,$b) } @newdiscussions;          @newdiscussions = sort { &cmp_title($a,$b,\%res_title) } @newdiscussions;
         my $rowNum = 0;          my $rowNum = 0;
         foreach my $ressymb (@newdiscussions) {          foreach my $ressymb (@newdiscussions) {
             my $forum_title = $unread{$ressymb}{'title'};              my $forum_title = $unread{$ressymb}{'title'};
Line 379  END Line 390  END
             } else {              } else {
                 $rowColor = $rowColor2;                  $rowColor = $rowColor2;
             }              }
             $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;<small></td><td valign="top"><small><a href="/adm/mail?">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');              $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;</small></td><td valign="top"><small><a href="/adm/communicate">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');
             $rowNum ++;              $rowNum ++;
             $mailcount ++;              $mailcount ++;
         }          }
Line 411  END Line 422  END
             } else {              } else {
                 $rowColor = $rowColor2;                  $rowColor = $rowColor2;
             }              }
             $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;<small></td><td valign="top"><small><a href="/adm/mail?">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');              $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;<small></td><td valign="top"><small><a href="/adm/email?folder=critical">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');
             $rowNum ++;              $rowNum ++;
             $mailcount ++;              $mailcount ++;
         }          }
Line 437  END Line 448  END
 #-------------------------------  #-------------------------------
                                                                                                                                                                   
 sub display_config_box() {  sub display_config_box() {
     my ($r,$command,$tabbg,$threshold_titles) = @_;      my ($r,$command,$tabbg,$threshold_titles,$cdom,$crs) = @_;
     my %threshold = ();      my %threshold = ();
     my $rowColor1 = "#ffffff";      my $rowColor1 = "#ffffff";
     my $rowColor2 = "#eeeeee";      my $rowColor2 = "#eeeeee";
Line 449  sub display_config_box() { Line 460  sub display_config_box() {
                          degdiff => 'Degree of difficulty',                           degdiff => 'Degree of difficulty',
                          numstudents => 'Total number of students with submissions',                           numstudents => 'Total number of students with submissions',
                          );                           );
     &get_curr_thresholds(\%threshold);      &get_curr_thresholds(\%threshold,$cdom,$crs);
   
     $r->print('<br /><form name="thresholdform" method="post"><table border="0" cellpadding="2" cellspacing="4"><tr><td align="left" valign="top" width="45%">      $r->print('<br /><form name="thresholdform" method="post"><table border="0" cellpadding="2" cellspacing="4"><tr><td align="left" valign="top" width="45%">
            <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">             <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
Line 495  sub display_config_box() { Line 506  sub display_config_box() {
 }  }
   
 sub getitems {  sub getitems {
     my ($unread,$ungraded,$bombed,$triggered,$newdiscussions,$tograde,$bombs,$warnings,$rowColor1,$rowColor2,$threshold,$cdom,$crs) = @_;      my ($unread,$ungraded,$bombed,$triggered,$newdiscussions,$tograde,$bombs,$warnings,$rowColor1,$rowColor2,$threshold,$cdom,$crs,$res_title) = @_;
     my $navmap = Apache::lonnavmaps::navmap->new();      my $navmap = Apache::lonnavmaps::navmap->new();
     my @allres=$navmap->retrieveResources();      # force retrieve Resource to seed the part id cache we'll need it later
       my @allres=$navmap->retrieveResources(undef,sub {if ($_[0]->is_problem) { $_[0]->parts();} return 1;});
     my %discussiontime = &Apache::lonnet::dump('discussiontimes',$cdom,$crs);      my %discussiontime = &Apache::lonnet::dump('discussiontimes',$cdom,$crs);
     my %lastread = &Apache::lonnet::dump('nohist_'.$env{'request.course.id'}.      my %lastread = &Apache::lonnet::dump('nohist_'.$env{'request.course.id'}.
                 '_discuss',$env{'user.domain'},$env{'user.name'},'lastread');                  '_discuss',$env{'user.domain'},$env{'user.name'},'lastread');
Line 507  sub getitems { Line 519  sub getitems {
   
     my %resourcetracker =  &Apache::lonnet::dump('nohist_resourcetracker',      my %resourcetracker =  &Apache::lonnet::dump('nohist_resourcetracker',
                $cdom,$crs);                 $cdom,$crs);
     my %res_title;  
     my $warningnum = 0;      my $warningnum = 0;
     foreach my $key (keys(%lastread)) {      foreach my $key (keys(%lastread)) {
         my $newkey = $key;          my $newkey = $key;
Line 523  sub getitems { Line 534  sub getitems {
         %{$$triggered{$symb}} = ();          %{$$triggered{$symb}} = ();
         $$triggered{$symb}{numparts} = 0;          $$triggered{$symb}{numparts} = 0;
         my $title = $resource->compTitle();          my $title = $resource->compTitle();
         $res_title{$symb} = $title;          $$res_title{$symb} = $title;
         my $ressymb = $resource->wrap_symb();          my $ressymb = $resource->wrap_symb();
 # Check for unread discussion postings  # Check for unread discussion postings
         if (defined($discussiontime{$ressymb})) {   if ($resource->hasDiscussion()) {
             push(@discussions,$ressymb);              push(@discussions,$ressymb);
             my $prevread = 0;              my $prevread = 0;
             my $unreadcount = 0;              my $unreadcount = 0;
Line 555  sub getitems { Line 566  sub getitems {
         if ($resource->is_problem()) {          if ($resource->is_problem()) {
             my $ctr = 0;              my $ctr = 0;
             my ($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);              my ($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
             my ($partlist,$handgrade,$responseType) = &Apache::grades::response_type($url,$symb);      my $partlist=$resource->parts();
             foreach my $student (keys(%$classlist)) {      my $handgradeable;
                 my ($uname,$udom) = split(/:/,$student);      foreach my $part (@$partlist) {
                 my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist);   if ($resource->handgrade($part) eq 'yes') {
                 my $submitted = 0;      $handgradeable=1; last;
                 my $ungraded = 0;   }
                 foreach (keys(%status)) {      }
                     $submitted = 1 if ($status{$_} ne 'nothing');      if ($handgradeable) {
                     $ungraded = 1 if ($status{$_} =~ /^ungraded/);   foreach my $student (keys(%$classlist)) {
                     my ($foo,$partid,$foo1) = split(/\./,$_);      my ($uname,$udom) = split(/:/,$student);
                     if ($status{'resource.'.$partid.'.submitted_by'} ne '') {      my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist);
                         $submitted = 0;      my $submitted = 0;
                     }      my $ungraded = 0;
                 }      foreach (keys(%status)) {
                 next if (!$submitted || !$ungraded);   $submitted = 1 if ($status{$_} ne 'nothing');
                 $ctr ++;   $ungraded = 1 if ($status{$_} =~ /^ungraded/);
             }   my ($foo,$partid,$foo1) = split(/\./,$_);
             if ($ctr) {   if ($status{'resource.'.$partid.'.submitted_by'} ne '') {
                 $$ungraded{$symb}{count} = $ctr;      $submitted = 0;
                 $$ungraded{$symb}{title} = $title;   }
                 push(@{$tograde}, $symb);      }
             }      next if (!$submitted || !$ungraded);
       $ctr ++;
    }
    if ($ctr) {
       $$ungraded{$symb}{count} = $ctr;
       $$ungraded{$symb}{title} = $title;
       push(@{$tograde}, $symb);
    }
       }
         }          }
   
 # Check for bombs  # Check for bombs
         if ($resource->getErrors()) {          if ($resource->getErrors()) {
             my $errors = $resource->getErrors();              my $errors = $resource->getErrors();
             $errors =~ s/^,//;      $errors =~ s/^,//;
             my @bombs = split(/,/, $errors);              my @bombs = split(/,/, $errors);
             my $errorcount = scalar(@bombs);              my $errorcount = scalar(@bombs);
             my $errorlink = '<a href="/adm/email?display='.              my $errorlink = '<a href="/adm/email?display='.
Line 592  sub getitems { Line 611  sub getitems {
             $$bombed{$symb}{errorlink} = $errorlink;              $$bombed{$symb}{errorlink} = $errorlink;
             push(@{$bombs}, $symb);              push(@{$bombs}, $symb);
         }          }
 # Compile maxtries and degree of difficulty for problem parts  # Compile maxtries and degree of difficulty for problem parts, unless handgradeable
         my @parts = @{$resource->parts()};          my @parts = @{$resource->parts()};
         my %stats;          my %stats;
         my %lastreset = ();          my %lastreset = ();
         my $warning = 0;          my $warning = 0;
         my $rowColor;          my $rowColor;
         foreach my $part (@parts) {          foreach my $part (@parts) {
               if ($resource->handgrade($part) eq 'yes') {
                   next;
               }
             %{$stats{$part}} = ();              %{$stats{$part}} = ();
             my ($attempts,$users,$corrects,$degdiff,$av_attempts);              my ($attempts,$users,$corrects,$degdiff,$av_attempts);
             if (exists($resourcetracker{$symb."\0".$part."\0attempts"})) {              if (exists($resourcetracker{$symb."\0".$part."\0attempts"})) {
Line 616  sub getitems { Line 638  sub getitems {
             }              }
             if ($users > 0) {              if ($users > 0) {
                 $av_attempts = $attempts/$users;                  $av_attempts = $attempts/$users;
                   $av_attempts = sprintf("%.2f",$av_attempts);
             }              }
             if ((($degdiff ne '' && $degdiff >= $$threshold{'degdiff'}) || ($av_attempts ne '' && $av_attempts >= $$threshold{'av_attempts'})) && ($users >= $$threshold{'numstudents'})) {              if ((($degdiff ne '' && $degdiff >= $$threshold{'degdiff'}) || ($av_attempts ne '' && $av_attempts >= $$threshold{'av_attempts'})) && ($users >= $$threshold{'numstudents'})) {
                 $stats{$part}{degdiff} = $degdiff;                  $stats{$part}{degdiff} = $degdiff;
                 $stats{$part}{attempts} = $av_attempts;                  $stats{$part}{attempts} = $av_attempts;
                 $stats{$part}{users} = $users;                  $stats{$part}{users} = $users;
                 my %resethash = &Apache::lonnet::restore($symb,'nohist_resourcetracker',$cdom,$crs);   $lastreset{$part} = $resourcetracker{$symb."\0".$part."\0resettime"};
                 $lastreset{$part} = &get_counter_resets(\%resethash,$part);  
                 $warning = 1;                  $warning = 1;
             }              }
         }          }
Line 663  sub getitems { Line 685  sub getitems {
     }      }
 }  }
   
 sub get_counter_resets {  
     my ($resethash,$part) = @_;  
     my $lastreset = 'None';  
     if ($$resethash{'version'}) {  
         for (my $version=1;$version<=$$resethash{'version'};$version++) {  
             if (exists($$resethash{$version.':'.$part.'prev_attempts'})) {  
                  $lastreset = $$resethash{$version.':timestamp'};  
             }  
         }  
     }  
     unless ($lastreset eq 'None') {  
         $lastreset = localtime($lastreset);  
     }  
     return $lastreset;  
 }  
   
 sub get_curr_thresholds {  sub get_curr_thresholds {
     my ($threshold,$cdom,$crs) = @_;      my ($threshold,$cdom,$crs) = @_;
     my %coursesettings = &Apache::lonnet::dump('environment',      my %coursesettings = &Apache::lonnet::dump('environment',
Line 705  sub process_reset { Line 711  sub process_reset {
                      );                       );
     my @resets = ();      my @resets = ();
     my %titles = ();      my %titles = ();
     foreach my $key (keys %env) {      foreach my $key (keys(%env)) {
         next if ($key !~ /^form\.reset_(.+)$/);          next if ($key !~ /^form\.reset_(.+)$/);
         my $title = &Apache::lonnet::unescape($env{'form.title_'.$1});          my $title = &Apache::lonnet::unescape($env{'form.title_'.$1});
         my $reset_item = &Apache::lonnet::unescape($1);          my $reset_item = &Apache::lonnet::unescape($1);
         my %curr_aggregates = &Apache::lonnet::dump('nohist_resourcetracker',$dom,$crs,$reset_item);          my %curr_aggregates = &Apache::lonnet::dump('nohist_resourcetracker',$dom,$crs,$reset_item);
         my %resethash = ();  
         my %aggregates = ();          my %aggregates = ();
         my ($symb,$part) = split/\0/,$reset_item;          my ($symb,$part) = split(/\0/,$reset_item);
         foreach my $type (@agg_types) {          foreach my $type (@agg_types) {
             $aggregates{$reset_item."\0".$type} = 0;              $aggregates{$reset_item."\0".$type} = 0;
             $resethash{$part."\0".'prev_'.$type} = $curr_aggregates{$reset_item."\0".$type};  
         }            }  
    $aggregates{$reset_item."\0".'resettime'} = time;
         my $putresult = &Apache::lonnet::put('nohist_resourcetracker',\%aggregates,          my $putresult = &Apache::lonnet::put('nohist_resourcetracker',\%aggregates,
                           $dom,$crs);                            $dom,$crs);
         if ($putresult eq 'ok') {          if ($putresult eq 'ok') {
             my $storeresult = &Apache::lonnet::cstore(\%resethash,$symb,'nohist_resourcetracker',$dom,$crs);  
             $result .= $title.' -part '.$part.': ';              $result .= $title.' -part '.$part.': ';
             my %new_aggregates = &Apache::lonnet::dump('nohist_resourcetracker',$dom,$crs,$reset_item);              my %new_aggregates = &Apache::lonnet::dump('nohist_resourcetracker',$dom,$crs,$reset_item);
             foreach my $type (@agg_types) {              foreach my $type (@agg_types) {
Line 737  sub process_reset { Line 741  sub process_reset {
   
 sub process_update {  sub process_update {
     my ($dom,$crs,$threshold_titles) = @_;      my ($dom,$crs,$threshold_titles) = @_;
     my $setoutput = '<b>Changes to threshold(s):</b><br />';      my $setoutput = '<b>Changes to threshold(s) for problem tracking:</b><br />';
     foreach (keys %env) {      foreach (keys %env) {
         next if ($_!~/^form\.(.+)\_setparmval$/);          next if ($_!~/^form\.(.+)\_setparmval$/);
         my $name  = $1;          my $name  = $1;
Line 823  sub getmail { Line 827  sub getmail {
 }  }
   
 sub cmp_title {  sub cmp_title {
     my ($atitle,$btitle) = (lc($_[0]->compTitle),lc($_[1]->compTitle));      my ($a,$b,$res_title) = @_;
       my ($atitle,$btitle) = (lc($$res_title{$a}),lc($$res_title{$b}));
     $atitle=~s/^\s*//;      $atitle=~s/^\s*//;
     $btitle=~s/^\s*//;      $btitle=~s/^\s*//;
     return $atitle cmp $btitle;      return $atitle cmp $btitle;

Removed from v.1.14  
changed lines
  Added in v.1.31


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