[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm loncommon.pm lonsimplepage.pm lonsyllabus.pm lontemplate.pm

neumanie neumanie@source.lon-capa.org
Wed, 25 Feb 2009 13:25:52 -0000


This is a MIME encoded message

--neumanie1235568352
Content-Type: text/plain

neumanie		Wed Feb 25 13:25:52 2009 EDT

  Modified files:              
    /loncom/interface	lonaboutme.pm lonsyllabus.pm lonsimplepage.pm 
                     	lontemplate.pm loncommon.pm 
  Log:
  Change desgin in abuotme,sylabus,simplepage
  
  
--neumanie1235568352
Content-Type: text/plain
Content-Disposition: attachment; filename="neumanie-20090225132552.txt"

Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.104 loncom/interface/lonaboutme.pm:1.105
--- loncom/interface/lonaboutme.pm:1.104	Wed Feb 25 13:05:54 2009
+++ loncom/interface/lonaboutme.pm	Wed Feb 25 13:25:52 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Personal Information Page
 #
-# $Id: lonaboutme.pm,v 1.104 2009/02/25 13:05:54 weissno Exp $
+# $Id: lonaboutme.pm,v 1.105 2009/02/25 13:25:52 neumanie Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -194,9 +194,18 @@
     if ($forcestudent eq '') {
         $forceregister = $env{'form.register'};
     }
-       
+
+#------------Get rights
+ my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
+ my %syllabus=&Apache::lonnet::dump('aboutme',$cdom,$cnum);
+    my $allowed=0;
+  my $privleged=$allowed=(($env{'user.name'} eq $cnum) && 
+			       ($env{'user.domain'} eq $cdom));
+       if ($forcestudent or $target eq 'tex') { $allowed=0; } 
+ 
+
 # --------------------------------------- There is such a user, get environment
-    my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
+  
     if ($target ne 'tex') {
 	my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom);
         my $args = {'function' => $forcestudent,
@@ -209,38 +218,55 @@
 	my $start_page = 
 	    &Apache::loncommon::start_page("Personal Information Page",$rss_link,$args);
 	$r->print($start_page);
-        $r->print('<div class="LC_ContentBoxSpecial">');
+        
+    }   
+
+#----------------Print Functions
+	if( $target ne 'tex'){
+		 &Apache::lontemplate::print_start_page_functions($r);
+      		if($allowed){
+			 my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}});		
+			&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));
+    			&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
+		}elsif($privleged){
+			my $query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}});
+			 &Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.$query_string.'">'. &mt('Edit').'</a>');
+		}
+		&Apache::lontemplate::print_functions_content($r,&Apache::lontemplate::send_message($r,$cnum,$cdom));
+
+		if ($env{'request.course.id'} && &Apache::lonnet::allowed('srm',$env{'request.course.id'})	&& &in_course($cdom,$cnum)) {
+			if (&Apache::lonnet::allowed('vsa', $env{'request.course.id'}) || &Apache::lonnet::allowed('vsa', $env{'request.course.id'}.'/'.
+					 $env{'request.course.sec'})) {
+				&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::track_student_link('View recent activity by this student',
+			  	 	$cnum,$cdom).('&nbsp;'x2));
+	    		}
+	    		&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::noteswrapper(&mt('Add Records'),$cnum,$cdom));
+		}
+	&Apache::lontemplate::print_end_page_functions($r);
+	}  
+#------Print Headtitle
+ if ($target ne 'tex') {
+	 $r->print('<div class="LC_ContentBoxSpecial">');
 	$r->print('<h2 class="LC_hcell">'.&Apache::loncommon::plainname($cnum,$cdom).'</h2>');
-    } else {
-	$r->print('\noindent{\large\textbf{'.&Apache::loncommon::plainname($cnum,$cdom).'}}\\\\\\\\');
-    }
-    if ($courseenv{'nickname'}) {
-       $r->print(
-         '<h2>&quot;'.$courseenv{'nickname'}.
-         '&quot;</h2>');
-    }
-    if ($target ne 'tex') {
-        $r->print('<blockquote>');
+	$r->print('<blockquote>');
+	 if ($courseenv{'nickname'}) {
+      	 	$r->print('<h2>&quot;'.$courseenv{'nickname'}.'&quot;</h2>');
+    	}
 	$r->print('<h3>'.&Apache::lonnet::domain($cdom,'description').'</h3>');
-    } else {
-	$r->print('\textbf{'.&Apache::lonnet::domain($cdom,'description').'}\\\\');
-    }
-    my %syllabus=&Apache::lonnet::dump('aboutme',$cdom,$cnum);
-    my $allowed=0;
-
+ }
+else{
+	$r->print('\noindent{\large\textbf{'.&Apache::loncommon::plainname($cnum,$cdom).'}}\\\\\\\\');
+	$r->print('\textbf{'.&Apache::lonnet::domain($cdom,'description').'}\\\\');	
+}
 # does this user have privileges to post, etc?
 
