version 1.1075.2.95, 2015/05/22 17:33:11
|
version 1.1075.2.97, 2016/01/27 01:18:13
|
Line 4632 sub blocking_status {
|
Line 4632 sub blocking_status {
|
# build a link to a popup window containing the details |
# build a link to a popup window containing the details |
my $querystring = "?activity=$activity"; |
my $querystring = "?activity=$activity"; |
# $uname and $udom decide whose portfolio the user is trying to look at |
# $uname and $udom decide whose portfolio the user is trying to look at |
if ($activity eq 'port') { |
if (($activity eq 'port') || ($activity eq 'passwd')) { |
$querystring .= "&udom=$udom" if $udom; |
$querystring .= "&udom=$udom" if ($udom =~ /^$match_domain$/); |
$querystring .= "&uname=$uname" if $uname; |
$querystring .= "&uname=$uname" if ($uname =~ /^$match_username$/); |
} elsif ($activity eq 'docs') { |
} elsif ($activity eq 'docs') { |
$querystring .= '&url='.&HTML::Entities::encode($url,'&"'); |
$querystring .= '&url='.&HTML::Entities::encode($url,'&"'); |
} |
} |
Line 4659 END_MYBLOCK
|
Line 4659 END_MYBLOCK
|
$class = ''; |
$class = ''; |
} elsif ($activity eq 'printout') { |
} elsif ($activity eq 'printout') { |
$text = &mt('Printing Blocked'); |
$text = &mt('Printing Blocked'); |
|
} elsif ($activity eq 'passwd') { |
|
$text = &mt('Password Changing Blocked'); |
} |
} |
$output .= <<"END_BLOCK"; |
$output .= <<"END_BLOCK"; |
<div class='$class'> |
<div class='$class'> |
Line 14129 sub check_clone {
|
Line 14131 sub check_clone {
|
$can_clone = 1; |
$can_clone = 1; |
} elsif (grep(/^\*\:\Q$args->{'ccdomain'}\E$/,@cloners)) { |
} elsif (grep(/^\*\:\Q$args->{'ccdomain'}\E$/,@cloners)) { |
$can_clone = 1; |
$can_clone = 1; |
|
} elsif (grep(/^\Q$args->{'ccuname'}\E:\Q$args->{'ccdomain'}\E$/,@cloners)) { |
|
$can_clone = 1; |
} |
} |
unless ($can_clone) { |
unless ($can_clone) { |
if (($clonehash{'internal.coursecode'}) && ($args->{'crscode'}) && ($args->{'clonedomain'} eq $args->{'course_domain'})) { |
if (($clonehash{'internal.coursecode'}) && ($args->{'crscode'}) && |
|
($args->{'clonedomain'} eq $args->{'course_domain'})) { |
my (%gotdomdefaults,%gotcodedefaults); |
my (%gotdomdefaults,%gotcodedefaults); |
foreach my $cloner (@cloners) { |
foreach my $cloner (@cloners) { |
if (($cloner ne '*') && ($cloner !~ /^\*\:$match_domain$/) && |
if (($cloner ne '*') && ($cloner !~ /^\*\:$match_domain$/) && |
Line 14162 sub check_clone {
|
Line 14167 sub check_clone {
|
} |
} |
} |
} |
} |
} |
unless ($can_clone) { |
} |
my $ccrole = 'cc'; |
} |
if ($args->{'crstype'} eq 'Community') { |
unless ($can_clone) { |
$ccrole = 'co'; |
my $ccrole = 'cc'; |
} |
if ($args->{'crstype'} eq 'Community') { |
my %roleshash = |
$ccrole = 'co'; |
&Apache::lonnet::get_my_roles($args->{'ccuname'}, |
} |
$args->{'ccdomain'}, |
my %roleshash = |
'userroles',['active'],[$ccrole], |
&Apache::lonnet::get_my_roles($args->{'ccuname'}, |
[$args->{'clonedomain'}]); |
$args->{'ccdomain'}, |
if (($roleshash{$args->{'clonecourse'}.':'.$args->{'clonedomain'}.':'.$ccrole}) || |
'userroles',['active'],[$ccrole], |
(grep(/^\Q$args->{'ccuname'}\E:\Q$args->{'ccdomain'}\E$/,@cloners))) { |
[$args->{'clonedomain'}]); |
$can_clone = 1; |
if ($roleshash{$args->{'clonecourse'}.':'.$args->{'clonedomain'}.':'.$ccrole}) { |
} elsif (&Apache::lonnet::is_course_owner($args->{'clonedomain'},$args->{'clonecourse'}, |
$can_clone = 1; |
$args->{'ccuname'},$args->{'ccdomain'})) { |
} elsif (&Apache::lonnet::is_course_owner($args->{'clonedomain'},$args->{'clonecourse'}, |
$can_clone = 1; |
$args->{'ccuname'},$args->{'ccdomain'})) { |
} |
$can_clone = 1; |
} |
|
} |
} |
} |
} |
unless ($can_clone) { |
unless ($can_clone) { |