[LON-CAPA-cvs] cvs: loncom(loncapaMITrelate_1) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Fri Mar 2 22:07:24 EST 2012


raeburn		Sat Mar  3 03:07:24 2012 EDT

  Modified files:              (Branch: loncapaMITrelate_1)
    /loncom/interface	loncommon.pm 
  Log:
  - Customization for MITrelate
    - css style to exclude LON-CAPA inline menu etc. when printing LON-CAPA 
      content pages directly from web browser. <style> tag from Stefan Droeschler. 
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.948.2.33.2.1 loncom/interface/loncommon.pm:1.948.2.33.2.2
--- loncom/interface/loncommon.pm:1.948.2.33.2.1	Thu Feb  9 00:45:40 2012
+++ loncom/interface/loncommon.pm	Sat Mar  3 03:07:23 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.948.2.33.2.1 2012/02/09 00:45:40 raeburn Exp $
+# $Id: loncommon.pm,v 1.948.2.33.2.2 2012/03/03 03:07:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6780,6 +6780,7 @@
     if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); }
     $result .= '<title> LON-CAPA '.$title.'</title>'
 	.'<link rel="stylesheet" type="text/css" href="'.$url.'" />'
+        .&printstyle() 
 	.$head_extra;
     return $result;
 }
@@ -6803,6 +6804,21 @@
     return $headerstring;
 }
 
+sub printstyle {
+    return <<"ENDSTYLE";
+<style type="text/css" media="print">
+                #LC_breadcrumbs, 
+                .LC_head_subbox,
+                #LC_secondary_menu,
+                .LC_discussion,
+                .LC_feedback_link,
+                .LC_primary_menu { display: none; } 
+                form[name="lonhomework"] { clear: both; display: block; padding-top: 3em !important; }
+</style>
+ENDSTYLE
+
+}
+
 =pod
 
 =item * &xml_begin()




More information about the LON-CAPA-cvs mailing list