version 1.240.2.5, 2009/12/24 18:28:54
|
version 1.240.2.8, 2010/01/06 22:40:26
|
Line 165 sub redirect_user {
|
Line 165 sub redirect_user {
|
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], |
'bread_crumbs' => $brcrum,}); |
'bread_crumbs' => $brcrum,}); |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
|
|
# Note to style police: |
# Note to style police: |
Line 727 ENDHEADER
|
Line 728 ENDHEADER
|
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
return OK; |
return OK; |
} |
} |
my %courses = &Apache::loncommon::existing_gcitest_courses(); |
my %courses = &Apache::loncommon::existing_gcitest_courses('cc'); |
$env{'browser.interface'}='faketextual'; |
$env{'browser.interface'}='faketextual'; |
$env{'environment.remote'}='off'; |
$env{'environment.remote'}='off'; |
my $numcourses = keys(%courses); |
my $numcourses = keys(%courses); |
Line 751 ENDSCRIPT
|
Line 752 ENDSCRIPT
|
$r->print(&Apache::lonmenu::inlinemenu('gcicustom',$switcher). |
$r->print(&Apache::lonmenu::inlinemenu('gcicustom',$switcher). |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
return OK; |
return OK; |
|
} else { |
|
if ($env{'form.destinationurl'} eq '/adm/gci_info') { |
|
delete($env{'form.destinationurl'}); |
|
} |
} |
} |
if ($env{'user.adv'}) { |
if ($env{'user.adv'}) { |
$r->print('<p><label><input type="checkbox" name="showall"'); |
$r->print('<p><label><input type="checkbox" name="showall"'); |
Line 763 ENDSCRIPT
|
Line 768 ENDSCRIPT
|
&queued_selfenrollment($r); |
&queued_selfenrollment($r); |
my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description'); |
my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description'); |
my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&'); |
my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&'); |
$r->print( |
unless ($env{'user.domain'} eq 'gcitest') { |
'<p>' |
$r->print( |
.&mt('[_1]Visit the [_2]Course/Community Catalog[_3]' |
'<p>' |
.' to view all [_4] LON-CAPA courses and communities.' |
.&mt('[_1]Visit the [_2]Course/Community Catalog[_3]' |
,'<b>' |
.' to view all [_4] LON-CAPA courses and communities.' |
,'<a href="/adm/coursecatalog?showdom='.$esc_dom.'">' |
,'<b>' |
,'</a></b>',$domdesc) |
,'<a href="/adm/coursecatalog?showdom='.$esc_dom.'">' |
.'<br />' |
,'</a></b>',$domdesc) |
.&mt('If a course or community is [_1]not[_2] in your list of current courses and communities below,' |
.'<br />' |
|
.&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.' |
.' you may be able to enroll if self-enrollment is permitted.' |
,'<b>','</b>') |
,'<b>','</b>') |
.'</p>' |
.'</p>' |
); |
); |
|
} |
} |
} |
} |
} |
|
|
Line 786 ENDSCRIPT
|
Line 793 ENDSCRIPT
|
} else { |
} else { |
$r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>'); |
$r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>'); |
} |
} |
&findcourse_advice($r); |
unless ($env{'user.domain'} eq 'gcitest') { |
&requestcourse_advice($r); |
&findcourse_advice($r); |
|
&requestcourse_advice($r); |
|
} |
$r->print('</form>'); |
$r->print('</form>'); |
if ($countfuture) { |
if ($countfuture) { |
$r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture)); |
$r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture)); |