--- loncom/auth/lonroles.pm 2010/12/05 17:22:18 1.240.2.22 +++ loncom/auth/lonroles.pm 2010/06/03 14:41:07 1.252 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.240.2.22 2010/12/05 17:22:18 raeburn Exp $ +# $Id: lonroles.pm,v 1.252 2010/06/03 14:41:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -57,8 +57,7 @@ course they should act on, etc. Both in handler determines via C's C<&allowed> function that a certain action is not allowed, C is used as error handler. This allows the user to select another role which may have permission to do -what they were trying to do. C can also be accessed via the -B button in the Remote Control. +what they were trying to do. =begin latex @@ -145,19 +144,11 @@ use HTML::Entities; sub redirect_user { - my ($r,$title,$url,$msg,$launch_nav) = @_; + my ($r,$title,$url,$msg) = @_; $msg = $title if (! defined($msg)); &Apache::loncommon::content_type($r,'text/html'); &Apache::loncommon::no_cache($r); $r->send_http_header; - my $swinfo=&Apache::lonmenu::rawconfig(); - my $navwindow; - if ($launch_nav eq 'on') { - $navwindow.=&Apache::lonnavdisplay::launch_win('now',undef,undef, - ($url =~ m-^/adm/whatsnew-)); - } else { - $navwindow.=&Apache::lonnavmaps::close(); - } # Breadcrumbs my $brcrum = [{'href' => $url, @@ -165,7 +156,6 @@ sub redirect_user { my $start_page = &Apache::loncommon::start_page('Switching Role',undef, {'redirect' => [1,$url], 'bread_crumbs' => $brcrum,}); - &Apache::lonhtmlcommon::clear_breadcrumbs(); my $end_page = &Apache::loncommon::end_page(); # Note to style police: @@ -173,12 +163,6 @@ sub redirect_user { $url=~s/ /\%20/g; $r->print(< -// - -$navwindow

$msg

$end_page ENDREDIR @@ -226,7 +210,6 @@ sub handler { my %dcroles = (); my $numdc = &check_fordc(\%dcroles,$then); &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); - my $custommenu = &Apache::loncommon::needs_gci_custom(); # ================================================================== Roles Init if ($env{'form.selectrole'}) { @@ -240,7 +223,16 @@ sub handler { if ($env{'request.course.id'}) { # Check if user is CC trying to select a course role if ($env{'form.switchrole'}) { - if (!defined($env{'user.role.'.$env{'form.switchrole'}})) { + my $switch_is_active; + if (defined($env{'user.role.'.$env{'form.switchrole'}})) { + my ($start,$end) = split(/\./,$env{'user.role.'.$env{'form.switchrole'}}); + if (!$end || $end > $now) { + if (!$start || $start < $refresh) { + $switch_is_active = 1; + } + } + } + unless ($switch_is_active) { &adhoc_course_role($refresh,$then); } } @@ -276,7 +268,7 @@ sub handler { my ($server_status,$home) = &check_author_homeserver($user,$domain); if ($server_status eq 'switchserver') { my $trolecode = 'au./'.$domain.'/'; - my $switchserver = '/adm/switchserver?otherserver='.$home.'&role='.$trolecode; + my $switchserver = '/adm/switchserver?otherserver='.$home.'&role='.$trolecode; $r->internal_redirect($switchserver); } last; @@ -287,7 +279,7 @@ sub handler { my ($server_status,$home) = &check_author_homeserver($user,$domain); if ($server_status eq 'switchserver') { my $trolecode = 'ca./'.$domain.'/'.$user; - my $switchserver = '/adm/switchserver?otherserver='.$home.'&role='.$trolecode; + my $switchserver = '/adm/switchserver?otherserver='.$home.'&role='.$trolecode; $r->internal_redirect($switchserver); } last; @@ -308,7 +300,7 @@ sub handler { if ($server_status eq 'switchserver') { my $trolecode = 'ca./'.$domain.'/'.$user; my $switchserver = '/adm/switchserver?' - .'otherserver='.$home.'&role='.$trolecode; + .'otherserver='.$home.'&role='.$trolecode; $r->internal_redirect($switchserver); } } else { @@ -321,9 +313,7 @@ sub handler { } } } - if (($env{'form.cm'}) && ($env{'form.orgurl'})) { - $r->internal_redirect($env{'form.orgurl'}); - } + foreach $envkey (keys %env) { next if ($envkey!~/^user\.role\./); my ($where,$trolecode,$role,$tstatus,$tend,$tstart); @@ -450,16 +440,8 @@ ENDENTERKEY if (($cnum) && ($role ne 'ca') && ($role ne 'aa')) { my $msg; - if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; } - &Apache::lonnet::appenv({'request.role.adv'=>$tadv}); my ($furl,$ferr)= &Apache::lonuserstate::readmap($cdom.'/'.$cnum); - if ($custommenu) { - unless (($ferr) || ($env{'form.switchrole'})) { - &Apache::lonnet::put('nohist_crslastlogin',{$env{'user.name'}.':'.$env{'user.domain'}.':'.$csec.':'.$role => $now}, - $cdom,$cnum); - } - } if (($env{'form.orgurl'}) && ($env{'form.orgurl'}!~/^\/adm\/flip/)) { my $dest=$env{'form.orgurl'}; @@ -471,6 +453,8 @@ ENDENTERKEY } $dest .= 'symb='.$env{'form.symb'}; } + if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; } + &Apache::lonnet::appenv({'request.role.adv'=>$tadv}); if (($ferr) && ($tadv)) { &error_page($r,$ferr,$dest); } else { @@ -489,6 +473,8 @@ ENDENTERKEY .'

