Diff for /loncom/lonsql between versions 1.78 and 1.80

version 1.78, 2007/01/02 12:51:31 version 1.80, 2007/04/03 17:51:45
Line 425  sub make_new_child { Line 425  sub make_new_child {
                     } else {                      } else {
                         $result=&courselog($path,$command);                          $result=&courselog($path,$command);
                     }                      }
                       $result = &escape($result);
                 } else {                  } else {
                     &logthis('Unable to do log query: '.$uname.'@'.$udom);                      &logthis('Unable to do log query: '.$uname.'@'.$udom);
                     $result='no_such_file';                      $result='no_such_file';
Line 659  sub portfolio_table_update { Line 660  sub portfolio_table_update {
         }          }
     }      }
     if ($result eq 'ok') {      if ($result eq 'ok') {
         my ($uname,$udom) = split(/:/,&unescape($arg1));          my ($uname,$udom,$group) = split(/:/,&unescape($arg1));
         my $file_name = &unescape($arg2);          my $file_name = &unescape($arg2);
         my $group = &unescape($arg3);          my $action = $arg3;
         my $is_course = 0;          my $is_course = 0;
         if ($group ne '') {          if ($group ne '') {
             $is_course = 1;              $is_course = 1;
Line 677  sub portfolio_table_update { Line 678  sub portfolio_table_update {
             $fullpath = $pathstart.'/portfolio'.$file_name;              $fullpath = $pathstart.'/portfolio'.$file_name;
             $url = $urlstart.'/portfolio'.$file_name;              $url = $urlstart.'/portfolio'.$file_name;
         }          }
         my %access = &get_access_hash($uname,$udom,$group.$file_name);  
         if ($query eq 'portfolio_metadata') {          if ($query eq 'portfolio_metadata') {
             if (-e $fullpath.'.meta') {              if ($action eq 'delete') {
                   my %loghash = &LONCAPA::lonmetadata::process_portfolio_metadata($dbh,undef,\%tablenames,$url,$fullpath,$is_course,$udom,$uname,$group,'update');
               } elsif (-e $fullpath.'.meta') {
                 my %loghash = &LONCAPA::lonmetadata::process_portfolio_metadata($dbh,undef,\%tablenames,$url,$fullpath,$is_course,$udom,$uname,$group,'update');                  my %loghash = &LONCAPA::lonmetadata::process_portfolio_metadata($dbh,undef,\%tablenames,$url,$fullpath,$is_course,$udom,$uname,$group,'update');
                 if (keys(%loghash) > 0) {                  if (keys(%loghash) > 0) {
                     &portfolio_logging(%loghash);                      &portfolio_logging(%loghash);
                 }                  }
             }              }
         } elsif ($query eq 'portfolio_access') {          } elsif ($query eq 'portfolio_access') {
               my %access = &get_access_hash($uname,$udom,$group.$file_name);
             my %loghash =              my %loghash =
      &LONCAPA::lonmetadata::process_portfolio_access_data($dbh,undef,       &LONCAPA::lonmetadata::process_portfolio_access_data($dbh,undef,
          \%tablenames,$url,$fullpath,\%access,'update');           \%tablenames,$url,$fullpath,\%access,'update');
Line 1049  sub userlog { Line 1052  sub userlog {
                                                              { $include=0; }                                                               { $include=0; }
         if (($filters{'end'}) && ($timestamp>$filters{'end'}))           if (($filters{'end'}) && ($timestamp>$filters{'end'})) 
                                                              { $include=0; }                                                               { $include=0; }
           if (($filters{'action'} eq 'Role') && ($log !~/^Role/))
                                                                { $include=0; }
         if (($filters{'action'} eq 'log') && ($log!~/^Log/)) { $include=0; }          if (($filters{'action'} eq 'log') && ($log!~/^Log/)) { $include=0; }
         if (($filters{'action'} eq 'check') && ($log!~/^Check/))           if (($filters{'action'} eq 'check') && ($log!~/^Check/)) 
                                                              { $include=0; }                                                               { $include=0; }
         if ($include) {          if ($include) {
    push(@results,$timestamp.':'.$log);     push(@results,$timestamp.':'.$host.':'.&escape($log));
         }          }
     }      }
     close IN;      close IN;

Removed from v.1.78  
changed lines
  Added in v.1.80


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