version 1.155, 2006/06/02 22:02:51
|
version 1.160, 2006/06/26 21:41:09
|
Line 88 sub error_page {
|
Line 88 sub error_page {
|
&Apache::lonmenu::rawconfig().'</script>'. |
&Apache::lonmenu::rawconfig().'</script>'. |
'<p>'.&mt('The following problems occurred:'). |
'<p>'.&mt('The following problems occurred:'). |
$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()); |
} |
} |
|
|
Line 149 sub handler {
|
Line 149 sub handler {
|
|
|
# store role if recent_role list being kept |
# store role if recent_role list being kept |
if ($env{'environment.recentroles'}) { |
if ($env{'environment.recentroles'}) { |
|
my %frozen_roles = |
|
&Apache::lonhtmlcommon::get_recent_frozen('roles',$env{'environment.recentrolesn'}); |
&Apache::lonhtmlcommon::store_recent('roles', |
&Apache::lonhtmlcommon::store_recent('roles', |
$trolecode,' '); |
$trolecode,' ',$frozen_roles{$trolecode}); |
} |
} |
|
|
|
|
Line 266 ENDENTERKEY
|
Line 268 ENDENTERKEY
|
} else { |
} else { |
my $type = 'Course/Group'; |
my $type = 'Course/Group'; |
if (!$env{'request.course.id'}) { |
if (!$env{'request.course.id'}) { |
if (defined($env{'course.'. |
$type = &Apache::loncommon::course_type(); |
$env{'request.course.id'}.'.type'})) { |
|
$type = $env{'course.'. |
|
$env{'request.course.id'}.'.type'}; |
|
} |
|
&Apache::lonnet::appenv( |
&Apache::lonnet::appenv( |
"request.course.id" => $cdom.'_'.$cnum); |
"request.course.id" => $cdom.'_'.$cnum); |
$furl='/adm/roles?tryagain=1'; |
$furl='/adm/roles?tryagain=1'; |
$msg= |
$msg= |
'<h1><font color="red">'. |
'<h1><span class="LC_error">'. |
&mt('Could not initialize [_1] at this time.',lc($type)). |
&mt('Could not initialize '.lc($type).' at this time.'). |
'</font></h1><h3>'.&mt('Please try again.').'</h3>'.$ferr; |
'</span></h1><h3>'.&mt('Please try again.').'</h3>'.$ferr; |
} |
} |
if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; } |
if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; } |
&Apache::lonnet::appenv('request.role.adv'=>$tadv); |
&Apache::lonnet::appenv('request.role.adv'=>$tadv); |
Line 305 ENDENTERKEY
|
Line 303 ENDENTERKEY
|
) { |
) { |
my $startpage = &courseloadpage($courseid); |
my $startpage = &courseloadpage($courseid); |
unless ($startpage eq 'firstres') { |
unless ($startpage eq 'firstres') { |
$msg = &mt('Entering [_1] ....',lc($type)); |
$msg = &mt('Entering '.lc($type).' ....'); |
&redirect_user($r,&mt('New in course'), |
&redirect_user($r,&mt('New in course'), |
'/adm/whatsnew?refpage=start',$msg, |
'/adm/whatsnew?refpage=start',$msg, |
$env{'environment.remotenavmap'}); |
$env{'environment.remotenavmap'}); |
Line 318 ENDENTERKEY
|
Line 316 ENDENTERKEY
|
# Guess not ... |
# Guess not ... |
$furl=&Apache::lonpageflip::first_accessible_resource(); |
$furl=&Apache::lonpageflip::first_accessible_resource(); |
} |
} |
$msg = &mt('Entering [_1] ...',lc($type)); |
$msg = &mt('Entering '.lc($type).' ...'); |
&redirect_user($r,&mt('Entering [_1]',$type), |
&redirect_user($r,&mt('Entering '.$type), |
$furl,$msg, |
$furl,$msg, |
$env{'environment.remotenavmap'}); |
$env{'environment.remotenavmap'}); |
} |
} |
Line 364 ENDENTERKEY
|
Line 362 ENDENTERKEY
|
my $start_page=&Apache::loncommon::start_page('User Roles'); |
my $start_page=&Apache::loncommon::start_page('User Roles'); |
my $standby=&mt('Role selected. Please stand by.'); |
my $standby=&mt('Role selected. Please stand by.'); |
$standby=~s/\n/\\n/g; |
$standby=~s/\n/\\n/g; |
my $helptag='<table><tr><td>'.&Apache::loncommon::help_open_menu('','General Intro','General_Intro','User Roles',1,undef,undef,undef,undef,,&mt("Click here for help")).'</td></td></tr></table>'; |
my $helptag='<table><tr><td>'.&Apache::loncommon::help_open_menu('','General Intro','General_Intro','',1,undef,undef,undef,undef,,&mt("Click here for help")).'</td></td></tr></table>'; |
$r->print(<<ENDHEADER); |
$r->print(<<ENDHEADER); |
$start_page |
$start_page |
$helptag<br /> |
$helptag<br /> |
Line 424 ENDHEADER
|
Line 422 ENDHEADER
|
} else { |
} else { |
if ($env{'user.error.msg'}) { |
if ($env{'user.error.msg'}) { |
$r->print( |
$r->print( |
'<h3><font color="red">'. |
'<h3><span class="LC_error">'. |
&mt('You need to choose another user role or enter a specific course for this function').'</font></h3>'); |
&mt('You need to choose another user role or enter a specific course for this function').'</span></h3>'); |
} |
} |
} |
} |
# -------------------------------------------------------- Choice or no choice? |
# -------------------------------------------------------- Choice or no choice? |
Line 518 ENDHEADER
|
Line 516 ENDHEADER
|
if ($tremark) { $tremark.='<br />'; } |
if ($tremark) { $tremark.='<br />'; } |
$tremark.=&mt('Defined by ').$rauthor. |
$tremark.=&mt('Defined by ').$rauthor. |
&mt(' at ').$rdomain.'.'; |
&mt(' at ').$rdomain.'.'; |
$trole=$rrole; |
} |
} else { |
$trole=Apache::lonnet::plaintext($role); |
$trole=Apache::lonnet::plaintext($role); |
|
} |
|
my $ttype; |
my $ttype; |
my $twhere; |
my $twhere; |
my ($tdom,$trest,$tsection)= |
my ($tdom,$trest,$tsection)= |
Line 745 ENDHEADER
|
Line 741 ENDHEADER
|
$ttype='Construction Space'; |
$ttype='Construction Space'; |
$twhere='User: '.$trest.', Domain: '.$tdom; |
$twhere='User: '.$trest.', Domain: '.$tdom; |
} else { |
} else { |
$ttype='Course'; |
$ttype= |
if (defined($env{'course.'.$tdom.'_'.$trest.'.type'})) { |
&Apache::loncommon::course_type($tdom.'_'.$trest); |
$ttype = $env{'course.'.$tdom.'_'.$trest.'.type'}; |
|
} |
|
$twhere=$env{'course.'.$tdom.'_'.$trest.'.description'}; |
$twhere=$env{'course.'.$tdom.'_'.$trest.'.description'}; |
if ($tsec) { |
if ($tsec) { |
$twhere.=' (Section: '.$tsec.')'; |
$twhere.=' (Section: '.$tsec.')'; |