--- loncom/interface/loncommon.pm 2003/02/03 18:03:52 1.76
+++ loncom/interface/loncommon.pm 2003/06/06 02:24:49 1.103
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.76 2003/02/03 18:03:52 harris41 Exp $
+# $Id: loncommon.pm,v 1.103 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -79,8 +79,9 @@ 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;
=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;
}
}
}
@@ -328,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');
@@ -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";
}
###############################################################
@@ -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;
@@ -538,14 +572,16 @@ sub help_open_topic {
# Add the text
if ($text ne "")
{
- $template .= "$text ";
+ $template .=
+ "
".
+ "$text";
}
# Add the graphic
$template .= <<"ENDTEMPLATE";
-
+
ENDTEMPLATE
-
+ if ($text ne '') { $template.=' |
' };
return $template;
}
@@ -595,18 +631,48 @@ sub get_domains {
=pod
-=item select_dom_form($defdom,$name)
+=item select_form($defdom,$name,%hash)
+
+Returns a string containing a