--- loncom/auth/lonroles.pm 2010/08/20 03:40:01 1.231.4.15 +++ loncom/auth/lonroles.pm 2010/12/05 16:35:58 1.240.2.21 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.231.4.15 2010/08/20 03:40:01 raeburn Exp $ +# $Id: lonroles.pm,v 1.240.2.21 2010/12/05 16:35:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -138,6 +138,7 @@ use Apache::lonannounce; use Apache::lonlocal; use Apache::lonpageflip(); use Apache::lonnavdisplay(); +use Apache::loncoursequeueadmin; use GDBM_File; use LONCAPA qw(:DEFAULT :match); use HTML::Entities; @@ -158,8 +159,13 @@ sub redirect_user { $navwindow.=&Apache::lonnavmaps::close(); } + # Breadcrumbs + my $brcrum = [{'href' => $url, + 'text' => 'Switching Role'},]; my $start_page = &Apache::loncommon::start_page('Switching Role',undef, - {'redirect' => [1,$url]}); + {'redirect' => [1,$url], + 'bread_crumbs' => $brcrum,}); + &Apache::lonhtmlcommon::clear_breadcrumbs(); my $end_page = &Apache::loncommon::end_page(); # Note to style police: @@ -185,17 +191,25 @@ sub error_page { &Apache::loncommon::no_cache($r); $r->send_http_header; return OK if $r->header_only; - $r->print(&Apache::loncommon::start_page('Problems during Course Initialization'). + # Breadcrumbs + my $brcrum = [{'href' => $dest, + 'text' => 'Problems during Course Initialization'},]; + $r->print(&Apache::loncommon::start_page('Problems during Course Initialization', + undef, + {'bread_crumbs' => $brcrum,}) + ); + $r->print( ''. '

'.&mt('The following problems occurred:'). - '
'. + '
'. $error. - '


'.&mt('Continue').''. - &Apache::loncommon::end_page()); + '


