Diff for /loncom/interface/lonparmset.pm between versions 1.350.2.1 and 1.350.2.4

version 1.350.2.1, 2006/12/14 20:08:15 version 1.350.2.4, 2007/01/06 14:52:30
Line 272  sub resetrulescache { Line 272  sub resetrulescache {
   
 sub rulescache {  sub rulescache {
     my $id=shift;      my $id=shift;
     if ($rulesid ne $env{'request.course.id'}) {      if ($rulesid ne $env{'request.course.id'}
  && !defined($rules{$id})) {   && !defined($rules{$id})) {
  my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};   my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
  my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};   my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
Line 3728  sub parm_change_log { Line 3728  sub parm_change_log {
  }   }
  if ($last) { ($folder) = &Apache::lonnet::decode_symb($last); }   if ($last) { ($folder) = &Apache::lonnet::decode_symb($last); }
     }      }
     foreach my $id (sort { $parmlog{$b}{'exe_time'}<=>$parmlog{$a}{'exe_time'} } (keys(%parmlog))) {      foreach my $id (sort 
       {
    if ($parmlog{$b}{'exe_time'} ne $parmlog{$a}{'exe_time'}) {
       return $parmlog{$b}{'exe_time'} <=>$parmlog{$a}{'exe_time'}
    }
    my $aid = (split('00000',$a))[-1];
    my $bid = (split('00000',$b))[-1];
    return $bid<=>$aid;
       } (keys(%parmlog))) {
         my @changes=keys(%{$parmlog{$id}{'logentry'}});          my @changes=keys(%{$parmlog{$id}{'logentry'}});
  my $count = 0;   my $count = 0;
  my $time =   my $time =
Line 3836  sub parm_change_log { Line 3844  sub parm_change_log {
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
 }  }
   
   sub check_for_course_info {
       my $navmap = Apache::lonnavmaps::navmap->new();
       return 1 if ($navmap);
       return 0;
   }
   
 ##################################################  ##################################################
 ##################################################  ##################################################
   
Line 3879  sub handler { Line 3893  sub handler {
  (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) ||   (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) ||
  &Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'.   &Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'.
   $env{'request.course.sec'}));    $env{'request.course.sec'}));
     if ($env{'request.course.id'} &&  $parm_permission) {      my $exists = &check_for_course_info();
   
       if ($env{'request.course.id'} &&  $parm_permission && $exists) {
   
         # Start Page          # Start Page
         &Apache::loncommon::content_type($r,'text/html');          &Apache::loncommon::content_type($r,'text/html');
Line 3949  sub handler { Line 3965  sub handler {
  }          }       
     } else {      } else {
 # ----------------------------- Not in a course, or not allowed to modify parms  # ----------------------------- Not in a course, or not allowed to modify parms
  $env{'user.error.msg'}=   if ($exists) {
     "/adm/parmset:opa:0:0:Cannot modify assessment parameters";      $env{'user.error.msg'}=
    "/adm/parmset:opa:0:0:Cannot modify assessment parameters";
    } else {
       $env{'user.error.msg'}=
    "/adm/parmset::0:1:Course environment gone, reinitialize the course";
    }
  return HTTP_NOT_ACCEPTABLE;   return HTTP_NOT_ACCEPTABLE;
     }      }
     return OK;      return OK;

Removed from v.1.350.2.1  
changed lines
  Added in v.1.350.2.4


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