--- loncom/interface/loncreateuser.pm 2001/03/19 19:54:37 1.9
+++ loncom/interface/loncreateuser.pm 2001/04/12 19:43:49 1.12
@@ -16,7 +16,7 @@
#
# 2/14 Gerd Kortemeyer)
#
-# 2/14,2/17,2/19,2/20,2/21,2/22,2/23,3/2,3/17 Gerd Kortemeyer
+# 2/14,2/17,2/19,2/20,2/21,2/22,2/23,3/2,3/17,3/24,04/12 Gerd Kortemeyer
#
package Apache::loncreateuser;
@@ -254,7 +254,7 @@ ENDNUSER
ENDDROW
}
- } ('dc','cc','li','dg','au');
+ } ('dc','li','dg','au');
} sort keys %incdomains;
$r->print('');
#
@@ -265,6 +265,7 @@ ENDDROW
'
Group/Section | Start | End | ');
map {
my $thiscourse=$_;
+ $thiscourse=~s/\_/\//g;
my %coursedata=&Apache::lonnet::coursedescription($thiscourse);
my $area=$coursedata{'description'};
my $bgcol=$thiscourse;
@@ -289,7 +290,7 @@ ENDDROW
ENDROW
}
- } ('st','ta','ep','ad','in');
+ } ('st','ta','ep','ad','in','cc');
} sort keys %inccourses;
$r->print('');
$r->print('');
@@ -346,6 +347,17 @@ ENDTHREEHEAD
$r->print('Revoking '.$2.' in '.$1.': '.
&Apache::lonnet::assignrole($ENV{'form.cdomain'},$ENV{'form.cuname'},
$1,$2,$now).'
');
+ if ($2 eq 'st') {
+ $1=~/^\/(\w+)\/(\w+)/;
+ my $cid=$1.'_'.$2;
+ $r->print('Drop from classlist: '.
+ &Apache::lonnet::critical('put:'.$ENV{'course.'.$cid.'.domain'}.':'.
+ $ENV{'course.'.$cid.'.num'}.':classlist:'.
+ &Apache::lonnet::escape($ENV{'form.cuname'}.':'.
+ $ENV{'form.cdomain'}).'='.
+ &Apache::lonnet::escape($now.':'),
+ $ENV{'course.'.$cid.'.home'}).'
');
+ }
}
} keys %ENV;
map {
@@ -365,6 +377,17 @@ ENDTHREEHEAD
$r->print('Assigning: '.$3.' in '.$url.': '.
&Apache::lonnet::assignrole($ENV{'form.cdomain'},$ENV{'form.cuname'},
$url,$3,$end,$start).'
');
+ if ($3 eq 'st') {
+ $url=~/^\/(\w+)\/(\w+)/;
+ my $cid=$1.'_'.$2;
+ $r->print('Add to classlist: '.
+ &Apache::lonnet::critical('put:'.$ENV{'course.'.$cid.'.domain'}.':'.
+ $ENV{'course.'.$cid.'.num'}.':classlist:'.
+ &Apache::lonnet::escape($ENV{'form.cuname'}.':'.
+ $ENV{'form.cdomain'}).'='.
+ &Apache::lonnet::escape($end.':'.$start),
+ $ENV{'course.'.$cid.'.home'}).'
');
+ }
} elsif (($_=~/^form\.act\_([^\_]+)\_([^\_]+)$/) && ($ENV{$_})) {
my $url='/'.$1.'/';
my $start=$now;