'.&mt('Continue').'' + ); + $r->print(&Apache::loncommon::end_page()); } sub handler { @@ -212,6 +226,7 @@ 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'}) { @@ -225,16 +240,7 @@ sub handler { if ($env{'request.course.id'}) { # Check if user is CC trying to select a course role if ($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) { + if (!defined($env{'user.role.'.$env{'form.switchrole'}})) { &adhoc_course_role($refresh,$then); } } @@ -270,7 +276,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; @@ -281,7 +287,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; @@ -302,7 +308,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 { @@ -315,7 +321,9 @@ 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); @@ -442,8 +450,16 @@ 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'}; @@ -455,8 +471,6 @@ 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 { @@ -475,8 +489,6 @@ 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); @@ -488,8 +500,8 @@ ENDENTERKEY $courseid = substr($courseid, 1); } $courseid =~ s/\//_/; - if ((($role eq 'cc') || ($role eq 'co')) - && ($env{'course.' . $courseid .'.course.helper.not.run'})) { + 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 } elsif ($env{'request.course.id'}) { @@ -512,7 +524,7 @@ ENDENTERKEY .$env{'request.course.sec'}) ) { my $startpage = &courseloadpage($courseid); - unless ($startpage eq 'firstres') { + unless (($startpage eq 'firstres') || ($cdom =~ /^\w+citest$/)) { $msg = &mt('Entering [_1] ...', $env{'course.'.$courseid.'.description'}); &redirect_user($r,&mt('New in course'), @@ -527,6 +539,9 @@ 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]', @@ -569,7 +584,6 @@ ENDENTERKEY } } - # =============================================================== No Roles Init &Apache::loncommon::content_type($r,'text/html'); @@ -577,25 +591,43 @@ ENDENTERKEY $r->send_http_header; return OK if $r->header_only; - my $crumbtext = 'User Roles'; - my $pagetitle = 'My Roles'; - my $recent = &mt('Recent Roles'); - my $show_course=&Apache::loncommon::show_course(); - if ($show_course) { - $crumbtext = 'Courses'; - $pagetitle = 'My Courses'; - $recent = &mt('Recent Courses'); - } - my $brcrum =[{href=>"/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(<'.&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(< @@ -620,6 +652,7 @@ function enterrole (thisform,rolecode,bu // ]]> ENDHEADER + } # ------------------------------------------ Get Error Message from Environment @@ -687,10 +720,12 @@ ENDHEADER if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) { $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'}; } - $r->print('
'); - $r->print(''); - $r->print(''); - $r->print(''); + unless ($custommenu) { + $r->print(''); + $r->print(''); + $r->print(''); + $r->print(''); + } } my (%roletext,%sortrole,%roleclass,%futureroles,%timezones); @@ -700,6 +735,35 @@ 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/gci_info') { + $r->print(&gci_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/gci_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,' + unless ($env{'user.domain'} =~ /^\w+citest$/) { + $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.' ,'','') - .'

' - ); + .'

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

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

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

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

'); + 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').'

'); + } } - &findcourse_advice($r); - &requestcourse_advice($r); + unless ($env{'user.domain'} =~ /^\w+citest$/) { + &findcourse_advice($r); + &requestcourse_advice($r); + } $r->print('
'); 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'} =~ /^\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)); + } my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole, $nochoose); &print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles, @@ -765,15 +848,30 @@ 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 - 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)) { + unless ((!$show_course) || ($nochoose) || ($countactive==1)) { $r->print("

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

\n"); } if ($env{'form.destinationurl'}) { @@ -789,31 +887,23 @@ ENDHEADER my %recent_roles = &Apache::lonhtmlcommon::get_recent('roles',$env{'environment.recentrolesn'}); my $output=''; - foreach my $role (sort(keys(%recent_roles))) { - if (ref($roletext{'user.role.'.$role}) eq 'ARRAY') { + foreach (sort(keys(%recent_roles))) { + if (ref($roletext{'user.role.'.$_}) eq 'ARRAY') { $output.= &Apache::loncommon::start_data_table_row(). - $roletext{'user.role.'.$role}->[0]. + $roletext{'user.role.'.$_}->[0]. + &Apache::loncommon::end_data_table_row(). + &Apache::loncommon::continue_data_table_row(). + $roletext{'user.role.'.$_}->[1]. &Apache::loncommon::end_data_table_row(); - 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)/} + if ($_ =~ m-dc\./($match_domain)/- && $dcroles{$1}) { $output .= &adhoc_roles_row($1,'recent'); } } elsif ($numdc > 0) { - 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(); + unless ($_ =~/^error\:/) { + $output.=&display_cc_role('user.role.'.$_); } - } + } } if ($output) { $r->print(&Apache::loncommon::start_data_table_empty_row() @@ -826,6 +916,12 @@ 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=''; @@ -876,6 +972,26 @@ ENDHEADER return OK; } +sub gci_info_page { + return <<"END"; +
+
+

Welcome to the Geoscience Concept Inventory WebCenter

+

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

    +
  • Review and comment on existing GCI questions
  • +
  • Submit GCI questions of your own
  • +
  • Create an online test for your students
  • +
  • View tutorials on creating online tests
  • +
+

+

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

+END +} + sub gather_roles { my ($then,$refresh,$now,$reinit,$nochoose,$roletext,$sortrole,$roleclass,$futureroles,$timezones) = @_; my ($countactive,$countfuture,$inrole,$possiblerole) = (0,0,0,''); @@ -933,7 +1049,7 @@ sub gather_roles { if ($role =~ /^cr\//) { my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role); if ($tremark) { $tremark.='
'; } - $tremark.=&mt('Customrole defined by [_1].',$rauthor.':'.$rdomain); + $tremark.=&mt('Defined by [_1] at [_2].',$rauthor,$rdomain); } $trole=Apache::lonnet::plaintext($role); my $ttype; @@ -948,7 +1064,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); @@ -968,7 +1084,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); @@ -985,7 +1101,6 @@ 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). @@ -996,7 +1111,7 @@ sub gather_roles { if (%newhash) { $sortkey=$role."\0".$tdom."\0".$newhash{'description'}. "\0".$envkey; - $twhere=&HTML::Entities::encode($newhash{'description'},'"<>&'). + $twhere=$newhash{'description'}. ' '. &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom). ''; @@ -1133,12 +1248,10 @@ 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') { @@ -1181,10 +1294,15 @@ 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.').'
'); } - $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()); + 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.').'
  • '. + '
'); + } return; } @@ -1196,12 +1314,12 @@ sub requestcourse_advice { &Apache::lonnet::check_can_request($env{'user.domain'},\%can_request,\%request_doms); if (keys(%request_doms) > 0) { my ($types,$typename) = &Apache::loncommon::course_types(); - if ((ref($types) eq 'ARRAY') && (ref($typename) eq 'HASH')) { + if ((ref($types) eq 'ARRAY') && (ref($typename) eq 'HASH')) { $r->print('

'.&mt('Request creation of a course or community').'

'. '

'.&mt('You have rights to request the creation of courses and/or communities in the following domain(s):').'

    '); my (@reqdoms,@reqtypes); foreach my $type (sort(keys(%request_doms))) { - push(@reqtypes,$type); + push(@reqtypes,$type); if (ref($request_doms{$type}) eq 'ARRAY') { my $domstr = join(', ',map { &Apache::lonnet::domain($_) } sort(@{$request_doms{$type}})); $r->print( @@ -1234,7 +1352,7 @@ sub requestcourse_advice { } if (@reqdoms == 1 || @showtypes > 0) { $requrl .= '&state=crstype&action=new'; - } + } $r->print('
'.&mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.','','').'

'); } } @@ -1565,10 +1683,8 @@ sub display_cc_role { unless ($rolekey =~/^error\:/) { if ($rolekey =~ m{^user\.role\.(cc|co)\./($match_domain)/($match_courseid)$}) { my $ccrole = $1; - my $tdom = $2; - my $trest = $3; - my $tcourseid = $tdom.'_'.$trest; - my $trolecode = $ccrole.'./'.$tdom.'/'.$trest; + my $tcourseid = $2.'_'.$3; + my $trolecode = $1.'./'.$2.'/'.$3; my $twhere; my $ttype; my $tbg='LC_roles_is'; @@ -1576,7 +1692,7 @@ sub display_cc_role { if (%newhash) { $twhere=$newhash{'description'}. ' '. - &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom). + &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$2,$1). ''; $ttype = $newhash{'type'}; } else { @@ -1584,8 +1700,8 @@ sub display_cc_role { $env{'course.'.$tcourseid.'.description'}=$twhere; } my $trole = &Apache::lonnet::plaintext($ccrole,$ttype,$tcourseid); - $twhere.="
".&mt('Domain').":".$tdom; - ($roletext,$roletext_end) = &build_roletext($trolecode,$tdom,$trest,'is',$tryagain,$advanced,'',$tbg,$trole,$twhere,'','','',1,''); + $twhere.="
".&mt('Domain').":".$1; + ($roletext,$roletext_end) = &build_roletext($trolecode,$1,$2,'is',$tryagain,$advanced,'',$tbg,$trole,$twhere,'','','',1,''); } } return ($roletext,$roletext_end); @@ -1603,7 +1719,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; }