'.&mt('Please try again.').'

' .'

'.$ferr.'

'; } + if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; } + &Apache::lonnet::appenv({'request.role.adv'=>$tadv}); if (($ferr) && ($tadv)) { &error_page($r,$ferr,$furl); @@ -500,7 +486,7 @@ ENDENTERKEY $courseid = substr($courseid, 1); } $courseid =~ s/\//_/; - if (($cdom !~ /^\w+citest$/) && (($role eq 'cc') || ($role eq 'co')) + if ((($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 @@ -511,10 +497,9 @@ ENDENTERKEY my $esc_symb = &HTML::Entities::encode($env{'form.destsymb'},'"<>&'); $dest .= '?symb='.$esc_symb; } - &redirect_user($r,&mt('Entering [_1]', - $env{'course.'.$courseid.'.description'}), - $dest,$msg, - $env{'environment.remotenavmap'}); + &redirect_user($r, &mt('Entering [_1]', + $env{'course.'.$courseid.'.description'}), + $dest, $msg); return OK; } if (&Apache::lonnet::allowed('whn', @@ -524,12 +509,11 @@ ENDENTERKEY .$env{'request.course.sec'}) ) { my $startpage = &courseloadpage($courseid); - unless (($startpage eq 'firstres') || ($cdom =~ /^\w+citest$/)) { + unless ($startpage eq 'firstres') { $msg = &mt('Entering [_1] ...', $env{'course.'.$courseid.'.description'}); - &redirect_user($r,&mt('New in course'), - '/adm/whatsnew?refpage=start',$msg, - $env{'environment.remotenavmap'}); + &redirect_user($r, &mt('New in course'), + '/adm/whatsnew?refpage=start', $msg); return OK; } } @@ -539,15 +523,11 @@ ENDENTERKEY # Guess not ... $furl=&Apache::lonpageflip::first_accessible_resource(); } - if (($cdom =~ /^\w+citest$/) && ($custommenu)) { - $furl = '/adm/navmaps'; - } $msg = &mt('Entering [_1] ...', $env{'course.'.$courseid.'.description'}); - &redirect_user($r,&mt('Entering [_1]', - $env{'course.'.$courseid.'.description'}), - $furl,$msg, - $env{'environment.remotenavmap'}); + &redirect_user($r, &mt('Entering [_1]', + $env{'course.'.$courseid.'.description'}), + $furl, $msg); } return OK; } @@ -584,6 +564,7 @@ ENDENTERKEY } } + # =============================================================== No Roles Init &Apache::loncommon::content_type($r,'text/html'); @@ -591,43 +572,25 @@ ENDENTERKEY $r->send_http_header; return OK if $r->header_only; - my ($crumbtext,$pagetitle,$recent,$show_course); - $show_course=&Apache::loncommon::show_course(); - my $noscript='
'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'
'.&mt('As this is not the case, most functionality in the system will be unavailable.').'

