--- loncom/interface/loncommon.pm 2004/07/26 21:57:27 1.203
+++ loncom/interface/loncommon.pm 2004/08/26 22:41:33 1.209
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.203 2004/07/26 21:57:27 albertel Exp $
+# $Id: loncommon.pm,v 1.209 2004/08/26 22:41:33 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -688,7 +688,7 @@ function helpMenu(caller) {
}
}
-
+
ENDTEMPLATE
if ($component_help) {
if (!$text) {
@@ -812,7 +812,7 @@ format.
sub csv_translate {
my $text = shift;
$text =~ s/\"/\"\"/g;
- $text =~ s/\n//g;
+ $text =~ s/\n/ /g;
return $text;
}
@@ -863,7 +863,7 @@ sub define_excel_formats {
$format->{'h2'} = $workbook->add_format(bold=>1, size=>16);
$format->{'h3'} = $workbook->add_format(bold=>1, size=>14);
$format->{'date'} = $workbook->add_format(num_format=>
- 'mmm d yyyy hh:mm AM/PM');
+ 'mm/dd/yyyy hh:mm:ss');
return $format;
}
@@ -1817,7 +1817,7 @@ sub noteswrapper {
sub aboutmewrapper {
my ($link,$username,$domain,$target)=@_;
- return ''.$link.'';
}
@@ -1829,9 +1829,28 @@ sub syllabuswrapper {
if ($fontcolor) {
$linktext=''.$linktext.'';
}
- return "$linktext";
+ return qq{$linktext};
}
+sub track_student_link {
+ my ($linktext,$sname,$sdom,$target) = @_;
+ my $link ="/adm/trackstudent";
+ my $title = 'View recent activity';
+ if (defined($sname) && $sname !~ /^\s*$/ &&
+ defined($sdom) && $sdom !~ /^\s*$/) {
+ $link .= "?selected_student=$sname:$sdom";
+ $title .= ' of this student';
+ }
+ if (defined($target) && $target !~ /^\s*$/) {
+ $target = qq{target="$target"};
+ } else {
+ $target = '';
+ }
+ return qq{$linktext};
+}
+
+
+
=pod
=back
@@ -2523,10 +2542,26 @@ END
'
LON-CAPA: '.$title.'
';
} elsif ($ENV{'environment.remote'} eq 'off') {
# No Remote
+ my $roleinfo=(<
+
+
+ $ENV{'environment.firstname'}
+ $ENV{'environment.middlename'}
+ $ENV{'environment.lastname'}
+ $ENV{'environment.generation'}
+
+
+$role
+
+$realm
+
+
+ENDROLE
return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
$forcereg).
- '';
+ ''.$title.
+' | '.$roleinfo.'
';
}
#