--- loncom/interface/loncommon.pm 2004/06/11 02:21:45 1.192 +++ loncom/interface/loncommon.pm 2004/07/19 17:50:53 1.200 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.192 2004/06/11 02:21:45 taceyjo1 Exp $ +# $Id: loncommon.pm,v 1.200 2004/07/19 17:50:53 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -250,6 +250,8 @@ of the element the selection from the se =cut sub browser_and_searcher_javascript { + my ($mode)=@_; + if (!defined($mode)) { $mode='edit'; } my $resurl=&lastresurl(); return <'; } +sub help_open_menu { + my ($color,$topic,$component_help,$function,$faq,$bug,$stayOnPage,$width,$height,$text) = @_; + $text = "" if (not defined $text); + $stayOnPage = 0 if (not defined $stayOnPage); + if ($ENV{'browser.interface'} eq 'textual' || + $ENV{'environment.remote'} eq 'off' ) { + $stayOnPage=1; + } + $width = 620 if (not defined $width); + $height = 600 if (not defined $height); + my $link=''; + my $title = &mt('Choose your help'); + my $origurl = $ENV{'REQUEST_URI'}; + my $timestamp = time; + foreach (\$color,\$function,\$topic,\$component_help,\$faq,\$bug,\$origurl) { + $$_ = &Apache::lonnet::escape($$_); + } + + if (!$stayOnPage) { + $link = "javascript:helpMenu('open')"; + } else { + $link = "javascript:helpMenu('display')"; + } + my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage"; + my $details_link = "/adm/helpmenu?page=body&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp"; + my $template; + if ($text ne "") { + $template .= + "". + "
$text"; + } + $template .= <<"ENDTEMPLATE"; + + (Help Menu) +ENDTEMPLATE + if ($text ne '') { $template.='
' }; + return $template; +} + sub help_open_bug { my ($topic, $text, $stayOnPage, $width, $height) = @_; unless ($ENV{'user.adv'}) { return ''; } @@ -1730,9 +1787,11 @@ sub screenname { # ------------------------------------------------------------- Message Wrapper sub messagewrapper { - my ($link,$un,$do)=@_; + my ($link,$username,$domain)=@_; return -"$link"; + ''.$link.''; } # --------------------------------------------------------------- Notes Wrapper @@ -1745,8 +1804,8 @@ sub noteswrapper { sub aboutmewrapper { my ($link,$username,$domain,$target)=@_; - return "$link"; + return ''.$link.''; } # ------------------------------------------------------------ Syllabus Wrapper @@ -1826,6 +1885,9 @@ returns description of a specified copyr sub copyrightdescription { return &mt($cprtag{shift(@_)}); } + +=pod + =item * source_copyrightids() returns list of all source copyrights