Diff for /loncom/interface/lonparmset.pm between versions 1.139.2.1 and 1.139.2.2

version 1.139.2.1, 2003/12/09 22:40:46 version 1.139.2.2, 2003/12/12 19:41:11
Line 1759  ENDOVER Line 1759  ENDOVER
  }   }
     }      }
 # Store  # Store
     &Apache::lonnet::del('resourcedata',\@deldata,$dom,$crs);      my $delentries=$#deldata+1;
     &Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs);      my @newdatakeys=keys %newdata;
       my $putentries=$#newdatakeys+1;
       if ($delentries) {
    if (&Apache::lonnet::del('resourcedata',\@deldata,$dom,$crs) eq 'ok') {
       $r->print('<h2>'.&mt('Deleted [_1] parameter(s)</h2>',$delentries));
    } else {
       $r->print('<h2><font color="red">'.
         &mt('Error deleting parameters').'</font></h2>');
    }
       }
       if ($putentries) {
    if (&Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs) eq 'ok') {
       $r->print('<h2>'.&mt('Stored [_1] parameter(s)</h2>',$putentries));
    } else {
       $r->print('<h2><font color="red">'.
         &mt('Error storing parameters').'</font></h2>');
    }
       }
 # Read and display  # Read and display
     my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs);      my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs);
     my $oldsection='';      my $oldsection='';
Line 1768  ENDOVER Line 1785  ENDOVER
     my $oldpart='';      my $oldpart='';
     my $pointer=0;      my $pointer=0;
     $tableopen=0;      $tableopen=0;
       my $foundkeys=0;
     foreach my $thiskey (sort keys %resourcedata) {      foreach my $thiskey (sort keys %resourcedata) {
  if ($resourcedata{$thiskey.'.type'}) {   if ($resourcedata{$thiskey.'.type'}) {
     my ($course,$middle,$part,$name)=      my ($course,$middle,$part,$name)=
Line 1805  ENDOVER Line 1823  ENDOVER
     $r->print(&tablestart().'<tr><td><b>'.$name.      $r->print(&tablestart().'<tr><td><b>'.$name.
       ':</b></td><td><input type="checkbox" name="del_'.        ':</b></td><td><input type="checkbox" name="del_'.
       $thiskey.'" /></td><td>');        $thiskey.'" /></td><td>');
       $foundkeys++;
     if ($resourcedata{$thiskey.'.type'}=~/^date/) {      if ($resourcedata{$thiskey.'.type'}=~/^date/) {
  my $jskey='key_'.$pointer;   my $jskey='key_'.$pointer;
  $pointer++;   $pointer++;
Line 1823  ENDOVER Line 1842  ENDOVER
  }   }
     }      }
           
     $r->print(&tableend().      $r->print(&tableend().'<p>'.
       '<p><input type="submit" value="'.&mt('Modify Parameters').'" /></p></form></body></html>');   ($foundkeys?'<input type="submit" value="'.&mt('Modify Parameters').'" />':&mt('There are no course or section parameters.')).'</p></form></body></html>');
 }  }
   
 ##################################################  ##################################################

Removed from v.1.139.2.1  
changed lines
  Added in v.1.139.2.2


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