Diff for /loncom/auth/lonroles.pm between versions 1.240.2.20 and 1.240.2.23

version 1.240.2.20, 2010/12/05 16:31:53 version 1.240.2.23, 2010/12/08 06:48:56
Line 500  ENDENTERKEY Line 500  ENDENTERKEY
     $courseid = substr($courseid, 1);      $courseid = substr($courseid, 1);
  }   }
  $courseid =~ s/\//_/;   $courseid =~ s/\//_/;
  if (($cdom ne 'gcitest') && (($role eq 'cc') || ($role eq 'co'))    if (($cdom !~ /^\w+citest$/) && (($role eq 'cc') || ($role eq 'co')) 
                                     && ($env{'course.' . $courseid .'.course.helper.not.run'})) {                                       && ($env{'course.' . $courseid .'.course.helper.not.run'})) { 
     $furl = "/adm/helper/course.initialization.helper";      $furl = "/adm/helper/course.initialization.helper";
     # Send the user to the course they selected      # Send the user to the course they selected
Line 524  ENDENTERKEY Line 524  ENDENTERKEY
     .$env{'request.course.sec'})      .$env{'request.course.sec'})
  ) {   ) {
  my $startpage = &courseloadpage($courseid);   my $startpage = &courseloadpage($courseid);
  unless (($startpage eq 'firstres') || ($cdom eq 'gcitest')) {   unless (($startpage eq 'firstres') || ($cdom =~ /^\w+citest$/)) {
     $msg = &mt('Entering [_1] ...',      $msg = &mt('Entering [_1] ...',
        $env{'course.'.$courseid.'.description'});         $env{'course.'.$courseid.'.description'});
     &redirect_user($r,&mt('New in course'),      &redirect_user($r,&mt('New in course'),
Line 539  ENDENTERKEY Line 539  ENDENTERKEY
 # Guess not ...  # Guess not ...
     $furl=&Apache::lonpageflip::first_accessible_resource();      $furl=&Apache::lonpageflip::first_accessible_resource();
  }   }
                                 if (($cdom eq 'gcitest') && ($custommenu)) {                                  if (($cdom =~ /^\w+citest$/) && ($custommenu)) {
                                     $furl = '/adm/navmaps';                                      $furl = '/adm/navmaps';
                                 }                                  }
                                 $msg = &mt('Entering [_1] ...',                                  $msg = &mt('Entering [_1] ...',
Line 743  ENDHEADER Line 743  ENDHEADER
         }          }
     }      }
     if ($custommenu) {      if ($custommenu) {
         if ($env{'form.destinationurl'} eq '/adm/gci_info') {          if ($env{'form.destinationurl'} eq '/adm/ci_info') {
             $r->print(&gci_info_page()).              $r->print(&ci_info_page()).
             &Apache::loncommon::end_page();              &Apache::loncommon::end_page();
             return OK;              return OK;
         }          }
Line 760  ENDHEADER Line 760  ENDHEADER
                   &Apache::loncommon::end_page());                    &Apache::loncommon::end_page());
         return OK;          return OK;
     } else {      } else {
         if ($env{'form.destinationurl'} eq '/adm/gci_info') {          if ($env{'form.destinationurl'} eq '/adm/ci_info') {
             delete($env{'form.destinationurl'});              delete($env{'form.destinationurl'});
         }          }
     }      }
