[LON-CAPA-cvs] cvs: loncom /interface lonquickgrades.pm
raeburn
raeburn@source.lon-capa.org
Mon, 03 Jan 2011 14:39:19 -0000
raeburn Mon Jan 3 14:39:19 2011 EDT
Modified files:
/loncom/interface lonquickgrades.pm
Log:
- Coding style.
- Separate content generation from presentation.
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.60 loncom/interface/lonquickgrades.pm:1.61
--- loncom/interface/lonquickgrades.pm:1.60 Mon Jan 3 14:19:39 2011
+++ loncom/interface/lonquickgrades.pm Mon Jan 3 14:39:19 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id: lonquickgrades.pm,v 1.60 2011/01/03 14:19:39 raeburn Exp $
+# $Id: lonquickgrades.pm,v 1.61 2011/01/03 14:39:19 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -121,12 +121,13 @@
my $allowed_to_edit = &Apache::lonnet::allowed('mgr',$env{'request.course.id'});
if ($allowed_to_view) {
- $r->print('<div class="LC_head_subbox">');
- 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').'</div>');
+ 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)));
}