[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm lontest.pm portfolio.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 19 Mar 2006 21:54:41 -0000
This is a MIME encoded message
--albertel1142805281
Content-Type: text/plain
albertel Sun Mar 19 16:54:41 2006 EDT
Modified files:
/loncom/interface portfolio.pm lonsearchcat.pm lontest.pm
Log:
-elimintaing some use of &bodytag in favor of &start_page instead
--albertel1142805281
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060319165441.txt"
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.95 loncom/interface/portfolio.pm:1.96
--- loncom/interface/portfolio.pm:1.95 Wed Mar 15 14:41:26 2006
+++ loncom/interface/portfolio.pm Sun Mar 19 16:54:41 2006
@@ -680,12 +680,11 @@
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
# Give the LON-CAPA page header
- my $html=&Apache::lonxml::xmlbegin();
- $r->print($html.&Apache::loncommon::head($title)."\n");
if ($env{"form.mode"} eq 'selectfile'){
- $r->print(&Apache::loncommon::bodytag($title,undef,undef,1));
+ $r->print(&Apache::loncommon::start_page($title,undef,
+ {'only_body' => 1});
} else {
- $r->print(&Apache::loncommon::bodytag($title));
+ $r->print(&Apache::loncommon::start_page($title);
}
$r->rflush();
if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.256 loncom/interface/lonsearchcat.pm:1.257
--- loncom/interface/lonsearchcat.pm:1.256 Wed Mar 15 15:56:16 2006
+++ loncom/interface/lonsearchcat.pm Sun Mar 19 16:54:41 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.256 2006/03/15 20:56:16 albertel Exp $
+# $Id: lonsearchcat.pm,v 1.257 2006/03/19 21:54:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -116,9 +116,6 @@
my $diropendb; # The full path to the (temporary) search database file.
# This is set and used in &handler() and is also used in
# &output_results().
- my $bodytag; # LON-CAPA standard body tag, gotten from
- # &Apache::lonnet::bodytag.
- # No title, no table, just a <body> tag.
my $loaderror=&Apache::lonnet::overloaderror($r);
if ($loaderror) { return $loaderror; }
@@ -165,7 +162,7 @@
($env{'form.launch'} eq '1')) {
$env{'form.persistent_db_id'} = time;
}
- $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1);
+
my $persistent_db_file = "/home/httpd/perl/tmp/".
&Apache::lonnet::escape($domain).
'_'.&Apache::lonnet::escape($env{'user.name'}).
@@ -2065,10 +2062,6 @@
######################################################################
sub print_sort_form {
my ($r,$pretty_query_string) = @_;
- my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1).
- &Apache::lonhtmlcommon::breadcrumbs
- (undef,'Searching','Searching',undef,undef,
- $env{'form.catalogmode'} ne 'groupsearch');
##
my %SortableFields=&Apache::lonlocal::texthash(
@@ -2101,14 +2094,8 @@
&Apache::lonnet::logthis(&Apache::lonmysql::get_error());
return;
}
- my $result;
- my $html = &Apache::lonxml::xmlbegin();
- my $head = &Apache::lonxml::headtag('Results');
- my $end_head = &Apache::loncommon::endheadtag();
- $result.=<<END;
-$html
-$head
-<script>
+ my $js =<<END;
+<script type="text/javascript">
function change_sort() {
var newloc = "/adm/searchcat?phase=results";
newloc += "&persistent_db_id=$env{'form.persistent_db_id'}";
@@ -2117,9 +2104,19 @@
parent.resultsframe.location= newloc;
}
</script>
-$end_head
-$bodytag
-<form name="statusform" action="" method="post">
+END
+
+ my $head = &Apache::loncommon::start_page('Results',$js,
+ {'only_body' => 1});
+ my $breadcrumbs=
+ &Apache::lonhtmlcommon::breadcrumbs
+ (undef,'Searching','Searching',undef,undef,
+ $env{'form.catalogmode'} ne 'groupsearch');
+
+ my $result = <<END;
+$start_page
+$breadcrumbs
+<form name="statusform" action="" method="POST">
<input type="hidden" name="Queue" value="" />
END
@@ -2335,20 +2332,19 @@
######################################################################
sub run_search {
my ($r,$query,$customquery,$customshow,$serverlist,$pretty_string) = @_;
- my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1);
- $bodytag.=&Apache::lonhtmlcommon::breadcrumbs
- (undef,'Searching','Searching',undef,undef,
- $env{'form.catalogmode'} ne 'groupsearch');
+
my $connection = $r->connection;
#
# Print run_search header
#
- my $html = &Apache::lonxml::xmlbegin();
- my $head = &Apache::loncommon::head('Search Status');
+ my $head = &Apache::loncommon::start_page('Search Status',undef,
+ {'only_body' => 1});
+ my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs
+ (undef,'Searching','Searching',undef,undef,
+ $env{'form.catalogmode'} ne 'groupsearch');
$r->print(<<END);
-$html
-$head
-$bodytag
+$start_page
+$breadcrumbs
<form name="statusform" action="" method="post">
<input type="hidden" name="Queue" value="" />
END
@@ -2998,16 +2994,14 @@
######################################################################
sub search_results_header {
my ($importbutton,$closebutton) = @_;
- my $result =
- &Apache::lonxml::xmlbegin().
- &Apache::loncommon::headtag();
+ my $js;
# output beginning of search page
# conditional output of script functions dependent on the mode in
# which the search was invoked
if ($env{'form.catalogmode'} eq 'interactive'){
if (! exists($env{'form.mode'}) || $env{'form.mode'} ne 'edit') {
- $result.=<<SCRIPT;
+ $js.=<<SCRIPT;
<script type="text/javascript">
function select_data(title,url) {
changeTitle(title);
@@ -3046,7 +3040,7 @@
END
}
- $result.=<<SCRIPT;
+ $js.=<<SCRIPT;
<script type="text/javascript">
function select_data(title,url) {
changeURL(url);
@@ -3066,7 +3060,7 @@
SCRIPT
}
}
- $result.=<<SCRIPT if $env{'form.catalogmode'} eq 'groupsearch';
+ $js.=<<SCRIPT if $env{'form.catalogmode'} eq 'groupsearch';
<script type="text/javascript">
function queue(checkbox_num,val) {
if (document.forms.results.returnvalues.length != "undefined" &&
@@ -3092,11 +3086,10 @@
</script>
SCRIPT
- my $end_head = &Apache::loncommon::endheadtag();
- my $bodytag = &Apache::loncommon::bodytag(undef,undef,undef,1);
+ my $start_page = &Apache::loncommon::start_page(undef,$js,
+ {'only_body' =>1});
$result.=<<END;
-$end_head
-$bodytag
+$start_page
<form name="results" method="post" action="/adm/searchcat" >
<input type="hidden" name="Queue" value="" />
$importbutton
@@ -3107,13 +3100,10 @@
######################################################################
######################################################################
sub search_status_header {
- my $bodytag = &Apache::loncommon::bodytag(undef,undef,undef,1);
- my $html = &Apache::lonxml::xmlbegin();
- my $head = &Apache::loncommon::head('Search Status');
+ my $start_page = &Apache::loncommon::start_page('Search Status',undef,
+ {'only_body' => 1});
return <<ENDSTATUS;
-$html
-$head
-$bodytag
+$start_page
<h3>Search Status</h3>
Sending search request to LON-CAPA servers.<br />
ENDSTATUS
@@ -3621,7 +3611,6 @@
######################################################################
sub output_blank_field_error {
my ($r,$closebutton,$parms,$hidden_fields)=@_;
- my $bodytag=&Apache::loncommon::bodytag('Search');
my $errormsg = &mt('You did not fill in enough information for the search to be started. You need to fill in relevant fields on the search page in order for a query to be processed.');
my $revise = &mt('Revise Search Request');
my $heading = &mt('Unactionable Search Queary');
Index: loncom/interface/lontest.pm
diff -u loncom/interface/lontest.pm:1.18 loncom/interface/lontest.pm:1.19
--- loncom/interface/lontest.pm:1.18 Wed Mar 15 14:41:26 2006
+++ loncom/interface/lontest.pm Sun Mar 19 16:54:41 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# A debugging harness.
#
-# $Id: lontest.pm,v 1.18 2006/03/15 19:41:26 albertel Exp $
+# $Id: lontest.pm,v 1.19 2006/03/19 21:54:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -84,9 +84,8 @@
$r->send_http_header;
return OK if $r->header_only;
- my $html=&Apache::lonxml::xmlbegin();
- my $bodytag=&Apache::loncommon::bodytag("List Environment","admin");
- $r->print($html.&Apache::loncommon::head().$bodytag);
+ $r->print(&Apache::loncommon::start_page("List Environment",undef,
+ {'function' => 'admin'}));
$r->print("<hr /><h1>Debugging</h1><hr />\n");
$r->print("<font face='Courier'>");
--albertel1142805281--