version 1.101, 2005/04/07 06:56:23
|
version 1.102, 2005/06/06 00:06:12
|
Line 544 END
|
Line 544 END
|
$bgcol=~s/[^7-9a-e]//g; |
$bgcol=~s/[^7-9a-e]//g; |
$bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); |
$bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); |
if ($area=~/^\/(\w+)\/(\d\w+)\/(\w+)/) { |
if ($area=~/^\/(\w+)\/(\d\w+)\/(\w+)/) { |
$carea.='<br>Section/Group: '.$3; |
$carea.='<br />Section/Group: '.$3; |
$sortkey.="\0$3"; |
$sortkey.="\0$3"; |
} |
} |
$area=$carea; |
$area=$carea; |
Line 990 ENDMODIFYUSERHEAD
|
Line 990 ENDMODIFYUSERHEAD
|
&Apache::lonnet::modifyuserauth( |
&Apache::lonnet::modifyuserauth( |
$env{'form.ccdomain'},$env{'form.ccuname'}, |
$env{'form.ccdomain'},$env{'form.ccuname'}, |
$amode,$genpwd)); |
$amode,$genpwd)); |
$r->print('<br>'.&mt('Home server').': '.&Apache::lonnet::homeserver |
$r->print('<br />'.&mt('Home server').': '.&Apache::lonnet::homeserver |
($env{'form.ccuname'},$env{'form.ccdomain'})); |
($env{'form.ccuname'},$env{'form.ccdomain'})); |
} else { |
} else { |
# Okay, this is a non-fatal error. |
# Okay, this is a non-fatal error. |
Line 1088 END
|
Line 1088 END
|
# Revoke standard role |
# Revoke standard role |
$r->print(&mt('Revoking').' '.$2.' in '.$1.': <b>'. |
$r->print(&mt('Revoking').' '.$2.' in '.$1.': <b>'. |
&Apache::lonnet::revokerole($env{'form.ccdomain'}, |
&Apache::lonnet::revokerole($env{'form.ccdomain'}, |
$env{'form.ccuname'},$1,$2).'</b><br>'); |
$env{'form.ccuname'},$1,$2).'</b><br />'); |
if ($2 eq 'st') { |
if ($2 eq 'st') { |
$1=~/^\/(\w+)\/(\w+)/; |
$1=~/^\/(\w+)\/(\w+)/; |
my $cid=$1.'_'.$2; |
my $cid=$1.'_'.$2; |
Line 1099 END
|
Line 1099 END
|
&Apache::lonnet::escape($env{'form.ccuname'}.':'. |
&Apache::lonnet::escape($env{'form.ccuname'}.':'. |
$env{'form.ccdomain'}).'='. |
$env{'form.ccdomain'}).'='. |
&Apache::lonnet::escape($now.':'), |
&Apache::lonnet::escape($now.':'), |
$env{'course.'.$cid.'.home'}).'</b><br>'); |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
} |
} |
} |
} |
if ($_=~/^form\.rev\:([^\_]+)\_cr\.cr\/(\w+)\/(\w+)\/(\w+)$/) { |
if ($_=~/^form\.rev\:([^\_]+)\_cr\.cr\/(\w+)\/(\w+)\/(\w+)$/) { |
Line 1108 END
|
Line 1108 END
|
' '.$4.' by '.$3.'@'.$2.' in '.$1.': <b>'. |
' '.$4.' by '.$3.'@'.$2.' in '.$1.': <b>'. |
&Apache::lonnet::revokecustomrole($env{'form.ccdomain'}, |
&Apache::lonnet::revokecustomrole($env{'form.ccdomain'}, |
$env{'form.ccuname'},$1,$2,$3,$4). |
$env{'form.ccuname'},$1,$2,$3,$4). |
'</b><br>'); |
'</b><br />'); |
} |
} |
} elsif ($_=~/^form\.del/) { |
} elsif ($_=~/^form\.del/) { |
if ($_=~/^form\.del\:([^\_]+)\_([^\_]+)$/) { |
if ($_=~/^form\.del\:([^\_]+)\_([^\_]+)$/) { |
$r->print(&mt('Deleting').' '.$2.' in '.$1.': '. |
$r->print(&mt('Deleting').' '.$2.' in '.$1.': '. |
&Apache::lonnet::assignrole($env{'form.ccdomain'}, |
&Apache::lonnet::assignrole($env{'form.ccdomain'}, |
$env{'form.ccuname'},$1,$2,$now,0,1).'<br>'); |
$env{'form.ccuname'},$1,$2,$now,0,1).'<br />'); |
if ($2 eq 'st') { |
if ($2 eq 'st') { |
$1=~/^\/(\w+)\/(\w+)/; |
$1=~/^\/(\w+)\/(\w+)/; |
my $cid=$1.'_'.$2; |
my $cid=$1.'_'.$2; |
Line 1125 END
|
Line 1125 END
|
&Apache::lonnet::escape($env{'form.ccuname'}.':'. |
&Apache::lonnet::escape($env{'form.ccuname'}.':'. |
$env{'form.ccdomain'}).'='. |
$env{'form.ccdomain'}).'='. |
&Apache::lonnet::escape($now.':'), |
&Apache::lonnet::escape($now.':'), |
$env{'course.'.$cid.'.home'}).'</b><br>'); |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
} |
} |
} |
} |
} elsif ($_=~/^form\.ren/) { |
} elsif ($_=~/^form\.ren/) { |
Line 1245 END
|
Line 1245 END
|
} |
} |
} |
} |
} else { |
} else { |
$r->print('<p>'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$_.'</tt></p><br>'); |
$r->print('<p>'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$_.'</tt></p><br />'); |
} |
} |
} |
} |
} # End of foreach (keys(%env)) |
} # End of foreach (keys(%env)) |
Line 1261 sub commit_customrole {
|
Line 1261 sub commit_customrole {
|
($end?', ending '.localtime($end):'').': <b>'. |
($end?', ending '.localtime($end):'').': <b>'. |
&Apache::lonnet::assigncustomrole( |
&Apache::lonnet::assigncustomrole( |
$udom,$uname,$url,$three,$four,$five,$end,$start). |
$udom,$uname,$url,$three,$four,$five,$end,$start). |
'</b><br>'; |
'</b><br />'; |
return $output; |
return $output; |
} |
} |
|
|
Line 1286 sub commit_standardrole {
|
Line 1286 sub commit_standardrole {
|
($end?', '.&mt('ending').' '.localtime($end):'').': <b>'. |
($end?', '.&mt('ending').' '.localtime($end):'').': <b>'. |
&Apache::lonnet::assignrole( |
&Apache::lonnet::assignrole( |
$udom,$uname,$url,$three,$end,$start). |
$udom,$uname,$url,$three,$end,$start). |
'</b><br>'; |
'</b><br />'; |
} |
} |
return $output; |
return $output; |
} |
} |