Line 775  ENDHEADER Line 775  ENDHEADER
             $r->print(&Apache::loncoursequeueadmin::queued_selfenrollment());              $r->print(&Apache::loncoursequeueadmin::queued_selfenrollment());
             my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');              my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');
             my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');               my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&'); 
             unless ($env{'user.domain'} eq 'gcitest') {              unless ($env{'user.domain'} =~ /^\w+citest$/) {
                 $r->print(                  $r->print(
                     '<p>'                      '<p>'
                    .&mt('[_1]Visit the [_2]Course/Community Catalog[_3]'                     .&mt('[_1]Visit the [_2]Course/Community Catalog[_3]'
Line 799  ENDHEADER Line 799  ENDHEADER
     $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 {
             if ($show_course) {              if ($show_course) {
                 if ($env{'user.domain'} eq 'gcitest') {                  if ($env{'user.domain'} =~ /^\w+citest$/) {
                     $r->print('<h2>'.&mt('Currently no active Concept Tests').'</h2>');                      $r->print('<h2>'.&mt('Currently no active Concept Tests').'</h2>');
                 } elsif ($env{'user.domain'} eq 'gci') {                  } elsif ($env{'user.domain'} =~ /^\w+ci$/) {
                     $r->print('<h2>'.&mt('Currently not assigned as a GCI contributor').'</h2>');                      my $inventory = uc($env{'user.domain'});
                       $r->print('<h2>'.&mt('Currently not assigned as a [_1] contributor',$inventory).'</h2>');
                 }                  }
             } else {              } else {
         $r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>');          $r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>');
             }              }
  }   }
         unless ($env{'user.domain'} eq 'gcitest') {          unless ($env{'user.domain'} =~ /^\w+citest$/) {
             &findcourse_advice($r);              &findcourse_advice($r);
             &requestcourse_advice($r);              &requestcourse_advice($r);
         }          }
  $r->print('</form>');   $r->print('</form>');
         if ($countfuture) {          if ($countfuture) {
             if ($show_course) {              if ($show_course) {
                 if ($env{'user.domain'} eq 'gcitest') {                  if ($env{'user.domain'} =~ /^\w+citest$/) {
                     $r->print(&mt('The following [quant,_1,Concept Test] will be available in the future:',$countfuture));                      $r->print(&mt('The following [quant,_1,Concept Test] will be available in the future:',$countfuture));
                 } else {                  } else {
                     $r->print(&mt('The following [quant,_1,course] will become active in the future:',$countfuture));                      $r->print(&mt('The following [quant,_1,course] will become active in the future:',$countfuture));
Line 972  ENDHEADER Line 973  ENDHEADER
     return OK;      return OK;
 }  }
   
 sub gci_info_page {  sub ci_info_page {
     return <<"END";      my %longname = (
                        GCI  => 'Geoscience Concept Inventory',
                        SLCI => 'Science Literacy Concept Inventory',
                      );
       my $inventory = uc($env{'user.domain'});
       my %features = (
                        review     => "Review and comment on existing $inventory questions",
                        submit     => "Submit $inventory questions of your own",
                        managetest => 'Create an online test for your students',
                        tutorial   => 'View tutorials on creating online tests',
                      );
       my $tabs = &Apache::loncommon::ci_tabs($env{'user.domain'});
       my %info = (
                    GCI => '<p>For more information about writing and reviewing Concept Inventory questions please refer to the <a href="/res/gci/gci/internal/pdfs/GCIWorkbook.pdf">GCI Workbook</a>.</p>',
                  ); 
       my $output = <<"END";
 <br clear="all">  <br clear="all">
 <div>  <div>
 <h2>Welcome to the Geoscience Concept Inventory WebCenter</h2>  <h2>Welcome to the $longname{$inventory} WebCenter</h2>
 <p>  <p>
 Use the tabs to navigate the WebCenter and...  Use the tabs to navigate the WebCenter and...
 <ul>  <ul>
 <li>Review and comment on existing GCI questions</li>  END
 <li>Submit GCI questions of your own</li>      if (ref($tabs) eq 'ARRAY') {
 <li>Create an online test for your students</li>          foreach my $tab (@{$tabs}) {
 <li>View tutorials on creating online tests</li>              if ($features{$tab}) {
                   $output .= '<li>'.$features{$tab}.'</li>'."\n";
               }
           }
       }
       $output .= <<"END";
 </ul>  </ul>
 </p>  </p>
 <p>For more information about writing and reviewing Concept Inventory questions  $info{$inventory}
 please refer to the <a href="/res/gci/gci/internal/pdfs/GCIWorkbook.pdf">GCI Workbook</a>.  
 </div>  </div>
 END  END
   
 }  }
   
 sub gather_roles {  sub gather_roles {

Removed from v.1.240.2.20  
changed lines
  Added in v.1.240.2.23


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