--- loncom/interface/lonquickgrades.pm 2011/03/09 00:35:57 1.72 +++ loncom/interface/lonquickgrades.pm 2011/03/11 02:39:53 1.74 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.72 2011/03/09 00:35:57 www Exp $ +# $Id: lonquickgrades.pm,v 1.74 2011/03/11 02:39:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -80,13 +80,31 @@ sub real_handler { &startGradeScreen($r,'quick'); - $r->rflush(); - -# my $uname='korte'; -# my $udom='gerd'; - + my $cangrade=&Apache::lonnet::allowed('mgr'); +# +# Pick student +# my $uname; my $udom; + my $stdid; + if ($cangrade) { + if ($env{'form.uname'}) { $uname=$env{'form.uname'}; } + if ($env{'form.udom'}) { $udom=$env{'form.udom'}; } + if ($env{'form.id'}) { $stdid=$env{'form.id'}; } + if (($stdid) && ($udom)) { + $uname=(&Apache::lonnet::idget($udom,$stdid))[1]; + } + $r->print('
\n"); } &endGradeScreen($r); return OK; @@ -430,19 +449,13 @@ sub outputCategories { &Apache::lonnet::put('grading_categories',\%categories,$cdom,$cnum); } # new categories loaded now -# Form only generated if user can change the grading categories - if ($cangrade) { - $r->print(''); + ''); } } @@ -471,6 +484,11 @@ sub process_category_edits { %categories=&move_down_category($1,$cangrade,%categories); } elsif ($cmd=~/^delcat\_(.+)$/) { %categories=&del_category($1,$cangrade,%categories); + } +# Move to a new position + my $moveid=$env{'form.storemove'}; + if ($moveid) { + %categories=&move_category($moveid,$cangrade,$env{'form.newpos_'.$moveid},%categories); } return %categories; }