version 1.1055, 2010/03/15 05:10:03
|
version 1.1056, 2010/03/17 20:22:06
|
Line 6418 sub autoupdate_coowners {
|
Line 6418 sub autoupdate_coowners {
|
my %coursehash = &coursedescription($cdom.'_'.$cnum); |
my %coursehash = &coursedescription($cdom.'_'.$cnum); |
my $instcode = $coursehash{'internal.coursecode'}; |
my $instcode = $coursehash{'internal.coursecode'}; |
if ($instcode ne '') { |
if ($instcode ne '') { |
unless ($coursehash{'internal.courseowner'} eq $uname.':'.$udom) { |
if (($start && $start <= $now) && ($end == 0) || ($end > $now)) { |
my ($result,$desc) = &auto_validate_instcode($cnum,$cdom,$instcode,$uname.':'.$udom); |
unless ($coursehash{'internal.courseowner'} eq $uname.':'.$udom) { |
if ($result eq 'valid') { |
|
my ($delcoowners,@newcoowners,$putresult,$delresult,$coowners); |
my ($delcoowners,@newcoowners,$putresult,$delresult,$coowners); |
if (($end == 0) || ($end > $now)) { |
my ($result,$desc) = &auto_validate_instcode($cnum,$cdom,$instcode,$uname.':'.$udom); |
if ($coursehash{'internal.co-owners'}) { |
if ($result eq 'valid') { |
|
if ($coursehash{'internal.co-owners'}) { |
foreach my $coowner (split(',',$coursehash{'internal.co-owners'})) { |
foreach my $coowner (split(',',$coursehash{'internal.co-owners'})) { |
push(@newcoowners,$coowner); |
push(@newcoowners,$coowner); |
} |
} |
Line 6873 ENDINITMAP
|
Line 6873 ENDINITMAP
|
} |
} |
# ----------------------------------------------------------- Write preferences |
# ----------------------------------------------------------- Write preferences |
&writecoursepref($udom.'_'.$uname, |
&writecoursepref($udom.'_'.$uname, |
('description' => $description, |
('description' => $description, |
'url' => $topurl)); |
'url' => $topurl, |
|
'internal.creator' => $env{'user.name'}.':'. |
|
$env{'user.domain'}, |
|
'internal.created' => $now, |
|
'internal.creationcontext' => $context) |
|
); |
return '/'.$udom.'/'.$uname; |
return '/'.$udom.'/'.$uname; |
} |
} |
|
|