--- loncom/interface/lonquickgrades.pm 2010/12/04 15:02:31 1.59
+++ 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.59 2010/12/04 15:02:31 www Exp $
+# $Id: lonquickgrades.pm,v 1.64 2011/01/21 16:28:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -121,18 +121,19 @@ sub startGradeScreen {
my $allowed_to_edit = &Apache::lonnet::allowed('mgr',$env{'request.course.id'});
if ($allowed_to_view) {
- $r->print('
');
- if ($notshowTotals) { $r->print (' '.&mt('Students do not see total points.').' '); }
- if ($notshowSPRSlink){ $r->print (' '.&mt('Students do not see link to spreadsheet.').' '); }
- if ($showPoints) { $r->print (' '.&mt('Students will see points based on problem weights.').' '); }
- if ($showCategories) { $r->print (' '.&mt('Students will see points based on categories.').' '); }
- $r->print(' '.&Apache::lonhtmlcommon::coursepreflink(&mt('Grade display settings'),'grading').'
');
+ my @notes;
+ push(@notes,&mt('Students do not see total points.')) if ($notshowTotals);
+ push(@notes,&mt('Students do not see link to spreadsheet.')) if ($notshowSPRSlink);
+ push(@notes,&mt('Students will see points based on problem weights.')) if ($showPoints);
+ push(@notes,&mt('Students will see points based on categories.')) if ($showCategories);
+ push(@notes, &Apache::lonhtmlcommon::coursepreflink(&mt('Grade display settings'),'grading'));
+ $r->print(&Apache::loncommon::head_subbox(join(' ',@notes)));
}
$r->print("\n".'');
$r->print("\n".'- '.
- ($showPoints?&mt('Points Overview'):($showCategories?&mt('Grades Overview'):&mt('Completion Overview'))).
+ ($showPoints?&mt('Individual Points Overview'):($showCategories?&mt('Grades Overview'):&mt('Completion Overview'))).
'
');
if (!($showPoints || $notshowSPRSlink) || ($allowed_to_view)) {
@@ -140,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').'
');
@@ -402,6 +406,33 @@ sub outputCategories {
my ($r,$showPoints,$notshowTotals,
$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'})) {
+
+# 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