--- loncom/html/adm/helper/resettimes.helper 2016/03/17 15:10:10 1.10 +++ loncom/html/adm/helper/resettimes.helper 2016/05/31 22:04:14 1.11 @@ -70,6 +70,7 @@ my $courseid=$env{'request.course.id'}; my ($uname,$udom,$sec,$fullname)=split(':',$helper->{'VARS'}{'stu1'}); &Apache::lonnet::logthis($helper->{'VARS'}{'delete'}); + my $needsdeval; foreach my $escsymb (split(/\|\|\|/,$helper->{'VARS'}{'delete'})) { my $symb=&Apache::lonnet::unescape($escsymb); my $key = "$courseid\0$symb"; @@ -103,15 +104,20 @@ if (($userreply->[1] eq 'map') || ($userreply->[1] eq 'resource')) { my %storecontent=($storeunder => $userreply->[0], $storeunder.'.type' => 'date_interval'); - &Apache::lonnet::del - ('resourcedata',[keys(%storecontent)],$udom,$uname); - &Apache::lonparmset::log_parmset(\%storecontent,1,$uname,$udom); + if (&Apache::lonnet::del + ('resourcedata',[keys(%storecontent)],$udom,$uname) eq 'ok') { + &Apache::lonparmset::log_parmset(\%storecontent,1,$uname,$udom); + $needsdeval = 1; + } } } } } } } + if ($needsdeval) { + &Apache::lonnet::devalidateuserresdata($uname,$udom); + } $result=~s/