');
@@ -298,7 +322,13 @@ function setCourseId(caller) {
$r->print(' ');
}
} else {
- $r->print(' '.&mt('No official courses to display for [_1].',$domdesc));
+ &cat_header($r,$codedom,$js,\%add_entries,$catlinks,$numtitles);
+ my $cat_maxdepth = $env{'form.catalog_maxdepth'};
+ $r->print('');
}
return $numtitles;
}
@@ -332,9 +362,29 @@ sub cat_header {
'
'.
- '
');
+ ' '.
+ ' ');
return;
}
@@ -342,9 +392,14 @@ sub category_breadcrumbs {
my ($dom) = @_;
my %domconfig =
&Apache::lonnet::get_dom('configuration',['coursecategories'],$dom);
- my (@cats,@trails,%allitems,%idx,@jsarray);
- &Apache::loncommon::extract_categories($domconfig{'coursecategories'},\@cats,\@trails,
- \%allitems,\%idx,\@jsarray);
+ my (@cats,@trails,%allitems,%idx,@jsarray,$cathash);
+ if (ref($domconfig{'coursecategories'}) eq 'HASH') {
+ $cathash = $domconfig{'coursecategories'}{'cats'};
+ } else {
+ $cathash = {};
+ }
+ &Apache::loncommon::extract_categories($cathash,\@cats,\@trails,\%allitems,\%idx,
+ \@jsarray);
my $currdepth = 0;
my $deeper = 0;
my $currcat_str;
@@ -402,7 +457,7 @@ sub category_breadcrumbs {
$catlinks .= ''."\n";
}
$catlinks .= ''."\n".
- ' ';
+ ' ';
}
} else {
$catlinks .= &mt('Official courses (with institutional codes)').
@@ -432,7 +487,7 @@ sub category_breadcrumbs {
$catlinks .= ''."\n";
}
$catlinks .= ''."\n".
- ' ';
+ ' ';
}
}
$catlinks .= $currcat_str.'';
@@ -559,9 +614,14 @@ sub search_official_courselist {
$instcode = '.';
}
}
- my %courses = &Apache::lonnet::courseiddump($domain,'.',1,$instcode,'.','.',
- undef,undef,'Course',1,
- $env{'form.showselfenroll'});
+ my $showhidden;
+ if (&user_is_dc($domain)) {
+ $showhidden = $env{'form.showhidden'};
+ }
+ my %courses =
+ &Apache::lonnet::courseiddump($domain,'.',1,$instcode,'.','.',undef,undef,
+ 'Course',1,$env{'form.showselfenroll'},undef,
+ $showhidden,'coursecatalog');
return %courses;
}
@@ -575,9 +635,14 @@ sub search_courselist {
}
my %courses;
if ($filter ne '') {
- %courses = &Apache::lonnet::courseiddump($domain,'.',1,'.','.','.',
- undef,undef,'Course',1,
- $env{'form.showselfenroll'},$filter);
+ my $showhidden;
+ if (&user_is_dc($domain)) {
+ $showhidden = $env{'form.showhidden'};
+ }
+ %courses =
+ &Apache::lonnet::courseiddump($domain,'.',1,'.','.','.',undef,undef,
+ '.',1,$env{'form.showselfenroll'},
+ $filter,$showhidden,'coursecatalog');
}
return %courses;
}
@@ -611,8 +676,10 @@ sub print_course_listing {
$output = &mt('No courses match the criteria you selected.');
return $output;
}
- if ($knownuser && !$env{'form.showdetails'}) {
- $output = &mt('Note for students: If you are officially enrolled in a course but the course is not listed in your LON-CAPA courses, click the "Show more details" link for the specific course and check the default access dates and/or automated enrollment settings.
');
+ if (($knownuser) && (!$env{'form.showdetails'}) && (!&user_is_dc($domain))) {
+ $output = ''.&mt('Note for students:').' '
+ .&mt('If you are officially enrolled in a course but the course is not listed in your LON-CAPA courses, click the "Show more details" link for the specific course and check the default access dates and/or automated enrollment settings.')
+ .'