[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmenu.pm lonsearchcat.pm lonsimplepage.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 07 Apr 2006 21:56:05 -0000


albertel		Fri Apr  7 17:56:05 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonmenu.pm lonsearchcat.pm 
                     	lonsimplepage.pm 
  Log:
  - trying to move APache::Constats dependency from loncommon.pm
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.326 loncom/interface/loncommon.pm:1.327
--- loncom/interface/loncommon.pm:1.326	Thu Apr  6 16:52:58 2006
+++ loncom/interface/loncommon.pm	Fri Apr  7 17:56:00 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.326 2006/04/06 20:52:58 albertel Exp $
+# $Id: loncommon.pm,v 1.327 2006/04/07 21:56:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -58,7 +58,6 @@
 use Apache::lonnet;
 use GDBM_File;
 use POSIX qw(strftime mktime);
-use Apache::Constants qw(:common :http :methods);
 use Apache::lonmenu();
 use Apache::lonlocal;
 use HTML::Entities;
@@ -3202,7 +3201,7 @@
 	&Apache::loncommon::end_page();
     if (ref($r)) {
 	$r->print($page);
-	return OK;
+	return;
     }
     return $page;
 }
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.169 loncom/interface/lonmenu.pm:1.170
--- loncom/interface/lonmenu.pm:1.169	Wed Mar 29 15:07:00 2006
+++ loncom/interface/lonmenu.pm	Fri Apr  7 17:56:01 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.169 2006/03/29 20:07:00 raeburn Exp $
+# $Id: lonmenu.pm,v 1.170 2006/04/07 21:56:01 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1188,7 +1188,7 @@
 
 sub serverform {
     return(<<ENDSERVERFORM);
-<form name="server" action="/adm/logout" method="post" target="_top">
+<form name="server" action="/adm/logout" method="POST" target="_top">
 <input type="hidden" name="postdata" value="none" />
 <input type="hidden" name="command" value="none" />
 <input type="hidden" name="url" value="none" />
@@ -1199,14 +1199,14 @@
 
 sub constspaceform {
     return(<<ENDCONSTSPACEFORM);
-<form name="constspace" action="/adm/logout" method="post" target="_top">
+<form name="constspace" action="/adm/logout" method="POST" target="_top">
 <input type="hidden" name="filename" value="" />
 </form>
-<form name="cstrdelete" action="/adm/cfile" method="post" target="_top">
+<form name="cstrdelete" action="/adm/cfile" method="POST" target="_top">
 <input type="hidden" name="action" value="delete" /> 
 <input type="hidden" name="filename" value="" />
 </form>
-<form name="cstrprint" action="/adm/printout" target="_parent" method="post">
+<form name="cstrprint" action="/adm/printout" target="_parent" method="POST">
 <input type="hidden" name="postdata" value="" />
 <input type="hidden" name="curseed" value="" />
 <input type="hidden" name="problemtype" value="" />
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.260 loncom/interface/lonsearchcat.pm:1.261
--- loncom/interface/lonsearchcat.pm:1.260	Thu Mar 23 17:01:58 2006
+++ loncom/interface/lonsearchcat.pm	Fri Apr  7 17:56:01 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.260 2006/03/23 22:01:58 albertel Exp $
+# $Id: lonsearchcat.pm,v 1.261 2006/04/07 21:56:01 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -199,8 +199,9 @@
 		    'We were unable to retrieve data describing your search. '.
 		    'This is a serious error and has been logged. '.
 		    'Please alert your LON-CAPA administrator.';
-		return &Apache::loncommon::simple_error_page($r,'Search Error',
-							     $msg);
+		&Apache::loncommon::simple_error_page($r,'Search Error',
+						      $msg);
+		return OK;
             }
         }
     } else {
@@ -221,8 +222,9 @@
             # This is a stupid error to give to the user.  
             # It really tells them nothing.
 	    my $msg = 'Unable to tie hash to db file.';
-	    return &Apache::loncommon::simple_error_page($r,'Search Error',
-							 $msg);
+	    &Apache::loncommon::simple_error_page($r,'Search Error',
+						  $msg);
+	    return OK;
 	}
     }
     ##
@@ -363,16 +365,18 @@
 	    my $msg = 
 		'Unable to create table in which to store search results. '.
 		'The search has been aborted.';
-	    return &Apache::loncommon::simple_error_page($r,'Search Error',
-							 $msg);
+	    &Apache::loncommon::simple_error_page($r,'Search Error',
+						  $msg);
+	    return OK;
         }
         delete($env{'form.launch'});
         if (! &make_form_data_persistent($r,$persistent_db_file)) {
 	    my $msg=
 		'Unable to properly store search information. '.
 		'The search has been aborted.';
-	    return &Apache::loncommon::simple_error_page($r,'Search Error',
-							 $msg);
+	    &Apache::loncommon::simple_error_page($r,'Search Error',
+						  $msg);
+	    return OK;
 	}
         ##
         ## Print out the frames interface
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.36 loncom/interface/lonsimplepage.pm:1.37
--- loncom/interface/lonsimplepage.pm:1.36	Wed Mar 29 15:07:00 2006
+++ loncom/interface/lonsimplepage.pm	Fri Apr  7 17:56:02 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.36 2006/03/29 20:07:00 raeburn Exp $
+# $Id: lonsimplepage.pm,v 1.37 2006/04/07 21:56:02 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -52,11 +52,11 @@
 # Is this even in a course?
     unless ($env{'request.course.id'}) {
 	if ($target ne 'tex') {
-	    return &Apache::loncommon::simple_error_page($r,'',
-							 'Not in a course');
+	    &Apache::loncommon::simple_error_page($r,'','Not in a course');
 	} else {
 	    $r->print('\textbf{Not in a course}\end{document}');
 	}
+	return OK;
     }
 
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
@@ -72,8 +72,8 @@
         $namespace = 'grppage_'.$marker;
         my %curr_groups;
         if (!&Apache::loncommon::coursegroups(\%curr_groups,$dom,$crs,$marker)) {
-	    return &Apache::loncommon::simple_error_page($r,'',
-							 'Invalid group name');
+	    &Apache::loncommon::simple_error_page($r,'','Invalid group name');
+	    return OK;
         }
         %groupinfo = 
 	    &Apache::loncommon::get_group_settings($curr_groups{$marker});
@@ -83,7 +83,8 @@
     }
 
     if (!$marker) {
-	return &Apache::loncommon::simple_error_page($r,'','Invalid call');
+	&Apache::loncommon::simple_error_page($r,'','Invalid call');
+	return OK;
     }
 
 # --------------------------------------------------------- The syllabus fields