--- loncom/interface/lonquickgrades.pm 2011/01/10 00:06:28 1.62
+++ loncom/interface/lonquickgrades.pm 2011/01/21 16:28:32 1.64
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id: lonquickgrades.pm,v 1.62 2011/01/10 00:06:28 www Exp $
+# $Id: lonquickgrades.pm,v 1.64 2011/01/21 16:28:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -141,6 +141,9 @@ sub startGradeScreen {
&mt('Spreadsheet (Detailed)').'');
}
if ($allowed_to_view) {
+ $r->print("\n".'
'.
+ &mt('Statistics and Reports').'');
+
$r->print("\n".''.
&mt('Assessment Overview Chart').'');
@@ -405,12 +408,31 @@ sub outputCategories {
$navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_;
# Take care of storing and retrieving categories
+ my $cangrade=&Apache::lonnet::allowed('mgr');
+
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
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
-
+# Form only generated if user can change the grading categories
+ if ($cangrade) {
+ $r->print('');
+ }
}
# Pass this two refs to arrays for the start and end color, and a number