Diff for /loncom/auth/lonroles.pm between versions 1.240.2.17 and 1.240.2.18

version 1.240.2.17, 2010/10/04 17:43:24 version 1.240.2.18, 2010/10/06 18:46:53
Line 592  ENDENTERKEY Line 592  ENDENTERKEY
     return OK if $r->header_only;      return OK if $r->header_only;
   
     my ($crumbtext,$pagetitle,$recent,$show_course);      my ($crumbtext,$pagetitle,$recent,$show_course);
       $show_course=&Apache::loncommon::show_course();
     my $noscript='<span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />';      my $noscript='<span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />';
     if ($custommenu) {      if ($custommenu) {
         my $brcrum = {'bread_crumbs' => 1};          my $brcrum = {'bread_crumbs' => 1};
Line 610  ENDCUSTOM Line 611  ENDCUSTOM
         $crumbtext = 'User Roles';          $crumbtext = 'User Roles';
         $pagetitle = 'My Roles';          $pagetitle = 'My Roles';
         $recent = &mt('Recent Roles');          $recent = &mt('Recent Roles');
         $show_course=&Apache::loncommon::show_course();          my $standby=&mt('Role selected. Please stand by.');
         if ($show_course) {          if ($show_course) {
             $crumbtext = 'Courses';              $crumbtext = 'Courses';
             $pagetitle = 'My Courses';              $pagetitle = 'My Courses';
             $recent = &mt('Recent Courses');              $recent = &mt('Recent Courses');
               $standby = &mt('Course selected. Please stand by.');
           }
           my $brcrum = [{ href    => '/adm/roles',
                            text    => $crumbtext,},
                        ];
           my $args;
           if (($env{'user.domain'} eq 'gcitest') && (!$numdc)) {
               $args = {bread_crumbs        => $brcrum,
                        bread_crumbs_nomenu => 1};
           } else {
               $args = {bread_crumbs => $brcrum};
         }          }
         my $brcrum =[{href=>"/adm/roles",text=>$crumbtext}];          my $start_page=&Apache::loncommon::start_page($pagetitle,undef,$args);
         my $swinfo=&Apache::lonmenu::rawconfig();          my $swinfo=&Apache::lonmenu::rawconfig();
         my $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum});  
         my $standby=&mt('Role selected. Please stand by.');  
         $standby=~s/\n/\\n/g;          $standby=~s/\n/\\n/g;
         $r->print(<<ENDHEADER);          $r->print(<<ENDHEADER);
 $start_page  $start_page
Line 807  ENDSCRIPT Line 817  ENDSCRIPT
  if ($inrole) {   if ($inrole) {
     $r->print('<h2>'.&mt('Currently no additional roles, courses or communities').'</h2>');      $r->print('<h2>'.&mt('Currently no additional roles, courses or communities').'</h2>');
  } else {   } else {
     $r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>');              if ($show_course) {
                   if ($env{'user.domain'} eq 'gcitest') {
                       $r->print('<h2>'.&mt('Currently no active Concept Tests').'</h2>');
                   } else { 
                       $r->print('<h2>'.&mt('Currently no active courses or communities').'</h2>');
                   }
               } else {
           $r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>');
               }
  }   }
         unless ($env{'user.domain'} eq 'gcitest') {          unless ($env{'user.domain'} eq 'gcitest') {
             &findcourse_advice($r);              &findcourse_advice($r);
Line 815  ENDSCRIPT Line 833  ENDSCRIPT
         }          }
  $r->print('</form>');   $r->print('</form>');
         if ($countfuture) {          if ($countfuture) {
             $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture));              if ($show_course) {
                   if ($env{'user.domain'} eq 'gcitest') {
                       $r->print(&mt('The following [quant,_1,Concept Test] will be available in the future:',$countfuture));
                   } else {
                       $r->print(&mt('The following [quant,_1,course] will become active in the future:',$countfuture));
                   }
               } else {
                   $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture));
               }
             my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,              my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,
                                                $nochoose);                                                 $nochoose);
             &print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles,              &print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles,
Line 864  ENDSCRIPT Line 890  ENDSCRIPT
         }          }
     }      }
 # ----------------------------------------------------------------------- Table  # ----------------------------------------------------------------------- Table
     unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) {      unless ((!$show_course) || ($nochoose) || ($countactive==1)) {
  $r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n");   $r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n");
     }      }
     if ($env{'form.destinationurl'}) {      if ($env{'form.destinationurl'}) {

Removed from v.1.240.2.17  
changed lines
  Added in v.1.240.2.18


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