version 1.519, 2004/07/02 21:34:55
|
version 1.521, 2004/07/06 18:02:33
|
Line 3203 sub auto_create_password {
|
Line 3203 sub auto_create_password {
|
return ($authparam,$create_passwd,$authchk); |
return ($authparam,$create_passwd,$authchk); |
} |
} |
|
|
|
sub auto_instcode_format { |
|
my ($caller,$codedom,$instcodes,$codes,$codetitles,$cat_titles,$cat_order) = @_; |
|
my $courses = ''; |
|
my $homeserver; |
|
if ($caller eq 'global') { |
|
$homeserver = $perlvar{'lonHostID'}; |
|
} else { |
|
$homeserver = &homeserver($caller,$codedom); |
|
} |
|
my $host=$hostname{$homeserver}; |
|
foreach (keys %{$instcodes}) { |
|
$courses .= &escape($_).'='.&escape($$instcodes{$_}).'&'; |
|
} |
|
chop($courses); |
|
my $response=&reply('autoinstcodeformat:'.$codedom.':'.$courses,$homeserver); |
|
unless ($response =~ /(con_lost|error|no_such_host|refused)/) { |
|
my ($codes_str,$codetitles_str,$cat_titles_str,$cat_order_str) = split/:/,$response; |
|
%{$codes} = &str2hash($codes_str); |
|
@{$codetitles} = &str2array($codetitles_str); |
|
%{$cat_titles} = &str2hash($cat_titles_str); |
|
%{$cat_order} = &str2hash($cat_order_str); |
|
return 'ok'; |
|
} |
|
return $response; |
|
} |
|
|
# ------------------------------------------------------------------ Plain Text |
# ------------------------------------------------------------------ Plain Text |
|
|
sub plaintext { |
sub plaintext { |
Line 3589 sub revokecustomrole {
|
Line 3615 sub revokecustomrole {
|
# |
# |
|
|
sub portfoliolist { |
sub portfoliolist { |
my ($currentPath, $currentFile) = @_; |
my ($currentPath, $currentFile) = @_; |
my ($udom, $uname, $portfolioRoot); |
my ($udom, $uname, $portfolioRoot); |
$uname=$ENV{'user.name'}; |
$uname=$ENV{'user.name'}; |
$udom=$ENV{'user.domain'}; |
$udom=$ENV{'user.domain'}; |
# really should interrogate the system for home directory information, but . . . |
# really should interrogate the system for home directory information, but . . . |
$portfolioRoot = '/home/httpd/lonUsers/'.$udom.'/'; |
$portfolioRoot = '/home/httpd/lonUsers/'.$udom.'/'; |
$uname =~ /^(.?)(.?)(.?)/; |
$uname =~ /^(.?)(.?)(.?)/; |
$portfolioRoot = $portfolioRoot.$1.'/'.$2.'/'.$3.'/'.$uname.'/userfiles/portfolio'; |
$portfolioRoot = $portfolioRoot.$1.'/'.$2.'/'.$3.'/'.$uname.'/userfiles/portfolio'; |
my $listing = &reply('ls:'.$portfolioRoot.$currentPath, homeserver($uname,$udom)); |
my $listing = &reply('ls:'.$portfolioRoot.$currentPath, &homeserver($uname,$udom)); |
return $listing; |
return $listing; |
} |
} |
|
|
sub portfoliomanage { |
sub portfoliomanage { |