--- loncom/interface/loncommon.pm 2012/04/10 00:28:04 1.1068
+++ loncom/interface/loncommon.pm 2012/05/06 22:09:14 1.1074
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1068 2012/04/10 00:28:04 raeburn Exp $
+# $Id: loncommon.pm,v 1.1074 2012/05/06 22:09:14 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1374,7 +1374,7 @@ function helpMenu(target) {
return;
}
function writeHelp(caller) {
- caller.document.writeln('$start_page $end_page')
+ caller.document.writeln('$start_page\\n\\n\\n$end_page')
caller.document.close()
caller.focus()
}
@@ -1981,19 +1981,112 @@ sub select_form {
# For display filters
sub display_filter {
+ my ($context) = @_;
if (!$env{'form.show'}) { $env{'form.show'}=10; }
if (!$env{'form.displayfilter'}) { $env{'form.displayfilter'}='currentfolder'; }
- return '
';
} else {
$output = ''.
&mt('Error: update failed for: [_1].',
@@ -9761,7 +10105,11 @@ sub modify_html_refs {
' to modify references: '.$parse_result);
}
}
- return $output;
+ if (wantarray) {
+ return ($output,$count,$codebasecount);
+ } else {
+ return $output;
+ }
}
sub check_for_existing {
@@ -11057,15 +11405,15 @@ sub get_folder_hierarchy {
}
}
}
- }
- if ($showitem) {
- if ($mapres->{ID} eq '0.0') {
- push(@pathitems,&mt('Main Course Documents'));
- } else {
- my $maptitle = $mapres->compTitle();
- $maptitle =~ s/\W+/_/g;
- if ($maptitle ne '') {
- push(@pathitems,$maptitle);
+ if ($showitem) {
+ if ($mapres->{ID} eq '0.0') {
+ push(@pathitems,&mt('Main Course Documents'));
+ } else {
+ my $maptitle = $mapres->compTitle();
+ $maptitle =~ s/\W+/_/g;
+ if ($maptitle ne '') {
+ push(@pathitems,$maptitle);
+ }
}
}
}
@@ -13379,7 +13727,9 @@ sub get_symb {
my $symb=($env{'form.symb'} ne '' ? $env{'form.symb'} : (&Apache::lonnet::symbread($url)));
if ($symb eq '') {
if (!$silent) {
- $request->print("Unable to handle ambiguous references:$url:.");
+ if (ref($request)) {
+ $request->print("Unable to handle ambiguous references:$url:.");
+ }
return ();
}
}