-       my $privleged=$allowed=(($env{'user.name'} eq $cnum) && 
-			       ($env{'user.domain'} eq $cdom));
-       if ($forcestudent or $target eq 'tex') { $allowed=0; }
+     
 	my $query_string; 
 	
-       if ($allowed) {
-          
-	   $r->print('<p><b>'.&mt('Privacy Note').':</b> '.
-		     &mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.'). '</p><p>'.              
-		     &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).'</p>');
-       }     
+       if ($allowed) {          
+	   $r->print('<p><b>'.&mt('Privacy Note').':</b> '.&mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.'). '</p>');
+	} 
+       
 	
       if (($env{'form.uploaddoc.filename'}) &&
           ($env{'form.storeupl'}) && ($allowed)) {
@@ -297,28 +323,7 @@
 	   }
 	
        }
-	#---Print Functions
-	if( $target ne 'tex'){
-		 &Apache::lontemplate::print_start_page_functions($r);
-      		if($allowed){
-			 $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}});		
-			&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));
-    		 }elsif($privleged){
-			$query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}});
-			 &Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.$query_string.'">'. &mt('Edit').'</a>');
-		}
-		&Apache::lontemplate::print_functions_content($r,&Apache::lontemplate::send_message($r,$cnum,$cdom));
-
-		if ($env{'request.course.id'} && &Apache::lonnet::allowed('srm',$env{'request.course.id'})	&& &in_course($cdom,$cnum)) {
-			if (&Apache::lonnet::allowed('vsa', $env{'request.course.id'}) || &Apache::lonnet::allowed('vsa', $env{'request.course.id'}.'/'.
-					 $env{'request.course.sec'})) {
-				&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::track_student_link('View recent activity by this student',
-			  	 	$cnum,$cdom).('&nbsp;'x2));
-	    		}
-	    		&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::noteswrapper(&mt('Add Records'),$cnum,$cdom));
-		}
-	&Apache::lontemplate::print_end_page_functions($r);
-	}
+	
        if ($allowed) {
            $r->print(
 	 '<form method="post" enctype="multipart/form-data">'.
@@ -379,12 +384,9 @@
 	&& &in_course($cdom,$cnum)) {
 	if ($target ne 'tex') {
 	    $r->print('<a name="coursecomment" />');
-	    $r->print('<hr /><h3>'.
-		      &mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'</h3>'.
-		      &mt('Shared by course faculty and staff').
-		      &Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message").
-		      '<br />');
-	    &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);	   
+	   &Apache::lontemplate::print_start_template($r,&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message"),'LC_ContentBoxSpecial');
+	   &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
+	   &Apache::lontemplate::print_end_template($r);
 	    
 	} else {
 	    $r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\');
@@ -545,10 +547,10 @@
             &Apache::lonhtmlcommon::add_breadcrumb
                 ({href=>"/adm/$cdom/$cnum/aboutme".$query_string,
                   text=>&mt('Personal Information Page - [_1]',$name),
-                  title=>&mt('Go to personal information page for [_1]',$name)},                 
-                 {href=>"/adm/$cdom/$cnum/aboutme/portfolio",
-                  text=>&mt('Viewable files - [_1]',$name),
-                  title=>&mt('Viewable portfolio files for [_1]',$name)}
+                  title=>&mt('Go to personal information page for [_1]', $name)},
+		 {href=>"/adm/$cdom/$cnum/aboutme/portfolio",
+                  text=>&mt('Viewable files - [_1]', $name),
+                  title=>&mt('Viewable portfolio files for [_1]', $name)}
             );
             $output .= &Apache::lonhtmlcommon::breadcrumbs(&mt('Viewable portfolio files.'));
         }
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.79 loncom/interface/lonsyllabus.pm:1.80
--- loncom/interface/lonsyllabus.pm:1.79	Fri Feb 20 17:45:40 2009
+++ loncom/interface/lonsyllabus.pm	Wed Feb 25 13:25:52 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.79 2009/02/20 17:45:40 neumanie Exp $
+# $Id: lonsyllabus.pm,v 1.80 2009/02/25 13:25:52 neumanie Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -161,58 +161,8 @@
               ({href=>$r->uri,
                text=>"Course syllabus"});
             $r->print(&Apache::lonhtmlcommon::breadcrumbs());
-        }
-	 $r->print('<div class="LC_ContentBoxSpecial">');
-	$r->print('<h2 class="LC_hcell">'.$courseenv{'description'}.'</h2>'); 
-	$r->print('<blockquote>');       
-	$r->print('<h3>'.  &Apache::lonnet::domain($cdom,'description').'</h3>');
-    } else {
-	$r->print('\noindent{\large\textbf{'.$courseenv{'description'}.'}}\\\\\\\\\textbf{'.
-		  &Apache::lonnet::domain($cdom,'description').'}\\\\');
-    }
-
-# -------------------------------------------------------- Get course personnel
-    my %coursepersonnel=&Apache::lonnet::get_course_adv_roles($cdom.'/'.$cnum);
-    if ($target ne 'tex') {
-	$r->print(&Apache::lonhtmlcommon::start_pick_box());
-    } else {
-	$r->print('\begin{tabular}{|p{0.45\textwidth}|p{0.45\textwidth}|}\hline');
-    }
-    my @personnel=sort(keys(%coursepersonnel));
-    my $lastpers=$personnel[$#personnel];
-    foreach my $element (@personnel) {
-	if ($target ne 'tex') {
-	    $r->print(&Apache::lonhtmlcommon::row_title($element));
-	} else {
-	    $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & '); 
-	}
-        foreach (split(/\,/,$coursepersonnel{$element})) {
-	    my ($puname,$pudom)=split(/\:/,$_);
-	    if ($target ne 'tex') {
-                my $courseperson = &Apache::loncommon::plainname($puname,$pudom);
-                if (($env{'user.name'} eq '') || ($env{'user.name'} eq 'public') ||
-                    ($env{'user.domain'} eq '') || ($env{'user.domain'} eq 'public')) {
-		    $r->print(' '.$courseperson);
-                } else {
-                    $r->print(' '.&Apache::loncommon::aboutmewrapper($courseperson,
-                              $puname,$pudom));
-                }
-	    } else {
-		$r->print(' '.&Apache::loncommon::plainname($puname,
-                              $pudom).' ');
-	    }
-	}
-	if ($target ne 'tex') {
-            my $lastclose=$element eq $lastpers?1:0;
-            $r->print(&Apache::lonhtmlcommon::row_closure($lastclose));
-	} else {
-	    $r->print('\\\\ \hline');
-	}
-    }
-    if ($target ne 'tex') {
-	$r->print(&Apache::lonhtmlcommon::end_pick_box());
-    } else {
-	$r->print('\end{tabular}\\\\');
+        }	
+	
     }
 # ---------------------------------------------------------- Load syllabus info
     my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum);
