';
+ for (my $col=1; $col<=2; $col++) {
+ $output.='';
+ for (my $row=1; $row<=8; $row++) {
+ foreach my $cat (keys(%category_members)) {
+ if ($category_positions{$cat} ne "$col,$row") { next; }
+ $output.=' ';
+ my %active=();
+ foreach my $menu_item (split(/\:/,$category_members{$cat})) {
+ if ($inlineremote[$menu_item]) {
+ $active{$menu_item}=1;
+ }
+ }
+ foreach my $item (sort(keys(%active))) {
+ $output.=$inlineremote[$item];
+ }
+ $output.=' ';
+ }
+ }
+ $output.=" | ";
+ }
+ $output.="
";
+ return $output;
}
sub rawconfig {
@@ -919,39 +982,44 @@ sub rawconfig {
my $con=($env{'request.state'} eq 'construct');
my $rol=$env{'request.role'};
my $requested_domain = $env{'request.role.domain'};
- foreach (@desklines) {
- my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc)=split(/\:/,$_);
+ foreach my $line (@desklines) {
+ my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc,$cat)=split(/\:/,$line);
$prt=~s/\$uname/$uname/g;
$prt=~s/\$udom/$udom/g;
$prt=~s/\$crs/$crs/g;
$prt=~s/\$requested_domain/$requested_domain/g;
+ if ($category_names{$cat}!~/\w/) { $cat='oth'; }
+ my $type = &Apache::loncommon::course_type();
+ if ($type eq 'Group') {
+ $desc = &convert_menu_function($desc,$type);
+ }
if ($pro eq 'clear') {
$output.=&clear($row,$col);
} elsif ($pro eq 'any') {
$output.=&secondlevel(
- $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
} elsif ($pro eq 'smp') {
unless ($adv) {
$output.=&secondlevel(
- $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
} elsif ($pro eq 'adv') {
if ($adv) {
$output.=&secondlevel(
- $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
} elsif (($pro=~/^p(\w+)/) && ($prt)) {
if (&Apache::lonnet::allowed($1,$prt)) {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
}
} elsif ($pro eq 'course') {
if ($env{'request.course.fn'}) {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
}
} elsif ($pro =~ /^courseenv_(.*)$/) {
my $key = $1;
if ($env{'course.'.$env{'request.course.id'}.'.'.$key}) {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
}
} elsif ($pro =~ /^course_(.*)$/) {
# Check for permissions inside of a course
@@ -959,7 +1027,7 @@ sub rawconfig {
(&Apache::lonnet::allowed($1,$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))
)) {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
}
} elsif ($pro eq 'author') {
if ($author) {
@@ -970,7 +1038,7 @@ sub rawconfig {
my $caname=$env{'user.name'};
if ($prt eq 'rca') {
($cadom,$caname)=
- ($env{'request.role'}=~/(\w+)\/(\w+)$/);
+ ($env{'request.role'}=~/($match_domain)\/($match_username)$/);
}
$act =~ s/\$caname/$caname/g;
my $home = &Apache::lonnet::homeserver($caname,$cadom);
@@ -978,8 +1046,8 @@ sub rawconfig {
my @ids=&Apache::lonnet::current_machine_ids();
foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
if ($allowed) {
- $output.=switch($caname,$cadom,
- $row,$col,$img,$top,$bot,$act,$desc);
+ $output.=&switch($caname,$cadom,
+ $row,$col,$img,$top,$bot,$act,$desc,$cat);
}
}
}
@@ -1045,7 +1113,7 @@ 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]));
- $currenturl=&Apache::lonenc::check_encrypt(&Apache::lonnet::unescape($currenturl));
+ $currenturl=&Apache::lonenc::check_encrypt(&unescape($currenturl));
my $currentsymb=&Apache::lonenc::check_encrypt($env{'request.symb'});
my $nav_control=&nav_control_js();
@@ -1058,13 +1126,16 @@ sub utilityfunctions {
'add_entries' => {
'onload' => 'javascript:document.goannotate.submit();'}});
+ my $end_page_annotate =
+ &Apache::loncommon::end_page({'js_ready' => 1});
+
my $start_page_bookmark =
&Apache::loncommon::start_page('Bookmarks',undef,
{'only_body' => 1,
'js_ready' => 1,
'bgcolor' => '#BBBBBB',});
- my $end_page =
+ my $end_page_bookmark =
&Apache::loncommon::end_page({'js_ready' => 1});
return (<