--- loncom/html/adm/helper/resettimes.helper 2007/11/20 00:15:31 1.7
+++ loncom/html/adm/helper/resettimes.helper 2012/04/01 16:12:42 1.9
@@ -17,7 +17,7 @@
- This is a list of first access times and what was accessed, plese select those you want deleted.
+ This is a list of first access times and what was accessed, please select those you want deleted.
@@ -72,13 +72,17 @@
&Apache::lonnet::logthis($helper->{'VARS'}{'delete'});
foreach my $escsymb (split(/\|\|\|/,$helper->{'VARS'}{'delete'})) {
my $symb=&Apache::lonnet::unescape($escsymb);
+ my $key = "$courseid\0$symb";
+ my $title =
+ ($symb ne 'course') ? &Apache::lonnet::gettitle($symb)
+ : $env{'course.'.$courseid.'.description'};
my $res=&Apache::lonnet::del('firstaccesstimes',
- ["$courseid\0$symb"],$udom,$uname);
- my $title =
- ($symb ne 'course') ? &Apache::lonnet::gettitle($symb)
- : $env{'course.'.$env{'request.course.id'}.'.description'};
- $result.="Removing access time from ".
- $title.": ".$res.'';
+ [$key],$udom,$uname);
+ $result.="Removing access time from ".
+ $title.": ".$res.'';
+ if ($res eq 'ok') {
+ &Apache::lonnet::del('timerinterval',[$key],$udom,$uname);
+ }
}
$result=~s/$//;
return $result;
@@ -140,8 +144,13 @@
$result.="Removing access times ".
&Apache::lonlocal::locallocaltime($times{$key}).
" found for student ".$fullname.": ";
- $result.=&Apache::lonnet::del('firstaccesstimes',
+ my $delres=&Apache::lonnet::del('firstaccesstimes',
[$key],$udom,$uname);
+ $result.=$delres;
+ if ($delres eq 'ok') {
+ &Apache::lonnet::del('timerinterval',
+ [$key],$udom,$uname);
+ }
}
$result.="\n";
}