@@ -232,16 +182,7 @@
 	      $forcestudent='student';
 	  }
           if ($forcestudent or $target eq 'tex') { $allowed=0; }
-       }
-       if ($allowed) {
-          my $protocol = $Apache::lonnet::protocol{$homeserver};
-          $protocol = 'http' if ($protocol ne 'https');
-          $r->print('<p>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).'</p><p>'.&mt('This syllabus can be publicly viewed at')
-		    .' <tt>'.$protocol.'://'.
-		    &Apache::lonnet::hostname($homeserver).$r->uri.'</tt>'.
-               &Apache::loncommon::help_open_topic('Syllabus_ExtLink').'</p>'.
-          '<p>'.&mt('You can specify an external URL as Syllabus in the [_1].','<a href="/adm/parmset?action=crsenv">'.&mt('Course Parameters').'</a>').'</p>');
-      } 
+       }    
        if (($allowed) && ($env{'form.storesyl'})) {
 	   foreach my $syl_field (keys(%syllabusfields)) {
                my $field=$env{'form.'.$syl_field};
@@ -288,6 +229,70 @@
            &Apache::lonnet::put('syllabus',\%syllabus,$cdom,$cnum);
        }
     }
+#--------Functions
+if ($target ne 'tex') {
+		if($allowed || $privileged){		
+		&Apache::lontemplate::print_start_page_functions($r);
+		if($allowed){ 		
+			&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Public View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));	      		
+			&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
+		}elsif($privileged){
+			&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forceedit=1">'.&mt('Edit').'</a>'); 
+		}
+		&Apache::lontemplate::print_end_page_functions($r);
+		}
+ }
+#----------------------------Print Headtitle
+if($target ne 'tex'){
+	$r->print('<h1>'.$courseenv{'description'}.'</h1>'); 	
+	$r->print('<h3>'.  &Apache::lonnet::domain($cdom,'description').'</h3>');
+}else{
+	$r->print('\noindent{\large\textbf{'.$courseenv{'description'}.'}}\\\\\\\\\textbf{'.
+	&Apache::lonnet::domain($cdom,'description').'}\\\\');
+}
+# -------------------------------------------------------- Get course personnel
+    my %coursepersonnel=&Apache::lonnet::get_course_adv_roles($cdom.'/'.$cnum);
+    if ($target ne 'tex') {
+	$r->print(&Apache::lonhtmlcommon::start_pick_box());
+    } else {
+	$r->print('\begin{tabular}{|p{0.45\textwidth}|p{0.45\textwidth}|}\hline');
+    }
+    my @personnel=sort(keys(%coursepersonnel));
+    my $lastpers=$personnel[$#personnel];
+    foreach my $element (@personnel) {
+	if ($target ne 'tex') {
+	    $r->print(&Apache::lonhtmlcommon::row_title($element));
+	} else {
+	    $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & '); 
+	}
+        foreach (split(/\,/,$coursepersonnel{$element})) {
+	    my ($puname,$pudom)=split(/\:/,$_);
+	    if ($target ne 'tex') {
+                my $courseperson = &Apache::loncommon::plainname($puname,$pudom);
+                if (($env{'user.name'} eq '') || ($env{'user.name'} eq 'public') ||
+                    ($env{'user.domain'} eq '') || ($env{'user.domain'} eq 'public')) {
+		    $r->print(' '.$courseperson);
+                } else {
+                    $r->print(' '.&Apache::loncommon::aboutmewrapper($courseperson,
+                              $puname,$pudom));
+                }
+	    } else {
+		$r->print(' '.&Apache::loncommon::plainname($puname,
+                              $pudom).' ');
+	    }
+	}
+	if ($target ne 'tex') {
+            my $lastclose=$element eq $lastpers?1:0;
+            $r->print(&Apache::lonhtmlcommon::row_closure($lastclose));
+	} else {
+	    $r->print('\\\\ \hline');
+	}
+    }
+    if ($target ne 'tex') {
+	$r->print(&Apache::lonhtmlcommon::end_pick_box());
+    } else {
+	$r->print('\end{tabular}\\\\');
+    }
 #----------Print last update
  my $lastmod=$syllabus{'uploaded.lastmodified'};
        $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));
