--- loncom/auth/lonroles.pm 2003/12/05 14:18:00 1.78 +++ loncom/auth/lonroles.pm 2004/01/27 22:54:59 1.83 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.78 2003/12/05 14:18:00 sakharuk Exp $ +# $Id: lonroles.pm,v 1.83 2004/01/27 22:54:59 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -237,8 +237,10 @@ ENDENTERKEY my $swinfo=&Apache::lonmenu::rawconfig(); my $bodytag=&Apache::loncommon::bodytag('User Roles'); - my $helptag=&Apache::loncommon::help_open_topic - ("General_Intro","Click here for help"); + my $helptag='
'.&Apache::loncommon::help_open_topic + ("General_Intro",&mt("Click here for help")).''. + &Apache::loncommon::help_open_faq(1,&mt('Click here for FAQ')).''. + &Apache::loncommon::help_open_bug('',&mt('Click here to report bugs')).'
'; $r->print(< @@ -402,7 +404,10 @@ ENDHEADER # First, Co-Authorship roles if ($role eq 'ca') { my $home = &Apache::lonnet::homeserver($trest,$tdom); - if ($home ne $r->dir_config('lonHostID')) { + my $allowed=0; + my @ids=&Apache::lonnet::current_machine_ids(); + foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } + if (!$allowed) { $button=0; $switchserver=&Apache::lonnet::escape('http://'. $Apache::lonnet::hostname{$home}. @@ -417,12 +422,16 @@ ENDHEADER ': '.$tdom.'
'. ' '.&mt('Server').': '.$home; $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca'; + $tremark.=&Apache::lonhtmlcommon::authorbombs('/res/'.$tdom.'/'.$trest.'/'); $sortkey=$role."$trest:$tdom"; } elsif ($role eq 'au') { # Authors my $home = &Apache::lonnet::homeserver ($ENV{'user.name'},$ENV{'user.domain'}); - if ($home ne $r->dir_config('lonHostID')) { + my $allowed=0; + my @ids=&Apache::lonnet::current_machine_ids(); + foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } + if (!$allowed) { $button=0; $switchserver=&Apache::lonnet::escape('http://'. $Apache::lonnet::hostname{$home}. @@ -436,6 +445,7 @@ ENDHEADER $twhere=&mt('Domain').': '.$tdom.'
'.&mt('Server'). ': '.$home; $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca'; + $tremark.=&Apache::lonhtmlcommon::authorbombs('/res/'.$tdom.'/'.$ENV{'user.name'}.'/'); $sortkey=$role; } elsif ($trest) { $ttype='Course'; @@ -445,7 +455,7 @@ ENDHEADER my $tcourseid=$tdom.'_'.$trest; if ($ENV{'course.'.$tcourseid.'.description'}) { $twhere=$ENV{'course.'.$tcourseid.'.description'}; - $sortkey=$tdom."\0".$twhere."\0".$envkey; + $sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey; unless ($twhere eq &mt('Currently not available')) { $twhere.=' '. &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom,$tfont). @@ -455,7 +465,7 @@ ENDHEADER my %newhash=Apache::lonnet::coursedescription ($tcourseid); if (%newhash) { - $sortkey=$tdom."\0".$newhash{'description'}. + $sortkey=$role."\0".$tdom."\0".$newhash{'description'}. "\0".$envkey; $twhere=$newhash{'description'}. ' '. @@ -464,7 +474,7 @@ ENDHEADER } else { $twhere=&mt('Currently not available'); $ENV{'course.'.$tcourseid.'.description'}=$twhere; - $sortkey=$tdom."\0".$twhere."\0".$envkey; + $sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey; } } if ($role ne 'st') { $twhere.="
".&mt('Domain').":".$tdom; } @@ -540,7 +550,7 @@ ENDHEADER if ($output) { if ($doheaders > 0) { $r->print("". - "$type"); + "".&mt($type).""); } $r->print($output); }