Diff for /loncom/interface/lonquickgrades.pm between versions 1.63 and 1.64

version 1.63, 2011/01/17 00:19:38 version 1.64, 2011/01/21 16:28:32
Line 408  sub outputCategories { Line 408  sub outputCategories {
            $navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_;             $navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_;
 # Take care of storing and retrieving categories  # Take care of storing and retrieving categories
   
       my $cangrade=&Apache::lonnet::allowed('mgr');
   
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};      my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
       my %categories=();
   # Storing
       if (($cangrade) && ($env{'form.storechanges'})) {
   
     my %categories=&Apache::lonnet::dump('grading_categories',$cdom,$cnum);  # Actually store
           &Apache::lonnet::put('grading_categories',\%categories,$cdom,$cnum);
       } else {
   # Loading
           %categories=&Apache::lonnet::dump('grading_categories',$cdom,$cnum);
       }
 # categories loaded now  # categories loaded now
   # Form only generated if user can change the grading categories
      if ($cangrade) {
         $r->print('<form method="post">');
      }
   #
   # Business logic here
   #
      if ($cangrade) {
         $r->print('<input type="submit" name="storechanges" value="'.&mt("Save changes to grading categories").'" /></form>');
      }
 }  }
   
 # Pass this two refs to arrays for the start and end color, and a number  # Pass this two refs to arrays for the start and end color, and a number

Removed from v.1.63  
changed lines
  Added in v.1.64


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