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

bisitz bisitz@source.lon-capa.org
Fri, 27 Mar 2009 13:50:37 -0000


This is a MIME encoded message

--bisitz1238161837
Content-Type: text/plain

bisitz		Fri Mar 27 13:50:37 2009 EDT

  Modified files:              
    /loncom/interface	lontemplate.pm lonaboutme.pm lonsimplepage.pm 
                     	lonsyllabus.pm 
  Log:
  Optimized names for sub routines which create functionslists:
  - Standarized/more consistent compared to exisiting routine names (e.g., start_data_table)
  - Betting fitting with regard to routine's functionality
  - No misunderstood connection to start_page routine anymore
  
  
--bisitz1238161837
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20090327135037.txt"

Index: loncom/interface/lontemplate.pm
diff -u loncom/interface/lontemplate.pm:1.26 loncom/interface/lontemplate.pm:1.27
--- loncom/interface/lontemplate.pm:1.26	Fri Mar 27 12:26:10 2009
+++ loncom/interface/lontemplate.pm	Fri Mar 27 13:50:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "Template" Functions to generate html output
 #
-# $Id: lontemplate.pm,v 1.26 2009/03/27 12:26:10 bisitz Exp $
+# $Id: lontemplate.pm,v 1.27 2009/03/27 13:50:36 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -143,20 +143,23 @@
            '</textarea><br /><input type="submit" name="storesyl" value="'.
                            &mt('Save All').'" />');
 }
-sub print_start_page_functions
-{
+
+# Functionslist: List of functions
+# Typically used to display a list of available functions at top of page
+sub start_functionslist {
 	my($r)=@_;	
 	$r->print('<fieldset><legend>'. &mt('Functions') . '</legend>');	
 	$r->print('<ul class="LC_functionslist">');	
 }
-sub print_functions_content
-{
+
+sub item_functionslist {
 	my($r,$content) = @_;
 	$r->print('<li>'.$content.'</li>');	
 }
-sub print_end_page_functions
-{
+
+sub end_functionslist {
 	my($r)=@_;
 	$r->print('</ul></fieldset>');
 }
+
 1;
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.117 loncom/interface/lonaboutme.pm:1.118
--- loncom/interface/lonaboutme.pm:1.117	Fri Mar 27 04:59:30 2009
+++ loncom/interface/lonaboutme.pm	Fri Mar 27 13:50:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Personal Information Page
 #
-# $Id: lonaboutme.pm,v 1.117 2009/03/27 04:59:30 raeburn Exp $
+# $Id: lonaboutme.pm,v 1.118 2009/03/27 13:50:36 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -239,31 +239,31 @@
 
 #----------------Print Functions
 	if( $target ne 'tex'){
-		 &Apache::lontemplate::print_start_page_functions($r);
+		 &Apache::lontemplate::start_functionslist($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::item_functionslist($r,'<a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));
     		}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::item_functionslist($r,'<a href="'.$r->uri.$query_string.'">'. &mt('Edit').'</a>');
 		}
-		&Apache::lontemplate::print_functions_content($r,&Apache::lontemplate::send_message($r,$cnum,$cdom));
+		&Apache::lontemplate::item_functionslist($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',
+				&Apache::lontemplate::item_functionslist($r,&Apache::loncommon::track_student_link('View recent activity by this student',
 			  	 	$cnum,$cdom).('&nbsp;'x2));
 	    		}
                         if (&Apache::lonnet::allowed('vgr', $env{'request.course.id'}) || 
                             &Apache::lonnet::allowed('vgr', $env{'request.course.id'}.'/'.
                                                      $env{'request.course.sec'})) {
-                            &Apache::lontemplate::print_functions_content($r,&Apache::loncommon::slot_reservations_link('Slot reservation history',
+                            &Apache::lontemplate::item_functionslist($r,&Apache::loncommon::slot_reservations_link('Slot reservation history',
                                         $cnum,$cdom).('&nbsp;'x2));
                         }
-	    		&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::noteswrapper(&mt('Add Records'),$cnum,$cdom));
+	    		&Apache::lontemplate::item_functionslist($r,&Apache::loncommon::noteswrapper(&mt('Add Records'),$cnum,$cdom));
 		}
-	&Apache::lontemplate::print_end_page_functions($r);
+	&Apache::lontemplate::end_functionslist($r);
 	}  
 #------Print Headtitle
  if ($target ne 'tex') {
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.75 loncom/interface/lonsimplepage.pm:1.76
--- loncom/interface/lonsimplepage.pm:1.75	Sun Mar  8 21:49:33 2009
+++ loncom/interface/lonsimplepage.pm	Fri Mar 27 13:50:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.75 2009/03/08 21:49:33 weissno Exp $
+# $Id: lonsimplepage.pm,v 1.76 2009/03/27 13:50:36 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -262,25 +262,25 @@
 #---Print Function
 	if ($target ne 'tex') {
 		if($allowed || $privileged){
-			&Apache::lontemplate::print_start_page_functions($r);
+			&Apache::lontemplate::start_functionslist($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::item_functionslist($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));	      		
 			}elsif($privileged){
 				my $edittext = &mt('Edit');
        		 		if ($group ne '') {
             				$edittext = &mt('Edit Group Homepage');
         			}
-				&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forceedit=edit'.$refarg.'">'.$edittext.'</a>');
+				&Apache::lontemplate::item_functionslist($r,'<a href="'.$r->uri.'?forceedit=edit'.$refarg.'">'.$edittext.'</a>');
         			if ($group ne '') {
             				if ($group_edit_perm) {
-               				 	&Apache::lontemplate::print_functions_content($r,'&nbsp;&nbsp;&nbsp;'.
+               				 	&Apache::lontemplate::item_functionslist($r,'&nbsp;&nbsp;&nbsp;'.
                					'<a href="/adm/coursegroups?action=modify&amp;refpage=grouplist'.
                					'&amp;state=pick_task&amp;groupname='.$group.'">'.
                					&mt('Edit Group Settings').'</a>');
            				}
       	 	 		}		    
 			}
-			&Apache::lontemplate::print_end_page_functions($r);
+			&Apache::lontemplate::end_functionslist($r);
 		}
 	  }	
 
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.82 loncom/interface/lonsyllabus.pm:1.83
--- loncom/interface/lonsyllabus.pm:1.82	Sat Mar  7 15:07:09 2009
+++ loncom/interface/lonsyllabus.pm	Fri Mar 27 13:50:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.82 2009/03/07 15:07:09 neumanie Exp $
+# $Id: lonsyllabus.pm,v 1.83 2009/03/27 13:50:36 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -238,13 +238,13 @@
 #--------Functions
 if ($target ne 'tex') {
 		if($allowed || $privileged){		
-		&Apache::lontemplate::print_start_page_functions($r);
+		&Apache::lontemplate::start_functionslist($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::item_functionslist($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::item_functionslist($r,'<a href="'.$r->uri.'?forceedit=1">'.&mt('Edit').'</a>'); 
 		}
-		&Apache::lontemplate::print_end_page_functions($r);
+		&Apache::lontemplate::end_functionslist($r);
 		}
  }
 #----------------------------Print Headtitle

--bisitz1238161837--