';
for (my $col=1; $col<=2; $col++) {
- $output.='';
+ $output.=' | ';
for (my $row=1; $row<=8; $row++) {
foreach my $cat (keys(%category_members)) {
if ($category_positions{$cat} ne "$col,$row") { next; }
- $output.=' ';
+ #$output.=' ';
+ $output.='';
}
}
$output.="";
@@ -1037,7 +1223,7 @@ sub rawconfig {
my $uname=$env{'user.name'};
my $udom=$env{'user.domain'};
my $adv=$env{'user.adv'};
- my $show_course=&show_course();
+ my $show_course=&Apache::loncommon::show_course();
my $author=$env{'user.author'};
my $crs='';
if ($env{'request.course.id'}) {
@@ -1135,7 +1321,20 @@ sub rawconfig {
my @tools = ('aboutme','blog','portfolio');
if (grep(/^\Q$prt\E$/,@tools)) {
if (!&Apache::lonnet::usertools_access($env{'user.name'},
- $env{'user.domain'},$prt)) {
+ $env{'user.domain'},
+ $prt,undef,'tools')) {
+ $output.=&clear($row,$col);
+ next;
+ }
+ } elsif (($prt eq 'reqcrsnsc') || ($prt eq 'reqcrsshc')) {
+ if (($prt eq 'reqcrsnsc') && ($show_course)) {
+ next;
+ }
+ if (($prt eq 'reqcrsshc') && (!$show_course)) {
+ next;
+ }
+ my $showreqcrs = &check_for_rcrs();
+ if (!$showreqcrs) {
$output.=&clear($row,$col);
next;
}
@@ -1143,6 +1342,7 @@ sub rawconfig {
$prt='any';
$output.=&secondlevel(
$uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
+
}
}
unless (($env{'browser.interface'} eq 'textual') ||
@@ -1156,6 +1356,28 @@ sub rawconfig {
return $output;
}
+sub check_for_rcrs {
+ my $showreqcrs = 0;
+ my @reqtypes = ('official','unofficial','community');
+ foreach my $type (@reqtypes) {
+ if (&Apache::lonnet::usertools_access($env{'user.name'},
+ $env{'user.domain'},
+ $type,undef,'requestcourses')) {
+ $showreqcrs = 1;
+ last;
+ }
+ }
+ if (!$showreqcrs) {
+ foreach my $type (@reqtypes) {
+ if ($env{'environment.reqcrsotherdom.'.$type} ne '') {
+ $showreqcrs = 1;
+ last;
+ }
+ }
+ }
+ return $showreqcrs;
+}
+
# ======================================================================= Close
sub close {
@@ -1164,6 +1386,7 @@ sub close {
my $menuname = &get_menu_name();
return(<
+//
ENDCLOSE
}
@@ -1205,6 +1429,11 @@ sub utilityfunctions {
unless (($env{'browser.interface'} eq 'textual') ||
($env{'environment.remote'} eq 'off') || ($caller eq '/adm/menu')) { return ''; }
my $currenturl=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0]));
+ if ($currenturl =~ m{^/adm/wrapper/ext/}) {
+ if ($env{'request.external.querystring'}) {
+ $currenturl .= ($currenturl=~/\?/)?'&':'?'.$env{'request.external.querystring'};
+ }
+ }
$currenturl=&Apache::lonenc::check_encrypt(&unescape($currenturl));
my $currentsymb=&Apache::lonenc::check_encrypt($env{'request.symb'});
@@ -1359,16 +1588,16 @@ function set_bookmark() {
bmquery=window.open('','bmquery','width=365,height=165,scrollbars=0');
bmquery.document.write(
'$start_page_bookmark'
- +"
|