--- loncom/interface/loncommon.pm 2003/02/12 01:59:34 1.77 +++ loncom/interface/loncommon.pm 2003/03/27 20:56:30 1.91 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.77 2003/02/12 01:59:34 www Exp $ +# $Id: loncommon.pm,v 1.91 2003/03/27 20:56:30 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -81,6 +81,7 @@ use GDBM_File; use POSIX qw(strftime mktime); use Apache::Constants qw(:common); use Apache::lonmsg(); +use Apache::lonmenu(); my $readit; =pod @@ -348,6 +349,36 @@ sub selectstudent_link { '","'.$udomele.'");'."'>Select"; } +sub coursebrowser_javascript { + return (<<'ENDSTDBRW'); + +ENDSTDBRW +} + +sub selectcourse_link { + my ($form,$unameele,$udomele)=@_; + return "Select Course"; +} + ############################################################### =pod @@ -518,6 +549,9 @@ sub help_open_topic { my ($topic, $text, $stayOnPage, $width, $height) = @_; $text = "" if (not defined $text); $stayOnPage = 0 if (not defined $stayOnPage); + if ($ENV{'browser.interface'} eq 'textual') { + $stayOnPage=1; + } $width = 350 if (not defined $width); $height = 400 if (not defined $height); my $filename = $topic; @@ -540,14 +574,14 @@ sub help_open_topic { { $template .= "". - "
$text"; + "$text"; } # Add the graphic $template .= <<"ENDTEMPLATE"; (Help: $topic) ENDTEMPLATE - if ($text ne '') { $template.='
' }; + if ($text ne '') { $template.='' }; return $template; } @@ -597,18 +631,48 @@ sub get_domains { =pod -=item select_dom_form($defdom,$name) +=item select_form($defdom,$name,%hash) + +Returns a string containing a \n"; + foreach (sort keys %hash) { + $selectform.="\n"; + } + $selectform.=""; + return $selectform; +} + + +#------------------------------------------- + +=pod + +=item select_dom_form($defdom,$name,$includeempty) Returns a string containing a \n"; foreach (@domains) { $selectdomain.="