+
');
+ if ($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,
+ \%roletext);
+ my $tremark='';
+ my $tfont='#003300';
+ if ($env{'request.role'} eq 'cm') {
+ $r->print('');
+ $tremark=&mt('Currently selected.').' ';
+ $tfont='#002200';
+ } else {
+ $r->print('
');
+ }
+ $r->print(' | '.&mt('No role specified').
+ ' | '.$tremark.
+ ' |
'."\n");
+
+ $r->print('');
+ }
+ $r->print(&Apache::loncommon::end_page());
return OK;
}
-# More than one possible role
# ----------------------------------------------------------------------- Table
- unless (($advanced) || ($nochoose)) {
+ unless ((!&Apache::lonmenu::show_course()) || ($nochoose) || ($countactive==1)) {
$r->print("".&mt('Select a Course to Enter')."
\n");
}
- $r->print('
');
unless ($nochoose) {
$r->print("\n");
@@ -745,14 +917,101 @@ ENDHEADER
}
$r->print(&Apache::lonnet::getannounce());
if ($advanced) {
- $r->print('This is LON-CAPA '.
- $r->dir_config('lonVersion').'
'.
- ''.&mt('Logout').'
');
+ my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');
+ $r->print(''
+ .&mt('This is LON-CAPA [_1]',$r->dir_config('lonVersion'))
+ .'
'
+ .''.&mt('Logout').' '
+ .''
+ .&mt('Course Catalog')
+ .'
');
}
$r->print(&Apache::loncommon::end_page());
return OK;
}
+sub roletable_headers {
+ my ($r,$roleclass,$sortrole,$nochoose) = @_;
+ my $doheaders;
+ if ((ref($sortrole) eq 'HASH') && (ref($roleclass) eq 'HASH')) {
+ $r->print('