--- loncom/lonsql 2007/01/02 12:51:31 1.78 +++ loncom/lonsql 2007/01/03 01:59:42 1.79 @@ -3,7 +3,7 @@ # The LearningOnline Network # lonsql - LON TCP-MySQL-Server Daemon for handling database requests. # -# $Id: lonsql,v 1.78 2007/01/02 12:51:31 raeburn Exp $ +# $Id: lonsql,v 1.79 2007/01/03 01:59:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -659,9 +659,9 @@ sub portfolio_table_update { } } if ($result eq 'ok') { - my ($uname,$udom) = split(/:/,&unescape($arg1)); + my ($uname,$udom,$group) = split(/:/,&unescape($arg1)); my $file_name = &unescape($arg2); - my $group = &unescape($arg3); + my $action = $arg3; my $is_course = 0; if ($group ne '') { $is_course = 1; @@ -677,15 +677,17 @@ sub portfolio_table_update { $fullpath = $pathstart.'/portfolio'.$file_name; $url = $urlstart.'/portfolio'.$file_name; } - my %access = &get_access_hash($uname,$udom,$group.$file_name); 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'); if (keys(%loghash) > 0) { &portfolio_logging(%loghash); } } } elsif ($query eq 'portfolio_access') { + my %access = &get_access_hash($uname,$udom,$group.$file_name); my %loghash = &LONCAPA::lonmetadata::process_portfolio_access_data($dbh,undef, \%tablenames,$url,$fullpath,\%access,'update'); 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.