Diff for /loncom/auth/lonroles.pm between versions 1.161 and 1.162.2.1

version 1.161, 2006/06/27 14:10:11 version 1.162.2.1, 2006/06/29 17:51:37
Line 266  ENDENTERKEY Line 266  ENDENTERKEY
     }      }
     return OK;      return OK;
  } else {   } else {
                             my $type = 'Course/Group';  
     if (!$env{'request.course.id'}) {      if (!$env{'request.course.id'}) {
  $type = &Apache::loncommon::course_type();  
  &Apache::lonnet::appenv(   &Apache::lonnet::appenv(
       "request.course.id"  => $cdom.'_'.$cnum);        "request.course.id"  => $cdom.'_'.$cnum);
  $furl='/adm/roles?tryagain=1';   $furl='/adm/roles?tryagain=1';
  $msg=   $msg=
     '<h1><span class="LC_error">'.      '<h1><span class="LC_error">'.
     &mt('Could not initialize '.lc($type).' at this time.').      &mt('Could not initialize [_1] at this time.',
    $env{'course.'.$cdom.'_'.$cnum.'.description'}).
     '</span></h1><h3>'.&mt('Please try again.').'</h3>'.$ferr;      '</span></h1><h3>'.&mt('Please try again.').'</h3>'.$ferr;
     }      }
     if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; }      if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; }
Line 303  ENDENTERKEY Line 302  ENDENTERKEY
  ) {   ) {
  my $startpage = &courseloadpage($courseid);   my $startpage = &courseloadpage($courseid);
  unless ($startpage eq 'firstres') {            unless ($startpage eq 'firstres') {         
     $msg = &mt('Entering '.lc($type).' ....');      $msg = &mt('Entering [_1] ....',
          $env{'course.'.$courseid.'.description'});
     &redirect_user($r,&mt('New in course'),      &redirect_user($r,&mt('New in course'),
    '/adm/whatsnew?refpage=start',$msg,     '/adm/whatsnew?refpage=start',$msg,
    $env{'environment.remotenavmap'});     $env{'environment.remotenavmap'});
Line 316  ENDENTERKEY Line 316  ENDENTERKEY
 # Guess not ...  # Guess not ...
     $furl=&Apache::lonpageflip::first_accessible_resource();      $furl=&Apache::lonpageflip::first_accessible_resource();
  }   }
                                 $msg = &mt('Entering '.lc($type).' ...');                                  $msg = &mt('Entering [_1] ...',
  &redirect_user($r,&mt('Entering '.$type),     $env{'course.'.$courseid.'.description'});
    &redirect_user($r,&mt('Entering [_1]',
         $env{'course.'.$courseid.'.description'}),
        $furl,$msg,         $furl,$msg,
        $env{'environment.remotenavmap'});         $env{'environment.remotenavmap'});
     }      }
Line 633  ENDHEADER Line 635  ENDHEADER
 # More than one possible role  # More than one possible role
 # ----------------------------------------------------------------------- Table  # ----------------------------------------------------------------------- Table
     unless (($advanced) || ($nochoose)) {      unless (($advanced) || ($nochoose)) {
  $r->print("<h2>".&mt('Select a Course/Group to Enter')."</h2>\n");   $r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n");
     }      }
     $r->print('<br /><table><tr>');      $r->print('<br /><table><tr>');
     unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }      unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }
Line 1010  sub allcourses_row { Line 1012  sub allcourses_row {
     my ($dcdom,$rowtype) = @_;      my ($dcdom,$rowtype) = @_;
     my $output = '<tr bgcolor="#77FF77">'.      my $output = '<tr bgcolor="#77FF77">'.
                  ' <td colspan="5">';                   ' <td colspan="5">';
     foreach my $type ('Course','Group') {      foreach my $type ('Course') {
         my $selectlink = &courselink($dcdom,$rowtype,$type);          my $selectlink = &courselink($dcdom,$rowtype,$type);
         my $ccrole = &Apache::lonnet::plaintext('cc',$type);          my $ccrole = &Apache::lonnet::plaintext('cc',$type);
         $output.= '<font color="#002200">'.$ccrole.'</font>'.          $output.= '<font color="#002200">'.$ccrole.'</font>'.

Removed from v.1.161  
changed lines
  Added in v.1.162.2.1


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