--- loncom/interface/loncommon.pm 2003/02/13 21:35:50 1.80 +++ 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.80 2003/02/13 21:35:50 albertel Exp $ +# $Id: loncommon.pm,v 1.98 2003/05/04 21:20:17 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 @@ -150,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; } } } @@ -345,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"; } ############################################################### @@ -600,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.="