--- loncom/interface/lonparmset.pm 2006/04/13 21:32:23 1.285 +++ loncom/interface/lonparmset.pm 2006/04/14 11:55:58 1.286 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.285 2006/04/13 21:32:23 albertel Exp $ +# $Id: lonparmset.pm,v 1.286 2006/04/14 11:55:58 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -400,7 +400,7 @@ sub storeparm_by_symb { my ($symb,$spnam,$snum,$nval,$ntype,$uname,$udom,$csec,$cgroup)=@_; $logid++; my $id=time().'00000'.$$.'00000'.$logid; - &Apache::lonnet::put('parameterlog', + &Apache::lonnet::put('nohist_parameterlog', { $id.'_exe_uname' => $env{'user.name'}, $id.'_exe_udom' => $env{'user.domain'}, @@ -3319,6 +3319,115 @@ ENDYESNO sub parm_change_log { my ($r)=@_; &startpage($r); + + my @ids=(); + my %symbp=(); + my %mapp=(); + my %typep=(); + my %keyp=(); + my %uris=(); + my %maptitles=(); + +# -------------------------------------------------------- Variable declaration + + my %allmaps=(); + my %alllevs=(); + + my $uname; + my $udom; + my $uhome; + my $csec; + my $cgroup; + my $grouplist; + my @usersgroups = (); + + my $coursename=$env{'course.'.$env{'request.course.id'}.'.description'}; + + $alllevs{'Resource Level'}='full'; + $alllevs{'Map/Folder Level'}='map'; + $alllevs{'Course Level'}='general'; + + my %allparms; + my %allparts; + my %keyorder; +# --------------------------------------------------------- Get all assessments + &extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, + \%mapp, \%symbp,\%maptitles,\%uris, + \%keyorder); + + $mapp{'0.0'} = ''; + $symbp{'0.0'} = ''; + + my %level=&Apache::lonlocal::texthash('parmlevel_14' => 'General Course', + 'parmlevel_13' => 'Map or Folder level in course', + 'parmlevel_12' => 'Resource default', + 'parmlevel_11' => 'Map default', + 'parmlevel_10' => 'Resource level in course', + 'parmlevel_9' => 'General for section', + 'parmlevel_8' => 'Map or Folder level for section', + 'parmlevel_7' => 'Resource level in section', + 'parmlevel_6' => 'General for group', + 'parmlevel_5' => 'Map or Folder level for group', + 'parmlevel_4' => 'Resource level in group', + 'parmlevel_3' => 'General for specific student', + 'parmlevel_2' => 'Map or Folder level for specific student', + 'parmlevel_1' => 'Resource level for specific student'); + +# $id.'_exe_uname' => $env{'user.name'}, +# $id.'_exe_udom' => $env{'user.domain'}, +# $id.'_exe_time' => time(), +# $id.'_exe_ip' => $ENV{'REMOTE_ADDR'}, +# $id.'_symb' => $symb, +# $id.'_spnam' => $spnam, +# $id.'_snum' => $snum, +# $id.'_nval' => $nval, +# $id.'_ntype' => $ntype, +# $id.'_uname' => $uname, +# $id.'_udom' => $udom, +# $id.'_csec' => $csec, +# $id.'_cgroup' => $cgroup + my %parmlog=&Apache::lonnet::dump('nohist_parameterlog', + $env{'course.'.$env{'request.course.id'}.'.domain'}, + $env{'course.'.$env{'request.course.id'}.'.num'}); + my %exetime=(); + foreach my $key (keys %parmlog) { + if ($key=~/^(.+)\_exe\_time$/) { + $exetime{$1}=$parmlog{$key}; + } + } + $r->print('
'. + &Apache::lonlocal::locallocaltime($parmlog{$id.'_exe_time'}). + ' | '.
+ &Apache::loncommon::aboutmewrapper(
+ &Apache::loncommon::plainname($parmlog{$id.'_exe_uname'},
+ $parmlog{$id.'_exe_udom'}),
+ $parmlog{$id.'_exe_uname'},
+ $parmlog{$id.'_exe_udom'}).' '. + $parmlog{$id.'_exe_uname'}.'@'.$parmlog{$id.'_exe_udom'}.''. + ((($parmlog{$id.'_exe_uname'} ne $env{'user.name'}) || + ($parmlog{$id.'_exe_udom'} ne $env{'user.domain'}))? + ' '.&Apache::loncommon::messagewrapper(&mt('Send message'), + $parmlog{$id.'_exe_uname'}, + $parmlog{$id.'_exe_udom'}):''). + ' | '. + $level{'parmlevel_'.$parmlog{$id.'_snum'}}. + ' | '.
+ &mt($allparms{$name}).' '.$name.''. + ' | '. + ($part?&mt('Part: [_1]',$part):&mt('All parts')). + ' | '. + $parmlog{$id.'_symb'}. + ' | '. + ($parmlog{$id.'_nval'}? + (&isdateparm($spnam)?&Apache::lonlocal::locallocaltime($parmlog{$id.'_nval'}):$parmlog{$id.'_nval'}) + :&mt('Deleted Parameter')). + ' |