@@ -307,24 +312,24 @@
 		            &Apache::loncommon::plainname($syllabus{'uploaded.name'},$syllabus{'uploaded.domain'})
 		          :'')
 		     .'\\\\');
-       }	
-#--------Functions
-if ($target ne 'tex') {
-		if($allowed || $privileged){		
-		&Apache::lontemplate::print_start_page_functions($r);
-		if($allowed){ 		
-		&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Public View').'</a>'.				&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));	      		
-		}elsif($privileged){
-			&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forceedit=1">'.&mt('Edit').'</a>'); 
-		}
-		&Apache::lontemplate::print_end_page_functions($r);
-		}
- }
+       }
+#---------------------Print Extern URL Course Info
+if( ($allowed) && ($target ne 'tex') ) {
+	my $protocol = $Apache::lonnet::protocol{$homeserver};
+  	$protocol = 'http' if ($protocol ne 'https');
+	$r->print('<p>'.&mt('This syllabus can be publicly viewed at').' <tt>'.$protocol.'://'.&Apache::lonnet::hostname($homeserver).$r->uri.'</tt>'.&Apache::loncommon::help_open_topic('Syllabus_ExtLink').'</p>'.'<p>'.&mt('You can specify an external URL as Syllabus in the [_1].','<a href="/adm/parmset?action=crsenv">'.&mt('Course Parameters').'</a>').'</p>');
+}
 # -------------------------------------------------------------- Announcements?
     my $day = &Apache::lonannounce::showday(time,2,
 			 &Apache::lonannounce::readcalendar($cdom.'_'.$cnum));
