version 1.226, 2009/06/11 19:02:27
|
version 1.231.4.1, 2009/08/12 20:25:35
|
Line 157 sub redirect_user {
|
Line 157 sub redirect_user {
|
} else { |
} else { |
$navwindow.=&Apache::lonnavmaps::close(); |
$navwindow.=&Apache::lonnavmaps::close(); |
} |
} |
|
|
my $start_page = &Apache::loncommon::start_page('Switching Role',undef, |
my $start_page = &Apache::loncommon::start_page('Switching Role',undef, |
{'redirect' => [1,$url],}); |
{'redirect' => [1,$url].}); |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
|
|
# Note to style police: |
# Note to style police: |
Line 191 sub error_page {
|
Line 192 sub error_page {
|
'// ]]>'. |
'// ]]>'. |
'</script>'. |
'</script>'. |
'<p class="LC_error">'.&mt('The following problems occurred:'). |
'<p class="LC_error">'.&mt('The following problems occurred:'). |
|
'<br />'. |
$error. |
$error. |
'</p><br /><a href="'.$dest.'">'.&mt('Continue').'</a>'. |
'</p><br /><a href="'.$dest.'">'.&mt('Continue').'</a>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
} |
} |
|
|
sub handler { |
sub handler { |
Line 246 sub handler {
|
Line 248 sub handler {
|
($envkey =~ m-^form\.cc\./($match_domain)/($match_courseid)$-)) { |
($envkey =~ m-^form\.cc\./($match_domain)/($match_courseid)$-)) { |
if ($dcroles{$domain}) { |
if ($dcroles{$domain}) { |
&Apache::lonnet::check_adhoc_privs($domain,$coursenum, |
&Apache::lonnet::check_adhoc_privs($domain,$coursenum, |
$then,$now,'cc'); |
$then,$refresh,$now,'cc'); |
} |
} |
last; |
last; |
} |
} |
Line 287 sub handler {
|
Line 289 sub handler {
|
my ($server_status,$home) = &check_author_homeserver($user,$domain); |
my ($server_status,$home) = &check_author_homeserver($user,$domain); |
if (($server_status eq 'ok') || ($server_status eq 'switchserver')) { |
if (($server_status eq 'ok') || ($server_status eq 'switchserver')) { |
&Apache::lonnet::check_adhoc_privs($domain,$user,$then, |
&Apache::lonnet::check_adhoc_privs($domain,$user,$then, |
$now,'ca'); |
$refresh,$now,'ca'); |
if ($server_status eq 'switchserver') { |
if ($server_status eq 'switchserver') { |
my $trolecode = 'ca./'.$domain.'/'.$user; |
my $trolecode = 'ca./'.$domain.'/'.$user; |
my $switchserver = '/adm/switchserver?' |
my $switchserver = '/adm/switchserver?' |
Line 743 ENDHEADER
|
Line 745 ENDHEADER
|
unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) { |
unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) { |
$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n"); |
$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n"); |
} |
} |
|
if ($env{'form.destinationurl'}) { |
|
$r->print('<input type="hidden" name="destinationurl" value="'. |
|
$env{'form.destinationurl'}.'" />'); |
|
if ($env{'form.destsymb'} ne '') { |
|
$r->print('<input type="hidden" name="destsymb" value="'. |
|
$env{'form.destsymb'}.'" />'); |
|
} |
|
} |
my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,$nochoose); |
my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,$nochoose); |
if ($env{'environment.recentroles'}) { |
if ($env{'environment.recentroles'}) { |
my %recent_roles = |
my %recent_roles = |
Line 821 ENDHEADER
|
Line 831 ENDHEADER
|
$r->print(&Apache::lonnet::getannounce()); |
$r->print(&Apache::lonnet::getannounce()); |
if ($advanced) { |
if ($advanced) { |
my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&'); |
my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&'); |
$r->print('<p><small><i>' |
$r->print('<p><small><i>' |
.&mt('This is LON-CAPA [_1]',$r->dir_config('lonVersion')) |
.&mt('This LON-CAPA server is version [_1]',$r->dir_config('lonVersion')) |
.'</i><br />' |
.'</i><br />' |
.'<a href="/adm/logout">'.&mt('Logout').'</a> ' |
.'<a href="/adm/logout">'.&mt('Logout').'</a> ' |
.'<a href="/adm/coursecatalog?showdom='.$esc_dom.'">' |
.'<a href="/adm/coursecatalog?showdom='.$esc_dom.'">' |
.&mt('Course Catalog') |
.&mt('Course Catalog') |
.'</a></small></p>'); |
.'</a></small></p>'); |
Line 1529 sub adhoc_roles_row {
|
Line 1539 sub adhoc_roles_row {
|
my ($dcdom,$rowtype) = @_; |
my ($dcdom,$rowtype) = @_; |
my $output = &Apache::loncommon::continue_data_table_row() |
my $output = &Apache::loncommon::continue_data_table_row() |
.' <td colspan="5">' |
.' <td colspan="5">' |
.'<table><tr><td>' |
|
.&mt('[_1]Ad hoc[_2] roles in domain [_3] --' |
.&mt('[_1]Ad hoc[_2] roles in domain [_3] --' |
,'<span class="LC_cusr_emph">','</span>',$dcdom) |
,'<span class="LC_cusr_emph">','</span>',$dcdom) |
.'</td>' |
.' '; |
.'<td>'; |
|
my $selectcclink = &courselink($dcdom,$rowtype); |
my $selectcclink = &courselink($dcdom,$rowtype); |
my $ccrole = &Apache::lonnet::plaintext('cc'); |
my $ccrole = &Apache::lonnet::plaintext('cc'); |
my $carole = &Apache::lonnet::plaintext('ca'); |
my $carole = &Apache::lonnet::plaintext('ca'); |
my $selectcalink = &coauthorlink($dcdom,$rowtype); |
my $selectcalink = &coauthorlink($dcdom,$rowtype); |
$output.=&mt('[_1]: [_2]',$ccrole,$selectcclink) |
$output.=$ccrole.': '.$selectcclink |
.'<br /></td>' |
.' | '.$carole.': '.$selectcalink |
.'<td> </td>' |
|
.'<td>'.&mt('[_1]: [_2]',$carole,$selectcalink).'<br /></td>' |
|
.'</tr></table>' |
|
.'</td>' |
|
.&Apache::loncommon::end_data_table_row(); |
.&Apache::loncommon::end_data_table_row(); |
return $output; |
return $output; |
} |
} |