');
@@ -392,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