--- loncom/interface/loncreateuser.pm 2006/07/19 10:10:40 1.125.2.3 +++ loncom/interface/loncreateuser.pm 2006/12/01 21:52:29 1.141 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.125.2.3 2006/07/19 10:10:40 albertel Exp $ +# $Id: loncreateuser.pm,v 1.141 2006/12/01 21:52:29 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -66,7 +66,7 @@ use Apache::loncommon; use Apache::lonlocal; use Apache::longroup; use lib '/home/httpd/lib/perl/'; -use LONCAPA; +use LONCAPA qw(:DEFAULT :match); my $loginscript; # piece of javascript used in two separate instances my $generalrule; @@ -99,8 +99,8 @@ sub initialize_authen_forms { sub my_custom_roles { my %returnhash=(); my %rolehash=&Apache::lonnet::dump('roles'); - foreach (keys %rolehash) { - if ($_=~/^rolesdef\_(\w+)$/) { + foreach my $key (keys %rolehash) { + if ($key=~/^rolesdef\_(\w+)$/) { $returnhash{$1}=$1; } } @@ -116,6 +116,20 @@ sub authorpriv { return 1; } +# ==================================================== + +sub portfolio_quota { + my ($ccuname,$ccdomain) = @_; + my %lt = &Apache::lonlocal::texthash( + 'disk' => "Disk space allocated to user's portfolio files", + ); + my $output = '
$lt{'rev'} | $lt{'ren'} | $lt{'del'} | $lt{'rol'} | $lt{'e -xt'} | $lt{'sta'} | $lt{'end'} | -END +'.$lt{'rev'}.' | '.$lt{'ren'}.' | '.$lt{'del'}. +' | '.$lt{'rol'}.' | '.$lt{'ext'}. +' | '.$lt{'sta'}.' | '.$lt{'end'}.' | '. +&Apache::loncommon::end_data_table_header_row()); foreach my $type ('Construction Space','Course','Group','Domain','System','Unknown') { if ($output{$type}) { $r->print($output{$type}."\n"); } } - $r->print('
---|
$authformloc
ENDBADAUTH } else { - # This user is not allowed to modify the users + # This user is not allowed to modify the user's # authentication scheme, so just notify them of the problem my %lt=&Apache::lonlocal::texthash( 'err' => "ERROR", @@ -803,9 +828,6 @@ ENDBADAUTH ); $r->print(<$authformint
$authformfsys
"; } $authformcurrent.=' (will override current values)$lt{'act'} | $lt{'rol'} | $lt{'ext'} | -$lt{'sta'} | $lt{'end'} | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- | $lt{'cau'} | -$cudom\_$cuname | --$lt{'ssd'} | -
+ $r->print(''.$lt{'cs'}.''."\n". + &Apache::loncommon::start_data_table()."\n". + &Apache::loncommon::start_data_table_header_row()."\n". + ' | '.$lt{'act'}.' | '.$lt{'rol'}.' | '. + ''.$lt{'ext'}.' | '.$lt{'sta'}.' | '. + ''.$lt{'end'}.' | '."\n". + &Apache::loncommon::end_data_table_header_row()."\n". + &Apache::loncommon::start_data_table_row()."\n". + '+ + | +'.$lt{'cau'}.' | +'.$cudom.'_'.$cuname.' | ++ '.$lt{'ssd'}.' | +$lt{'sed'} | -
- | $lt{'caa'} | -$cudom\_$cuname | -+"javascript:pjump('."'date_end','End Date Co-Author',document.cu.end_$cudom\_$cuname\_ca.value,'end_$cudom\_$cuname\_ca','cu.pres','dateset'".')">'.$lt{'sed'}.' | '."\n". + &Apache::loncommon::end_data_table_row()."\n". + &Apache::loncommon::start_data_table_row()."\n". +'+ | '.$lt{'caa'}.' | +'.$cudom.'_'.$cuname.' | +$lt{'ssd'} | -+"javascript:pjump('."'date_start','Start Date Assistant Co-Author',document.cu.start_$cudom\_$cuname\_aa.value,'start_$cudom\_$cuname\_aa','cu.pres','dateset'".')">'.$lt{'ssd'}.' | +$lt{'sed'} | -
'.&mt('Activate').' | '.&mt('Role').' | '.&mt('Extent').' | '. - ''.&mt('Start').' | '.&mt('End').' | '.&mt('Activate').' | '.&mt('Role').' | '. + &mt('Extent').' | '. + ''.&mt('Start').' | '.&mt('End').' | '. + &Apache::loncommon::end_data_table_header_row(); + foreach my $thisdomain ( sort( keys(%incdomains))) { + foreach my $role ('dc','li','dg','au','sc') { + if (&Apache::lonnet::allowed('c'.$role,$thisdomain)) { + my $plrole=&Apache::lonnet::plaintext($role); my %lt=&Apache::lonlocal::texthash( 'ssd' => "Set Start Date", 'sed' => "Set End Date" ); $num_domain_level ++; - $domaintext .= <<"ENDDROW"; -
---|---|---|---|---|---|---|---|---|---|
- | $plrole | -$thisdomain | -+ $domaintext .= +&Apache::loncommon::start_data_table_row(). +' | + | '.$plrole.' | +'.$thisdomain.' | +$lt{'ssd'} | -+"javascript:pjump('."'date_start','Start Date $plrole',document.cu.start_$thisdomain\_$role.value,'start_$thisdomain\_$role','cu.pres','dateset'".')">'.$lt{'ssd'}.' | +$lt{'sed'} | -
'.&mt('ERROR').': '.&mt('Unknown command').' '.$_.'
'.&mt('ERROR').': '.&mt('Unknown command').' '.$key.'