|
@@ -234,14 +280,13 @@ ENDINPUTFIELD
sub maketoken {
my ($symb,$tuname,$tudom,$tcrsid)=@_;
unless ($symb) {
- $symb=&Apache::lonnet::symbread();
+ $symb=&Apache::lonnet::symbread();
}
unless ($tuname) {
- $tuname=$ENV{'user.name'};
- $tudom=$ENV{'user.domain'};
- $tcrsid=$ENV{'request.course.id'};
+ $tuname=$env{'user.name'};
+ $tudom=$env{'user.domain'};
+ $tcrsid=$env{'request.course.id'};
}
-
return &Apache::lonnet::checkout($symb,$tuname,$tudom,$tcrsid);
}
@@ -249,33 +294,27 @@ sub printtokenheader {
my ($target,$token,$tsymb,$tcrsid,$tudom,$tuname)=@_;
unless ($token) { return ''; }
- my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser();
+ my ($symb,$courseid,$domain,$name) = &Apache::lonnet::whichuser();
unless ($tsymb) {
- $tsymb=$symb;
+ $tsymb=$symb;
}
unless ($tuname) {
- $tuname=$name;
+ $tuname=$name;
$tudom=$domain;
$tcrsid=$courseid;
}
- my %reply=&Apache::lonnet::get('environment',
- ['firstname','middlename','lastname','generation'],
- $tudom,$tuname);
- my $plainname=$reply{'firstname'}.' '.
- $reply{'middlename'}.' '.
- $reply{'lastname'}.' '.
- $reply{'generation'};
+ my $plainname=&Apache::loncommon::plainname($tuname,$tudom);
if ($target eq 'web') {
my %idhash=&Apache::lonnet::idrget($tudom,($tuname));
- return
+ return
'