-    if ($target ne 'tex') {	
-	&Apache::lontemplate::print_template($r,'RSS Feeds and Blogs',&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit),1,'LC_ContentBoxSpecial');
+    if ($target ne 'tex') {
+	if($allowed){	
+		&Apache::lontemplate::print_template($r,'RSS Feeds and Blogs',&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit),1,'LC_ContentBoxSpecial');
+	}
+	elsif(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){
+		&Apache::lontemplate::print_template($r,'RSS Feeds and Blogs',&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit),1,'LC_ContentBoxSpecial');
+	}
+	
     } else {
 	$r->print(&Apache::lonxml::xmlparse($r,'tex',$day));
     }	
@@ -405,8 +410,6 @@
 	if ($target ne 'tex') {$r->print('</p>');}
     }
     if ($target ne 'tex') {	
-	$r->print('</blockquote>');
-    	$r->print('</div>');		
         if ($env{'form.backto'} eq 'coursecatalog') {
             $r->print('<form name="backtocat" method="post" action="/adm/coursecatalog">'.
                       &Apache::lonhtmlcommon::echo_form_input(['backto','courseid']).
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.71 loncom/interface/lonsimplepage.pm:1.72
--- loncom/interface/lonsimplepage.pm:1.71	Tue Feb 24 18:20:49 2009
+++ loncom/interface/lonsimplepage.pm	Wed Feb 25 13:25:52 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.71 2009/02/24 18:20:49 hauer Exp $
+# $Id: lonsimplepage.pm,v 1.72 2009/02/25 13:25:52 neumanie Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -214,10 +214,7 @@
     }
 
     if ($forcestudent or $target eq 'tex') { $allowed=0; }
-
-    if ($allowed) {
-	$r->print('<p>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')) .'</p>');             
-    } 
+   
     if (($env{'form.uploaddoc.filename'} and $target ne 'tex') &&
 	($env{'form.storeupl'}) && ($allowed)) {
 	if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {
@@ -256,27 +253,13 @@
 	&Apache::lonnet::put($db_name,\%syllabus,$dom,$crs);
     }
 
-# ---------------------------------------------------------------- Get syllabus
-    if ((($syllabus{'uploaded.lastmodified'}) && 
-         (($group ne '' && ($group_home_view || $group_edit_perm ||  
-           $group_view_perm)) || ($group eq ''))) || ($allowed)) {
-	my $image;
-	if ($syllabus{'uploaded.photourl'}) {
-	    &Apache::lonnet::allowuploaded('/adm/smppg',
-					   $syllabus{'uploaded.photourl'});
-	    
-	    $image='<img src="'.$syllabus{'uploaded.photourl'}.'"
-                            />';
-	    if ($target eq 'tex') {
-		$image=&Apache::lonxml::xmlparse($r,'tex',$image);
-            }
-        }
+#---Print Function
 	if ($target ne 'tex') {
 		if($allowed || $privileged){
 			&Apache::lontemplate::print_start_page_functions($r);
 			if($allowed){
-				&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'.
-          											&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));	      		
+				&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));	      		
+				&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes'))); 
 			}elsif($privileged){
 				my $edittext = &mt('Edit');
        		 		if ($group ne '') {
@@ -295,6 +278,23 @@
 			&Apache::lontemplate::print_end_page_functions($r);
 		}
 	  }	
