[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm /interface loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 08 Nov 2005 20:23:41 -0000


albertel		Tue Nov  8 15:23:41 2005 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
    /loncom/interface	loncommon.pm 
  Log:
  - trying to start using more css so as to make it easier to muck with the visuls
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.219 loncom/homework/lonhomework.pm:1.220
--- loncom/homework/lonhomework.pm:1.219	Tue Nov  8 12:53:20 2005
+++ loncom/homework/lonhomework.pm	Tue Nov  8 15:23:27 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.219 2005/11/08 17:53:20 www Exp $
+# $Id: lonhomework.pm,v 1.220 2005/11/08 20:23:27 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -659,7 +659,7 @@
     foreach my $part (sort(keys(%allparts))) {
 	if (defined(@{ $overall{$part.'.answer'} })) {
 	    my $num_cols=scalar(@{ $overall{$part.'.answer'}->[0] });
-	    $request->print('<table border="1"><tr><th colspan="'.($num_cols+1).'">'.&mt('Part').' '.$part.'</th></tr>');
+	    $request->print('<table border="1" class="thinborder"><tr><th colspan="'.($num_cols+1).'">'.&mt('Part').' '.$part.'</th></tr>');
 	    my %frequency;
 	    foreach my $answer (sort {$a->[0] <=> $b->[0]} (@{ $overall{$part.'.answer'} })) {
 		$frequency{join("\0",@{ $answer })}++;
@@ -667,9 +667,9 @@
 	    $request->print('<tr><th colspan="'.($num_cols).'">'.&mt('Answer').'</th><th>'.&mt('Frequency').'<br />('
 			    .&mt('click for example').')</th></tr>');
 	    foreach my $answer (sort {(split("\0",$a))[0] <=> (split("\0",$b))[0]} (keys(%frequency))) {
-		$request->print('<tr><td>'.
-				join('</td><td>',split("\0",$answer)).
-				'</td><td><a href="'.$request->uri.'?rndseed='.$seedexample{$answer}.'">'.$frequency{$answer}.
+		$request->print('<tr><td class="center">'.
+				join('</td><td class="center">',split("\0",$answer)).
+				'</td><td class="center"><a href="'.$request->uri.'?rndseed='.$seedexample{$answer}.'">'.$frequency{$answer}.
 				'</a></td></tr>');
 	    }
 	    $request->print('</table>');
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.284 loncom/interface/loncommon.pm:1.285
--- loncom/interface/loncommon.pm:1.284	Mon Nov  7 22:12:35 2005
+++ loncom/interface/loncommon.pm	Tue Nov  8 15:23:41 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.284 2005/11/08 03:12:35 albertel Exp $
+# $Id: loncommon.pm,v 1.285 2005/11/08 20:23:41 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2774,6 +2774,10 @@
 <style type="text/css">
 h1, h2, h3, th { font-family: Arial, Helvetica, sans-serif }
 a:focus { color: red; background: yellow } 
+table.thinborder { border-collapse: collapse; }
+table.thinborder tr th { border-style: solid; border-width: 1px}
+table.thinborder tr td { border-style: solid; border-width: 1px}
+.center { text-align: center; }
 </style>
 <body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link"
 style="margin-top: 0px;$addstyle" $addentries>
@@ -2882,7 +2886,7 @@
     #
     return(<<ENDBODY);
 $bodytag
-<table width="100%" cellspacing="0" border="0" cellpadding="0">
+<table class="thinborder" width="100%" cellspacing="0" border="0" cellpadding="0">
 <tr><td bgcolor="$sidebg">
 $upperleft</td>
 <td bgcolor="$sidebg" align="right">$messages&nbsp;</td>