[LON-CAPA-cvs] cvs: loncom /interface coursecatalog.pm
raeburn
raeburn at source.lon-capa.org
Wed Oct 5 09:36:54 EDT 2016
raeburn Wed Oct 5 13:36:54 2016 EDT
Modified files:
/loncom/interface coursecatalog.pm
Log:
- Detailed course catalog view available to domain helpdesk staff
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.89 loncom/interface/coursecatalog.pm:1.90
--- loncom/interface/coursecatalog.pm:1.89 Mon Apr 4 01:09:47 2016
+++ loncom/interface/coursecatalog.pm Wed Oct 5 13:36:53 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for displaying the course catalog interface
#
-# $Id: coursecatalog.pm,v 1.89 2016/04/04 01:09:47 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.90 2016/10/05 13:36:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -80,7 +80,7 @@
my %domconfig =
&Apache::lonnet::get_dom('configuration',['coursecategories'],$codedom);
my $knownuser = &user_is_known();
- my $canviewall = &canview_all();
+ my $canviewall = &canview_all($knownuser,$codedom);
my ($cathash,$cattype);
if (ref($domconfig{'coursecategories'}) eq 'HASH') {
@@ -754,7 +754,6 @@
$showhidden_status = 'checked="checked" ';
}
my @currstatuses = &Apache::loncommon::get_env_multiple('form.showcounts');
- my $dc_title = &Apache::lonnet::plaintext('dc');
my ($details_text,$hidden_text,$statusdisplay,$cellborder);
my $wasactivedisplay = 'none';
if ($env{'form.showdetails'}) {
@@ -768,14 +767,14 @@
$cellborder = 'border-left: 0px';
}
if ($env{'form.currcat_0'} eq 'communities::0') {
- $details_text = &mt('Show full details for each community ([_1] only)',$dc_title);
- $hidden_text = &mt('Include communities set to be hidden from catalog ([_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 (domain staff only)');
} elsif ($env{'form.currcat_0'} eq 'placement::0') {
- $details_text = &mt('Show full details for each placement test ([_1] only)',$dc_title);
- $hidden_text = &mt('Include placement tests set to be hidden from catalog ([_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 (domain staff only)');
} else {
- $details_text = &mt('Show full details for each course ([_1] only)',$dc_title);
- $hidden_text = &mt('Include courses set to be hidden from catalog ([_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 (domain staff only)');
}
if ($is_dc) {
$output .= '<span class="LC_nobreak">'.
@@ -890,12 +889,17 @@
}
sub canview_all {
+ my ($knownuser,$codedom) = @_;
my $canviewall = 0;
my $page = 'coursecatalog';
if (&LONCAPA::lonauthcgi::can_view($page)) {
$canviewall = 1;
} elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page)) {
$canviewall= 1;
+ } elsif (($knownuser) && ($codedom ne '')) {
+ if (&Apache::lonnet::allowed('dcd',$codedom)) {
+ $canviewall = 1;
+ }
}
return $canviewall;
}
More information about the LON-CAPA-cvs
mailing list