Diff for /loncom/interface/lonpickcourse.pm between versions 1.118 and 1.119

version 1.118, 2016/10/03 18:46:29 version 1.119, 2016/10/05 13:59:46
Line 404  sub display_matched_courses { Line 404  sub display_matched_courses {
                .'<fieldset>'                 .'<fieldset>'
                .'<legend>'.&mt('Pick action').'</legend>'                 .'<legend>'.&mt('Pick action').'</legend>'
                .'<span class="LC_nobreak"><label>'                 .'<span class="LC_nobreak"><label>'
                .'<input type="radio" name="phase" value="ccrole"'.$ccrolechk.'/>'                 .'<input type="radio" name="phase" value="adhocrole"'.$ccrolechk.'/>'
                .'&nbsp;');                 .'&nbsp;');
             if ($type eq 'Community') {              if (&Apache::lonnet::allowed('ccc',$crsdom)) {
                 $r->print(&mt('Enter the community with the role of [_1].',$cctitle));                  if ($type eq 'Community') {
             } elsif ($type eq 'Placement') {                      $r->print(&mt('Enter the community with the role of [_1].',$cctitle));
                 $r->print(&mt('Enter the placement test with the role of [_1].',$cctitle));                  } elsif ($type eq 'Placement') {
             } else {                      $r->print(&mt('Enter the placement test with the role of [_1].',$cctitle));
                 $r->print(&mt('Enter the course with the role of [_1].',$cctitle));                  } else {
                       $r->print(&mt('Enter the course with the role of [_1].',$cctitle));
                   }
               } elsif (&Apache::lonnet::allowed('rar',$crsdom)) {
                   my %adhocroles = &Apache::lonnet::userenvironment($env{'user.domain'},$env{'user.name'},
                                                                     'adhocroles.'.$crsdom);
                   if (keys(%adhocroles)) {
                       my @adhoc = split(/,/,$adhocroles{'adhocroles.'.$crsdom});
                       if (@adhoc > 1) {
                           my %adhochash;
                           map { $adhochash{$_} = $_; } @adhoc; 
                           my $selector = &Apache::loncommon::select_form($adhoc[0],'adhocrole',\%adhochash);
                           if ($type eq 'Community') {
                               $r->print(&mt('Enter the community with one of the available ad hoc roles: [_1].',
                                             $selector)); 
                           } elsif ($type eq 'Placement') {
                               $r->print(&mt('Enter the placement test with one of the available ad hoc roles: [_1].',
                                             $selector));
                           } else {
                               $r->print(&mt('Enter the course with one of the available ad hoc roles: [_1].',
                                             $selector));
                           }
                       } else {
                           if ($type eq 'Community') {
                               $r->print(&mt('Enter the community with the ad hoc role of: [_1]',$adhoc[0]));
                           } elsif ($type eq 'Placement') {
                               $r->print(&mt('Enter the placement test with the ad hoc role of: [_1]',$adhoc[0]));
                           } else {
                               $r->print(&mt('Enter the course with the ad hoc role of: [_1]',$adhoc[0]));
                           }
                       }
                   }
             }              }
             $r->print('</label></span><br />'              $r->print('</label></span><br />'
                .'<span class="LC_nobreak"><label>'                 .'<span class="LC_nobreak"><label>'
                .'<input type="radio" name="phase" value="menu"'.$menuchk.'/>&nbsp;');                 .'<input type="radio" name="phase" value="menu"'.$menuchk.'/>&nbsp;');
             if ($type eq 'Community') {              if (&Apache::lonnet::allowed('ccc',$crsdom)) {
                 $r->print(&mt('View or modify community settings which only a [_1] may modify.',$dctitle));                  if ($type eq 'Community') {
             } elsif ($type eq 'Placement') {                      $r->print(&mt('View or modify community settings which only a [_1] may modify.',$dctitle));
                 $r->print(&mt('View or modify placement test settings which only a [_1] may modify.',$dctitle));                  } elsif ($type eq 'Placement') {
             } else {                      $r->print(&mt('View or modify placement test settings which only a [_1] may modify.',$dctitle));
                 $r->print(&mt('View or modify course settings which only a [_1] may modify.',$dctitle));                  } else {
                       $r->print(&mt('View or modify course settings which only a [_1] may modify.',$dctitle));
                   }
               } elsif (&Apache::lonnet::allowed('rar',$crsdom)) {
                   if ($type eq 'Community') {
                       $r->print(&mt('View community settings which only a [_1] may modify.',$dctitle));
                   } elsif ($type eq 'Placement') {
                       $r->print(&mt('View placement test settings which only a [_1] may modify.',$dctitle));
                   } else {
                       $r->print(&mt('View course settings which only a [_1] may modify.',$dctitle));
                   }
             }              }
             $r->print('</label></span>'              $r->print('</label></span>'
                .'</fieldset></div>'                       .'</fieldset></div>'
                .'<br clear="all" />'                       .'<br clear="all" />'
             );                       );
         }          }
     }      }
     my %by_descrip;      my %by_descrip;

Removed from v.1.118  
changed lines
  Added in v.1.119


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>