--- loncom/interface/spreadsheet/studentcalc.pm 2003/05/19 14:34:54 1.2 +++ loncom/interface/spreadsheet/studentcalc.pm 2003/05/19 15:48:18 1.3 @@ -1,5 +1,5 @@ # -# $Id: studentcalc.pm,v 1.2 2003/05/19 14:34:54 matthew Exp $ +# $Id: studentcalc.pm,v 1.3 2003/05/19 15:48:18 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -48,9 +48,11 @@ package Apache::studentcalc; use strict; use Apache::Constants qw(:common :http); use Apache::lonnet; +use Apache::loncommon(); +use Apache::loncoursedata(); use Apache::lonnavmaps; -use Apache::Spreadsheet; -use Apache::assesscalc; +use Apache::Spreadsheet(); +use Apache::assesscalc(); use HTML::Entities(); use Spreadsheet::WriteExcel; use Time::HiRes; @@ -90,8 +92,22 @@ sub clear_package { sub get_title { my $self = shift; my $title = ''; - $title .= '

Spreadsheet for '. - $self->{'name'}.'@'.$self->{'domain'}.'

'; + my %userenv = &Apache::loncoursedata::GetUserName($self->{'name'}, + $self->{'domain'}); + &Apache::lonnet::logthis('userenv = '.join(' ',%userenv)); + my $name = + join(' ',@userenv{'firstname','middlename','lastname','generation'}); + $name =~ s/\s+$//; + $title .= '

'.$name; + if ($ENV{'user.name'} ne $self->{'name'} && + $ENV{'user.domain'} ne $self->{'domain'}) { + $title .= &Apache::loncommon::aboutmewrapper + ($self->{'name'}.'@'.$self->{'domain'}, + $self->{'name'},$self->{'domain'}); + } + $title .= "

\n"; + $title .= '

'.$self->{'coursedesc'}."

\n"; + $title .= '

'.localtime(time).'

'; return $title; }