'; - if ($custommenu) { - my $start_page = &Apache::loncommon::start_page('Main Menu'); - $r->print(<<"ENDCUSTOM"); -$start_page - -ENDCUSTOM - } else { - $crumbtext = 'User Roles'; - $pagetitle = 'My Roles'; - $recent = &mt('Recent Roles'); - my $standby=&mt('Role selected. Please stand by.'); - if ($show_course) { - $crumbtext = 'Courses'; - $pagetitle = 'My Courses'; - $recent = &mt('Recent Courses'); - $standby = &mt('Course selected. Please stand by.'); - } - my $brcrum = [{ href => '/adm/roles', - text => $crumbtext,}, - ]; - my $args; - if ($numdc) { - $args = {bread_crumbs => $brcrum}; - } else { - $args = {bread_crumbs => $brcrum, - bread_crumbs_menulink => '_nomenu'}; - } - my $start_page=&Apache::loncommon::start_page($pagetitle,undef,$args); - my $swinfo=&Apache::lonmenu::rawconfig(); - $standby=~s/\n/\\n/g; - $r->print(<"/adm/roles",text=>$crumbtext}]; + 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; + my $noscript=''.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'
'.&mt('As this is not the case, most functionality in the system will be unavailable.').'

'; + + $r->print(< @@ -652,7 +615,6 @@ function enterrole (thisform,rolecode,bu // ]]> ENDHEADER - } # ------------------------------------------ Get Error Message from Environment @@ -720,12 +682,10 @@ ENDHEADER if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) { $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'}; } - unless ($custommenu) { - $r->print('
'); - $r->print(''); - $r->print(''); - $r->print(''); - } + $r->print(''); + $r->print(''); + $r->print(''); + $r->print(''); } my (%roletext,%sortrole,%roleclass,%futureroles,%timezones); @@ -735,35 +695,6 @@ ENDHEADER $refresh = $now; &Apache::lonnet::appenv({'user.refresh.time' => $refresh}); - if (!$countactive && !$countfuture) { - if (&Apache::loncommon::new_roles_update()) { - ($countactive,$countfuture,$inrole,$possiblerole) = - &gather_roles($then,$refresh,$now,$reinit,$nochoose,\%roletext,\%sortrole, - \%roleclass,\%futureroles,\%timezones); - } - } - if ($custommenu) { - if ($env{'form.destinationurl'} eq '/adm/ci_info') { - $r->print(&ci_info_page()). - &Apache::loncommon::end_page(); - return OK; - } - my %courses = &Apache::loncommon::existing_gcitest_courses('cc'); - $env{'browser.interface'}='faketextual'; - $env{'environment.remote'}='off'; - my $numcourses = keys(%courses); - my $switcher; - if ($numcourses > 0) { - $switcher = &Apache::loncommon::gcitest_switcher('cc',%courses); - } - $r->print(&Apache::lonmenu::inlinemenu('gcicustom',$switcher). - &Apache::loncommon::end_page()); - return OK; - } else { - if ($env{'form.destinationurl'} eq '/adm/ci_info') { - delete($env{'form.destinationurl'}); - } - } if ($env{'user.adv'}) { $r->print('

' - .&mt('[_1]Visit the [_2]Course/Community Catalog[_3]' - .' to view all [_4] LON-CAPA courses and communities.' - ,'' - ,'' - ,'',$domdesc) - .'
' - .&mt('If a course or community is [_1]not[_2] in your list of current courses and communities below,' + $r->print( + '

' + .&mt('[_1]Visit the [_2]Course/Community Catalog[_3]' + .' to view all [_4] LON-CAPA courses and communities.' + ,'' + ,'' + ,'',$domdesc) + .'
' + .&mt('If a course or community is [_1]not[_2] in your list of current courses and communities below,' .' you may be able to enroll if self-enrollment is permitted.' ,'','') - .'

' - ); - } + .'

' + ); } } @@ -798,31 +727,13 @@ ENDHEADER if ($inrole) { $r->print('

'.&mt('Currently no additional roles, courses or communities').'

'); } else { - if ($show_course) { - if ($env{'user.domain'} =~ /^\w+citest$/) { - $r->print('

'.&mt('Currently no active Concept Tests').'

'); - } elsif ($env{'user.domain'} =~ /ci$/) { - $r->print('

'.&mt('Currently not assigned as a GCI contributor').'

'); - } - } else { - $r->print('

'.&mt('Currently no active roles, courses or communities').'

'); - } + $r->print('

'.&mt('Currently no active roles, courses or communities').'

'); } - unless ($env{'user.domain'} =~ /^\w+citest$/) { - &findcourse_advice($r); - &requestcourse_advice($r); - } + &findcourse_advice($r); + &requestcourse_advice($r); $r->print('
'); if ($countfuture) { - if ($show_course) { - if ($env{'user.domain'} =~ /^\w+citest$/) { - $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)); - } + $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture)); my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole, $nochoose); &print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles, @@ -848,30 +759,16 @@ ENDHEADER } $r->print(&Apache::loncommon::end_page()); return OK; - } elsif ($countactive==1) { # Is there only one choice? - my $needs_switchserver; - if ($env{'user.author'}) { - $needs_switchserver = &check_needs_switchserver($possiblerole); - } - if ((!$needs_switchserver) && ($env{'request.role'} eq 'cm')) { - $r->print('

'.&mt('Please stand by.').'

'. - ''. - ''); - $r->print("\n"); - $r->rflush(); - $r->print(''); - $r->print(&Apache::loncommon::end_page()); - return OK; - } - if ($needs_switchserver) { - $r->print("

".&mt('Server Switch Required')."

\n". - &mt('Construction Space access is only available from '. - 'the home server of the corresponding Author.').'
'. - &mt("Click the 'Switch Server' link to go there.").'
'); - } } # ----------------------------------------------------------------------- Table - unless ((!$show_course) || ($nochoose) || ($countactive==1)) { + + if ($numdc > 0) { + $r->print(&coursepick_jscript()); + $r->print(&Apache::loncommon::coursebrowser_javascript(). + &Apache::loncommon::authorbrowser_javascript()); + } + + unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) { $r->print("

".&mt('Select a Course to Enter')."

\n"); } if ($env{'form.destinationurl'}) { @@ -882,28 +779,37 @@ ENDHEADER $env{'form.destsymb'}.'" />'); } } + my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,$nochoose); if ($env{'environment.recentroles'}) { my %recent_roles = &Apache::lonhtmlcommon::get_recent('roles',$env{'environment.recentrolesn'}); my $output=''; - foreach (sort(keys(%recent_roles))) { - if (ref($roletext{'user.role.'.$_}) eq 'ARRAY') { + foreach my $role (sort(keys(%recent_roles))) { + if (ref($roletext{'user.role.'.$role}) eq 'ARRAY') { $output.= &Apache::loncommon::start_data_table_row(). - $roletext{'user.role.'.$_}->[0]. - &Apache::loncommon::end_data_table_row(). - &Apache::loncommon::continue_data_table_row(). - $roletext{'user.role.'.$_}->[1]. + $roletext{'user.role.'.$role}->[0]. &Apache::loncommon::end_data_table_row(); - if ($_ =~ m-dc\./($match_domain)/- + if ($roletext{'user.role.'.$role}->[1] ne '') { + $output .= &Apache::loncommon::continue_data_table_row(). + $roletext{'user.role.'.$role}->[1]. + &Apache::loncommon::end_data_table_row(); + } + if ($role =~ m{dc\./($match_domain)/} && $dcroles{$1}) { $output .= &adhoc_roles_row($1,'recent'); } } elsif ($numdc > 0) { - unless ($_ =~/^error\:/) { - $output.=&display_cc_role('user.role.'.$_); + unless ($role =~/^error\:/) { + my ($roletext,$role_text_end) = &display_cc_role('user.role.'.$role); + $output.= &Apache::loncommon::start_data_table_row(). + $roletext. + &Apache::loncommon::end_data_table_row(). + &Apache::loncommon::continue_data_table_row(). + $role_text_end. + &Apache::loncommon::end_data_table_row(); } - } + } } if ($output) { $r->print(&Apache::loncommon::start_data_table_empty_row() @@ -916,12 +822,6 @@ ENDHEADER $doheaders ++; } } - - if ($numdc > 0) { - $r->print(&coursepick_jscript()); - $r->print(&Apache::loncommon::coursebrowser_javascript(). - &Apache::loncommon::authorbrowser_javascript()); - } &print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles,\%roletext); if ($countactive > 1) { my $tremark=''; @@ -972,46 +872,6 @@ ENDHEADER return OK; } -sub ci_info_page { - 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 => '

For more information about writing and reviewing Concept Inventory questions please refer to the GCI Workbook.

', - ); - my $output = <<"END"; -
-
-

Welcome to the $longname{$inventory} WebCenter

-

-Use the tabs to navigate the WebCenter and... -

    -END - if (ref($tabs) eq 'ARRAY') { - foreach my $tab (@{$tabs}) { - if ($features{$tab}) { - $output .= '
  • '.$features{$tab}.'
  • '."\n"; - } - } - } - $output .= <<"END"; -
-

-$info{$inventory} -
-END - -} - sub gather_roles { my ($then,$refresh,$now,$reinit,$nochoose,$roletext,$sortrole,$roleclass,$futureroles,$timezones) = @_; my ($countactive,$countfuture,$inrole,$possiblerole) = (0,0,0,''); @@ -1084,7 +944,7 @@ sub gather_roles { foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } if (!$allowed) { $button=0; - $switchserver='otherserver='.$home.'&role='.$trolecode; + $switchserver='otherserver='.$home.'&role='.$trolecode; } #next if ($home eq 'no_host'); $home = &Apache::lonnet::hostname($home); @@ -1104,7 +964,7 @@ sub gather_roles { foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } if (!$allowed) { $button=0; - $switchserver='otherserver='.$home.'&role='.$trolecode; + $switchserver='otherserver='.$home.'&role='.$trolecode; } #next if ($home eq 'no_host'); $home = &Apache::lonnet::hostname($home); @@ -1121,6 +981,7 @@ sub gather_roles { if ($env{'course.'.$tcourseid.'.description'}) { $twhere=$env{'course.'.$tcourseid.'.description'}; $sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey; + $twhere = &HTML::Entities::encode($twhere,'"<>&'); unless ($twhere eq &mt('Currently not available')) { $twhere.=' '. &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom). @@ -1131,10 +992,10 @@ sub gather_roles { if (%newhash) { $sortkey=$role."\0".$tdom."\0".$newhash{'description'}. "\0".$envkey; - $twhere=$newhash{'description'}. - ' '. - &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom). - ''; + $twhere=&HTML::Entities::encode($newhash{'description'},'"<>&'). + ' '. + &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom). + ''; $ttype = $newhash{'type'}; $trole = &Apache::lonnet::plaintext($role,$ttype,$tcourseid); } else { @@ -1268,10 +1129,12 @@ sub print_rolerows { if (ref($roletext->{$sortrole->{$which}}) eq 'ARRAY') { $output.= &Apache::loncommon::start_data_table_row(). $roletext->{$sortrole->{$which}}->[0]. - &Apache::loncommon::end_data_table_row(). - &Apache::loncommon::continue_data_table_row(). - $roletext->{$sortrole->{$which}}->[1]. &Apache::loncommon::end_data_table_row(); + if ($roletext->{$sortrole->{$which}}->[1] ne '') { + $output .= &Apache::loncommon::continue_data_table_row(). + $roletext->{$sortrole->{$which}}->[1]. + &Apache::loncommon::end_data_table_row(); + } } if ($sortrole->{$which} =~ m-dc\./($match_domain)/-) { if (ref($dcroles) eq 'HASH') { @@ -1314,15 +1177,10 @@ sub findcourse_advice { } else { $r->print(&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').'
'); } - my $queued = &Apache::loncoursequeueadmin::queued_selfenrollment(); - if ($queued) { - $r->print($queued); - } else { - $r->print(&mt('You have no request for contributor access pending approval by the GCI WebCenter team.').'
    '. - '
  • '.&mt('This may mean that action was taken on your request in the time since your most recent log-in.[_1]View [_2]Message[_3] to see if this is the case.','
    ','','').'
  • '. - '
  • '.&mt('If you logout and log-in again you may find you now have access to the Geoscience Concept Inventory, as a contributor.').'
  • '. - '
'); - } + $r->print('

'.&mt('Self-Enrollment').'

'. + '

'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','','',$domdesc).'
'); + $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'

'. + &Apache::loncoursequeueadmin::queued_selfenrollment()); return; } @@ -1703,8 +1561,10 @@ sub display_cc_role { unless ($rolekey =~/^error\:/) { if ($rolekey =~ m{^user\.role\.(cc|co)\./($match_domain)/($match_courseid)$}) { my $ccrole = $1; - my $tcourseid = $2.'_'.$3; - my $trolecode = $1.'./'.$2.'/'.$3; + my $tdom = $2; + my $trest = $3; + my $tcourseid = $tdom.'_'.$trest; + my $trolecode = $ccrole.'./'.$tdom.'/'.$trest; my $twhere; my $ttype; my $tbg='LC_roles_is'; @@ -1712,7 +1572,7 @@ sub display_cc_role { if (%newhash) { $twhere=$newhash{'description'}. ' '. - &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$2,$1). + &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom). ''; $ttype = $newhash{'type'}; } else { @@ -1721,7 +1581,7 @@ sub display_cc_role { } my $trole = &Apache::lonnet::plaintext($ccrole,$ttype,$tcourseid); $twhere.="
".&mt('Domain').":".$1; - ($roletext,$roletext_end) = &build_roletext($trolecode,$1,$2,'is',$tryagain,$advanced,'',$tbg,$trole,$twhere,'','','',1,''); + ($roletext,$roletext_end) = &build_roletext($trolecode,$tdom,$trest,'is',$tryagain,$advanced,'',$tbg,$trole,$twhere,'','','',1,''); } } return ($roletext,$roletext_end); @@ -1739,7 +1599,7 @@ sub adhoc_roles_row { my $carole = &Apache::lonnet::plaintext('ca'); my $selectcalink = &coauthorlink($dcdom,$rowtype); $output.=$ccrole.': '.$selectcclink - .' | '.$carole.': '.$selectcalink + .' | '.$carole.': '.$selectcalink.'' .&Apache::loncommon::end_data_table_row(); return $output; } @@ -1797,8 +1657,7 @@ course they should act on, etc. Both in handler determines via C's C<&allowed> function that a certain action is not allowed, C is used as error handler. This allows the user to select another role which may have permission to do -what they were trying to do. C can also be accessed via the -B button in the Remote Control. +what they were trying to do. =begin latex