--- loncom/interface/loncommon.pm 2003/03/20 16:17:37 1.88 +++ loncom/interface/loncommon.pm 2003/06/20 14:44:06 1.106 @@ -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.106 2003/06/20 14:44:06 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -79,7 +79,7 @@ use strict; use Apache::lonnet(); use GDBM_File; use POSIX qw(strftime mktime); -use Apache::Constants qw(:common); +use Apache::Constants qw(:common :http :methods); use Apache::lonmsg(); use Apache::lonmenu(); my $readit; @@ -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; } } } @@ -329,7 +329,7 @@ sub studentbrowser_javascript { } url += 'form=' + formname + '&unameelement='+uname+ '&udomelement='+udom; - var title = 'Student Browser'; + var title = 'Student_Browser'; var options = 'scrollbars=1,resizable=1,menubar=0'; options += ',width=700,height=600'; stdeditbrowser = open(url,title,options,'1'); @@ -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"; } ############################################################### @@ -556,6 +586,26 @@ ENDTEMPLATE } +# This is a quicky function for Latex cheatsheet editing, since it +# appears in at least four places +sub helpLatexCheatsheet { + my $other = shift; + my $addOther = ''; + if ($other) { + $addOther = Apache::loncommon::help_open_topic($other, shift, + undef, undef, 600) . + ''; + } + return '
'. + $addOther . + &Apache::loncommon::help_open_topic("Greek_Symbols",'Greek Symbols', + undef,undef,600) + .''. + &Apache::loncommon::help_open_topic("Other_Symbols",'Other Symbols', + undef,undef,600) + .'
'; +} + =pod =item csv_translate($text) @@ -613,7 +663,7 @@ See lonrights.pm for an example invocati sub select_form { my ($def,$name,%hash) = @_; my $selectform = " 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 = "