'.
- &Apache::loncommon::end_data_table_header_row();
- my %courseinfo;
- foreach my $course (keys(%courses)) {
- my $descr;
- if ($courses{$course} =~ m/^([^:]*):/i) {
- $descr = &unescape($1);
+ if ($env{'form.coursenum'} ne '') {
+ %courses = &Apache::lonnet::courseiddump($domain,'.',1,'.','.',
+ $env{'form.coursenum'},
+ undef,undef,'.',1);
+ if (keys(%courses) == 0) {
+ $output = '
';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $output .= &mt('The courseID provided does not match a community in this domain.');
+ } elsif ($env{'form.currcat_0'} eq 'placement::0') {
+ $output .= &mt('The courseID provided does not match a placement test in this domain.');
+ } else {
+ $output .= &mt('The courseID provided does not match a course in this domain.');
+ }
+ $output .= '
';
+ return $output;
+ }
+ } else {
+ if ($env{'form.currcat_0'} eq 'instcode::0') {
+ %courses = &search_official_courselist($domain,$numtitles,$codetitles);
} else {
- $descr = &unescape($courses{$course});
+ %courses = &search_courselist($domain,$subcats);
}
- my $cleandesc=&HTML::Entities::encode($descr,'<>&"');
- $cleandesc=~s/'/\\'/g;
- my ($cdom,$cnum)=split(/\_/,$course);
- my ($desc,$instcode,$owner,$ttype) = split/:/,$courses{$course};
- $owner = &unescape($owner);
- my ($ownername,$ownerdom);
- if ($owner =~ /:/) {
- ($ownername,$ownerdom) = split(/:/,$owner);
- } else {
- $ownername = $owner;
- if ($owner ne '') {
- $ownerdom = $cdom;
+ if (keys(%courses) == 0) {
+ $output = '
';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $output .= &mt('No communities match the criteria you selected.');
+ } elsif ($env{'form.currcat_0'} eq 'placement::0') {
+ $output .= &mt('No placement tests match the criteria you selected.');
+ } else {
+ $output .= &mt('No courses match the criteria you selected.');
}
+ $output .= '
';
+ return $output;
}
- my %ownernames;
- if ($ownername ne '' && $ownerdom ne '') {
- %ownernames = &Apache::loncommon::getnames($ownername,$ownerdom);
+ if (($knownuser) && (!$env{'form.showdetails'}) && (!&user_is_dc($domain)) && (!$canviewall)) {
+ $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.')
+ .'