--- loncom/auth/lonroles.pm 2010/12/05 16:15:02 1.240.2.19 +++ loncom/auth/lonroles.pm 2010/12/08 06:48:56 1.240.2.23 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.240.2.19 2010/12/05 16:15:02 raeburn Exp $ +# $Id: lonroles.pm,v 1.240.2.23 2010/12/08 06:48:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -500,7 +500,7 @@ ENDENTERKEY $courseid = substr($courseid, 1); } $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'})) { $furl = "/adm/helper/course.initialization.helper"; # Send the user to the course they selected @@ -524,7 +524,7 @@ ENDENTERKEY .$env{'request.course.sec'}) ) { my $startpage = &courseloadpage($courseid); - unless (($startpage eq 'firstres') || ($cdom eq 'gcitest')) { + unless (($startpage eq 'firstres') || ($cdom =~ /^\w+citest$/)) { $msg = &mt('Entering [_1] ...', $env{'course.'.$courseid.'.description'}); &redirect_user($r,&mt('New in course'), @@ -539,7 +539,7 @@ ENDENTERKEY # Guess not ... $furl=&Apache::lonpageflip::first_accessible_resource(); } - if (($cdom eq 'gcitest') && ($custommenu)) { + if (($cdom =~ /^\w+citest$/) && ($custommenu)) { $furl = '/adm/navmaps'; } $msg = &mt('Entering [_1] ...', @@ -743,8 +743,8 @@ ENDHEADER } } if ($custommenu) { - if ($env{'form.destinationurl'} eq '/adm/gci_info') { - $r->print(&gci_info_page()). + if ($env{'form.destinationurl'} eq '/adm/ci_info') { + $r->print(&ci_info_page()). &Apache::loncommon::end_page(); return OK; } @@ -755,17 +755,12 @@ ENDHEADER my $switcher; if ($numcourses > 0) { $switcher = &Apache::loncommon::gcitest_switcher('cc',%courses); - my $current; - if ($env{'request.course.id'}) { - $current = 'cc./'.$env{'course.'.$env{'request.course.id'}.'.domain'}. - '/'.$env{'course.'.$env{'request.course.id'}.'.num'}; - } } $r->print(&Apache::lonmenu::inlinemenu('gcicustom',$switcher). &Apache::loncommon::end_page()); return OK; } else { - if ($env{'form.destinationurl'} eq '/adm/gci_info') { + if ($env{'form.destinationurl'} eq '/adm/ci_info') { delete($env{'form.destinationurl'}); } } @@ -780,7 +775,7 @@ ENDHEADER $r->print(&Apache::loncoursequeueadmin::queued_selfenrollment()); my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description'); my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&'); - unless ($env{'user.domain'} eq 'gcitest') { + unless ($env{'user.domain'} =~ /^\w+citest$/) { $r->print( '
' .&mt('[_1]Visit the [_2]Course/Community Catalog[_3]' @@ -804,23 +799,24 @@ ENDHEADER $r->print('
For more information about writing and reviewing Concept Inventory questions please refer to the GCI Workbook.
', + ); + my $output = <<"END";Use the tabs to navigate the WebCenter and...
For more information about writing and reviewing Concept Inventory questions -please refer to the GCI Workbook. +$info{$inventory}