+
+# ---------------------------------------------------------------- Get syllabus
+    if ((($syllabus{'uploaded.lastmodified'}) && 
+         (($group ne '' && ($group_home_view || $group_edit_perm ||  
+           $group_view_perm)) || ($group eq ''))) || ($allowed)) {
+	my $image;
+	if ($syllabus{'uploaded.photourl'}) {
+	    &Apache::lonnet::allowuploaded('/adm/smppg',
+					   $syllabus{'uploaded.photourl'});
+	    
+	    $image='<img src="'.$syllabus{'uploaded.photourl'}.'"
+                            />';
+	    if ($target eq 'tex') {
+		$image=&Apache::lonxml::xmlparse($r,'tex',$image);
+            }
+        }
+	
 	if ($allowed) {
 	    $r->print(
 		      '<form method="post" enctype="multipart/form-data">'.
Index: loncom/interface/lontemplate.pm
diff -u loncom/interface/lontemplate.pm:1.19 loncom/interface/lontemplate.pm:1.20
--- loncom/interface/lontemplate.pm:1.19	Fri Feb 20 17:45:40 2009
+++ loncom/interface/lontemplate.pm	Wed Feb 25 13:25:52 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "Template" Functions to generate html output
 #
-# $Id: lontemplate.pm,v 1.19 2009/02/20 17:45:40 neumanie Exp $
+# $Id: lontemplate.pm,v 1.20 2009/02/25 13:25:52 neumanie Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -127,7 +127,17 @@
 	$r->print('<p>' .$content . '</p>');
 	$r->print('</div>');
 }
-
+sub print_start_template
+{
+	my ($r,$topic,$boxclass) = @_;
+	$r->print('<div class="'.$boxclass.'">');	
+	$r->print('<h4 class="LC_hcell">'.$topic.'</h4>');
+}
+sub print_end_template
+{
+	my ($r) = @_;
+	$r->print('</div>');
+}
 sub print_editbox_template
 {
 	my ($r,$content,$field) = @_;
@@ -144,7 +154,7 @@
 sub print_functions_content
 {
 	my($r,$content) = @_;
-	$r->print('&nbsp'.$content.'&nbsp');
+	$r->print($content.'&nbsp');
 	
 }
 sub print_end_page_functions
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.754 loncom/interface/loncommon.pm:1.755
--- loncom/interface/loncommon.pm:1.754	Wed Feb 25 10:04:20 2009
+++ loncom/interface/loncommon.pm	Wed Feb 25 13:25:52 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.754 2009/02/25 10:04:20 droeschl Exp $
+# $Id: loncommon.pm,v 1.755 2009/02/25 13:25:52 neumanie Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -923,10 +923,8 @@
     }
 
     # Add the text
-    if ($text ne "") {
-	$template .= 
-            "<table bgcolor='#3333AA' cellspacing='1' cellpadding='1' border='0'><tr>".
-            "<td bgcolor='#5555FF'><a target=\"_top\" href=\"$link\"><span style=\"color:#FFFFFF;font-size:10pt;\">$text</span></a>";
+    if ($text ne "") {	
+	$template.="<a style=\"background-color:#3333AA;\" target=\"_top\" href=\"$link\"><span style=\"color:#FFFFFF;\">$text</span></a>";
     }
 
     # Add the graphic
@@ -935,7 +933,7 @@
     $template .= <<"ENDTEMPLATE";
  <a target="_top" href="$link" title="$title"><img src="$helpicon" border="0" alt="(Help: $topic)" /></a>
 ENDTEMPLATE
-    if ($text ne '') { $template.='</td></tr></table>' };
+    
     return $template;
 
 }

--neumanie1235568352--