version 1.89, 2016/04/04 01:09:47
|
version 1.90, 2016/10/05 13:36:53
|
Line 80 sub handler {
|
Line 80 sub handler {
|
my %domconfig = |
my %domconfig = |
&Apache::lonnet::get_dom('configuration',['coursecategories'],$codedom); |
&Apache::lonnet::get_dom('configuration',['coursecategories'],$codedom); |
my $knownuser = &user_is_known(); |
my $knownuser = &user_is_known(); |
my $canviewall = &canview_all(); |
my $canviewall = &canview_all($knownuser,$codedom); |
|
|
my ($cathash,$cattype); |
my ($cathash,$cattype); |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |
Line 754 sub additional_filters {
|
Line 754 sub additional_filters {
|
$showhidden_status = 'checked="checked" '; |
$showhidden_status = 'checked="checked" '; |
} |
} |
my @currstatuses = &Apache::loncommon::get_env_multiple('form.showcounts'); |
my @currstatuses = &Apache::loncommon::get_env_multiple('form.showcounts'); |
my $dc_title = &Apache::lonnet::plaintext('dc'); |
|
my ($details_text,$hidden_text,$statusdisplay,$cellborder); |
my ($details_text,$hidden_text,$statusdisplay,$cellborder); |
my $wasactivedisplay = 'none'; |
my $wasactivedisplay = 'none'; |
if ($env{'form.showdetails'}) { |
if ($env{'form.showdetails'}) { |
Line 768 sub additional_filters {
|
Line 767 sub additional_filters {
|
$cellborder = 'border-left: 0px'; |
$cellborder = 'border-left: 0px'; |
} |
} |
if ($env{'form.currcat_0'} eq 'communities::0') { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
$details_text = &mt('Show full details for each community ([_1] only)',$dc_title); |
$details_text = &mt('Show full details for each community (domain staff only)'); |
$hidden_text = &mt('Include communities set to be hidden from catalog ([_1] only)',$dc_title); |
$hidden_text = &mt('Include communities set to be hidden from catalog (domain staff only)'); |
} elsif ($env{'form.currcat_0'} eq 'placement::0') { |
} elsif ($env{'form.currcat_0'} eq 'placement::0') { |
$details_text = &mt('Show full details for each placement test ([_1] only)',$dc_title); |
$details_text = &mt('Show full details for each placement test (domain staff only)'); |
$hidden_text = &mt('Include placement tests set to be hidden from catalog ([_1] only)',$dc_title); |
$hidden_text = &mt('Include placement tests set to be hidden from catalog (domain staff only)'); |
} else { |
} else { |
$details_text = &mt('Show full details for each course ([_1] only)',$dc_title); |
$details_text = &mt('Show full details for each course (domain staff only)'); |
$hidden_text = &mt('Include courses set to be hidden from catalog ([_1] only)',$dc_title); |
$hidden_text = &mt('Include courses set to be hidden from catalog (domain staff only)'); |
} |
} |
if ($is_dc) { |
if ($is_dc) { |
$output .= '<span class="LC_nobreak">'. |
$output .= '<span class="LC_nobreak">'. |
Line 890 sub user_is_dc {
|
Line 889 sub user_is_dc {
|
} |
} |
|
|
sub canview_all { |
sub canview_all { |
|
my ($knownuser,$codedom) = @_; |
my $canviewall = 0; |
my $canviewall = 0; |
my $page = 'coursecatalog'; |
my $page = 'coursecatalog'; |
if (&LONCAPA::lonauthcgi::can_view($page)) { |
if (&LONCAPA::lonauthcgi::can_view($page)) { |
$canviewall = 1; |
$canviewall = 1; |
} elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page)) { |
} elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page)) { |
$canviewall= 1; |
$canviewall= 1; |
|
} elsif (($knownuser) && ($codedom ne '')) { |
|
if (&Apache::lonnet::allowed('dcd',$codedom)) { |
|
$canviewall = 1; |
|
} |
} |
} |
return $canviewall; |
return $canviewall; |
} |
} |