".
- "$text";
+ "".
+ "$text";
}
$template .= <<"ENDTEMPLATE";
-
+
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;
}
@@ -1765,8 +1765,19 @@ if the user does not
sub nickname {
my ($uname,$udom)=@_;
- my %names=&Apache::lonnet::get('environment',
- ['nickname','firstname','middlename','lastname','generation'],$udom,$uname);
+ my %names;
+ if ($uname eq $ENV{'user.name'} &&
+ $udom eq $ENV{'user.domain'}) {
+ %names=('nickname' => $ENV{'environment.nickname'} ,
+ 'firstname' => $ENV{'environment.firstname'} ,
+ 'middlename' => $ENV{'environment.middlename'},
+ 'lastname' => $ENV{'environment.lastname'} ,
+ 'generation' => $ENV{'environment.generation'});
+ } else {
+ %names=&Apache::lonnet::get('environment',
+ ['nickname','firstname','middlename',
+ 'lastname','generation'],$udom,$uname);
+ }
my $name=$names{'nickname'};
if ($name) {
$name='"'.$name.'"';
@@ -1792,11 +1803,13 @@ Gets a users screenname and returns it a
sub screenname {
my ($uname,$udom)=@_;
- my %names=
- &Apache::lonnet::get('environment',['screenname'],$udom,$uname);
+ if ($uname eq $ENV{'user.name'} &&
+ $udom eq $ENV{'user.domain'}) {return $ENV{'environment.screenname'};}
+ my %names=&Apache::lonnet::get('environment',['screenname'],$udom,$uname);
return $names{'screenname'};
}
+
# ------------------------------------------------------------- Message Wrapper
sub messagewrapper {
@@ -1817,7 +1830,7 @@ sub noteswrapper {
sub aboutmewrapper {
my ($link,$username,$domain,$target)=@_;
- return ''.$link.'';
}
@@ -1829,9 +1842,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
@@ -2312,7 +2344,7 @@ sub maketime {
my %th=@_;
return POSIX::mktime(
($th{'seconds'},$th{'minutes'},$th{'hours'},
- $th{'day'},$th{'month'}-1,$th{'year'}-1900,0,0,$th{'dlsav'}));
+ $th{'day'},$th{'month'}-1,$th{'year'}-1900,0,0,-1));
}
#########################################
@@ -2523,10 +2555,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.' ';
}
#
|