--- loncom/interface/loncommon.pm 2003/03/20 16:17:37 1.88 +++ loncom/interface/loncommon.pm 2003/05/04 21:20:17 1.98 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.88 2003/03/20 16:17:37 www Exp $ +# $Id: loncommon.pm,v 1.98 2003/05/04 21:20:17 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -151,8 +151,8 @@ BEGIN { while (<$fh>) { next if /^\#/; chomp; - my ($key,$val)=(split(/\s+/,$_,2)); - $language{$key}=$val; + my ($key,$two,$country,$three,$enc,$val)=(split(/\t/,$_)); + $language{$key}=$val.' - '.$enc; } } } @@ -346,7 +346,37 @@ sub selectstudent_link { return ''; } return "Select"; + '","'.$udomele.'");'."'>Select User"; +} + +sub coursebrowser_javascript { + return (<<'ENDSTDBRW'); + +ENDSTDBRW +} + +sub selectcourse_link { + my ($form,$unameele,$udomele)=@_; + return "Select Course"; } ############################################################### @@ -613,7 +643,7 @@ See lonrights.pm for an example invocati sub select_form { my ($def,$name,%hash) = @_; my $selectform = "\n"; - foreach (keys %hash) { + foreach (sort keys %hash) { $selectform.="".$hash{$_}."\n"; @@ -627,18 +657,22 @@ sub select_form { =pod -=item select_dom_form($defdom,$name) +=item select_dom_form($defdom,$name,$includeempty) Returns a string containing a form to allow a user to select the domain to preform an operation in. See loncreateuser.pm for an example invocation and use. +If the $includeempty flag is set, it also includes an empty choice ("no domain +selected"); + =cut #------------------------------------------- sub select_dom_form { - my ($defdom,$name) = @_; + my ($defdom,$name,$includeempty) = @_; my @domains = get_domains(); + if ($includeempty) { @domains=('',@domains); } my $selectdomain = "\n"; foreach (@domains) { $selectdomain.=" END + my $upperleft=''; if ($bodyonly) { return $bodytag; } elsif ($ENV{'browser.interface'} eq 'textual') { +# Accessibility return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web', $forcereg). 'LON-CAPA: '.$title.''; - } else { - return(<'.$title. +''; + } + +# +# Top frame rendering, Remote is up +# + return(< - - -$messages + +$upperleft +$messages @@ -1714,7 +1784,6 @@ $bodytag $realm ENDBODY - } } ###############################################