[LON-CAPA-cvs] cvs: loncom /interface lonsyllabus.pm

droeschl droeschl@source.lon-capa.org
Wed, 02 Sep 2009 12:39:26 -0000


droeschl		Wed Sep  2 12:39:26 2009 EDT

  Modified files:              
    /loncom/interface	lonsyllabus.pm 
  Log:
  - bug #6009 Syllabus is printable now 
  - code style
  
  
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.93 loncom/interface/lonsyllabus.pm:1.94
--- loncom/interface/lonsyllabus.pm:1.93	Thu Jun 11 16:48:33 2009
+++ loncom/interface/lonsyllabus.pm	Wed Sep  2 12:39:26 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.93 2009/06/11 16:48:33 bisitz Exp $
+# $Id: lonsyllabus.pm,v 1.94 2009/09/02 12:39:26 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -230,24 +230,26 @@
     }
 
 #--------Functions
-if( $allowed || $privileged) {
-    my $functions=&Apache::lonhtmlcommon::start_funclist();
-    if ($allowed) {
-        $functions.=&Apache::lonhtmlcommon::add_item_funclist(
-                        '<a href="'.$r->uri.'?forcestudent=1">'
-                       .&mt('Show Public View').'</a>'
-                       .&Apache::loncommon::help_open_topic(
-                            'Uploaded_Templates_PublicView'));
+    if( ($allowed || $privileged) && $target ne 'tex') {
+        my $functions=&Apache::lonhtmlcommon::start_funclist();
+
+        if ($allowed) {
+            $functions.=&Apache::lonhtmlcommon::add_item_funclist(
+                          '<a href="'.$r->uri.'?forcestudent=1">'
+                           .&mt('Show Public View').'</a>'
+                           .&Apache::loncommon::help_open_topic(
+                                'Uploaded_Templates_PublicView'));
         } elsif ($privileged) {
             $functions.=&Apache::lonhtmlcommon::add_item_funclist(
-                            '<a href="'.$r->uri.'?forceedit=1">'
-                           .&mt('Edit').'</a>');
+                           '<a href="'.$r->uri.'?forceedit=1">'
+                            .&mt('Edit').'</a>');
         }
+
         $functions.=&Apache::lonhtmlcommon::end_funclist();
         $r->print(&Apache::loncommon::head_subbox($functions));
     }
 
-#---------------------Print External URL Syllabus Info
+#---------------------Print External URL Syllabus Info and Help Text
     if( ($allowed) && ($target ne 'tex') ) {
         my $protocol = $Apache::lonnet::protocol{$homeserver};
           $protocol = 'http' if ($protocol ne 'https');
@@ -261,14 +263,12 @@
                      ,'<a href="/adm/parmset?action=crsenv">','</a>')
                  .'</p>'
         );
+        #-Print Help Text
+        $r->print(&Apache::loncommon::help_open_topic( 
+                        'Uploaded_Templates_TextBoxes',
+                        &mt('Help with filling in text boxes')));
     }
 
-#-Print Help Text
-    if ($target ne 'tex') {
-        if ($allowed) {
-            $r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
-        }
-    }
 #----------Print last update
     my $lastmod=$syllabus{'uploaded.lastmodified'};
     $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));