Diff for /loncom/interface/groupsort.pm between versions 1.67 and 1.72

version 1.67, 2010/08/24 09:11:37 version 1.72, 2013/01/09 16:30:19
Line 37  use GDBM_File; Line 37  use GDBM_File;
 use Apache::loncommon;  use Apache::loncommon;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnet;  use Apache::lonnet;
 use LONCAPA;  use LONCAPA qw(:DEFAULT :match);
   
 my $iconpath; # variable to be accessible to multiple subroutines  my $iconpath; # variable to be accessible to multiple subroutines
 my %hash; # variable to tie to user specific database  my %hash; # variable to tie to user specific database
Line 86  sub update_actions_hash { Line 86  sub update_actions_hash {
 sub readfromdb {  sub readfromdb {
     my ($r,$resources)=@_;      my ($r,$resources)=@_;
   
     my $diropendb =       my $diropendb = LONCAPA::tempdir() .
        "/home/httpd/perl/tmp/$env{'user.domain'}_$env{'user.name'}_sel_res.db";         "$env{'user.domain'}_$env{'user.name'}_sel_res.db";
   
 # ----------------------------- diropendb is now the filename of the db to open  # ----------------------------- diropendb is now the filename of the db to open
     if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) {      if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) {
Line 152  sub readfromfile { Line 152  sub readfromfile {
   &Apache::lonnet::filelocation('',$env{'form.readfile'}));    &Apache::lonnet::filelocation('',$env{'form.readfile'}));
     } else {      } else {
         my $parser = HTML::TokeParser->new(\$cont);          my $parser = HTML::TokeParser->new(\$cont);
         my $token;          my ($token,$donechk,$allmaps);
           $allmaps = {};
         while ($token = $parser->get_token) {          while ($token = $parser->get_token) {
     if ($token->[0] eq 'S') {      if ($token->[0] eq 'S') {
                 if ($token->[1] eq 'resource') {                  if ($token->[1] eq 'resource') {
     if ($env{'form.recover'}) {      if ($env{'form.recover'}) {
  if ($token->[2]->{'type'} ne 'zombie') { next; }   if ($token->[2]->{'type'} ne 'zombie') { next; }
                           if ($token->[2]->{'src'} =~ /\.(page|sequence)$/) {
                               if (($env{'request.course.id'}) &&
                                   ($env{'form.readfile'} =~ m{/default(|_\d+)\.(page|sequence)$})) {
                                   unless ($donechk) {
                                       $allmaps = &Apache::loncommon::allmaps_incourse();
                                       $donechk = 1;
                                   }
                               }
                               if ($allmaps->{$token->[2]->{'src'}}) { next; }
                           }
     } else {      } else {
  if ($token->[2]->{'type'} eq 'zombie') { next; }   if ($token->[2]->{'type'} eq 'zombie') { next; }
     }      }
Line 181  sub readfromfile { Line 192  sub readfromfile {
     }      }
 }  }
   
   
 # ---------------------------------------------------------------- Main Handler  # ---------------------------------------------------------------- Main Handler
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
Line 411  END Line 421  END
     $r->print("<td>");      $r->print("<td>");
     $r->print("<img src='$iconname' />");      $r->print("<img src='$iconname' />");
     $r->print("</td><td>");      $r->print("</td><td>");
     $r->print($resource->{'title'}.$resource->{'notes'}."</td><td>\n");              if (($env{'form.recover'}) &&
                   ($resource->{'url'} =~ m{/uploaded/$match_domain/$match_courseid/supplemental/})) {
                   my $title = &Apache::loncommon::parse_supplemental_title($resource->{'title'});
                   $r->print($title);
               } else {
                   $r->print($resource->{'title'});
               }
               $r->print($resource->{'notes'}."</td><td>\n");
     $r->print($resource->{'url'}."</td>"      $r->print($resource->{'url'}."</td>"
                      .&Apache::loncommon::end_data_table_row()                       .&Apache::loncommon::end_data_table_row()
                      ."\n");                       ."\n");

Removed from v.1.67  
changed lines
  Added in v.1.72


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.