--- loncom/interface/loncommon.pm 2002/09/13 20:46:09 1.67 +++ loncom/interface/loncommon.pm 2002/12/12 16:47:27 1.72 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.67 2002/09/13 20:46:09 www Exp $ +# $Id: loncommon.pm,v 1.72 2002/12/12 16:47:27 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -493,7 +493,7 @@ sub help_open_topic { if (!$stayOnPage) { - $link = "javascript:void(open('/adm/help/${filename}.hlp', 'Help_for_$topic', 'menubar=0,toolbar=1,scrollbars=1,width=$width,height=$height'))"; + $link = "javascript:void(open('/adm/help/${filename}.hlp', 'Help_for_$topic', 'menubar=0,toolbar=1,scrollbars=1,width=$width,height=$height,resizable=yes'))"; } else { @@ -981,7 +981,7 @@ sub nickname { my ($uname,$udom)=@_; my %names=&Apache::lonnet::get('environment', ['nickname','firstname','middlename','lastname','generation'],$udom,$uname); - my $name=&Apache::lonnet::unescape($names{'nickname'}); + my $name=$names{'nickname'}; if ($name) { $name='"'.$name.'"'; } else { @@ -1000,7 +1000,7 @@ sub screenname { my ($uname,$udom)=@_; my %names= &Apache::lonnet::get('environment',['screenname'],$udom,$uname); - return &Apache::lonnet::unescape($names{'screenname'}); + return $names{'screenname'}; } # ------------------------------------------------------------- Message Wrapper @@ -1013,8 +1013,8 @@ sub messagewrapper { # ------------------------------------------------------------- Aboutme Wrapper sub aboutmewrapper { - my ($link,$un,$do)=@_; - return "$link"; + my ($link,$username,$domain)=@_; + return "$link"; } # ------------------------------------------------------------ Syllabus Wrapper @@ -1222,6 +1222,22 @@ sub maketime { } +######################################### +# +# Retro-fixing of un-backward-compatible time format + +sub unsqltime { + my $timestamp=shift; + if ($timestamp=~/^(\d+)\-(\d+)\-(\d+)\s+(\d+)\:(\d+)\:(\d+)$/) { + $timestamp=&maketime( + 'year'=>$1,'month'=>$2,'day'=>$3, + 'hours'=>$4,'minutes'=>$5,'seconds'=>$6); + } + return $timestamp; +} + +######################################### + sub findallcourses { my %courses=(); my $now=time; @@ -1283,7 +1299,8 @@ sub domainlogo { my $domain = &determinedomain(shift); # See if there is a logo if (-e '/home/httpd/html/adm/lonDomLogos/'.$domain.'.gif') { - return ''; + return ''; } elsif(exists($Apache::lonnet::domaindescription{$domain})) { return $Apache::lonnet::domaindescription{$domain}; } else { @@ -1387,7 +1404,7 @@ END $bodytag
- | +$messages |