@@ -362,8 +391,8 @@ var swmenu=null;
$timesync
$newmail
$buttons
- swmenu.currentURL=window.location.pathname;
- swmenu.reloadURL=window.location.pathname+window.location.search;
+ swmenu.currentURL="$requri";
+ swmenu.reloadURL=swmenu.currentURL+window.location.search;
swmenu.currentSymb="$ENV{'request.symb'}";
swmenu.reloadSymb="$ENV{'request.symb'}";
swmenu.currentStale=0;
@@ -385,7 +414,6 @@ var swmenu=null;
'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+
'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)',
2000);
-
}
// END LON-CAPA Internal
@@ -437,10 +465,12 @@ ENDDONOTREGTHIS
}
sub loadevents() {
+ if ($ENV{'REQUEST_URI'} eq '/res/adm/pages/menu.html') { return ''; }
return 'LONCAPAreg();';
}
sub unloadevents() {
+ if ($ENV{'REQUEST_URI'} eq '/res/adm/pages/menu.html') { return ''; }
return 'LONCAPAstale();';
}
@@ -553,6 +583,7 @@ ENDRESIZE
window.status='Opening LON-CAPA Remote Control';
var menu=window.open("/res/adm/pages/menu.html","$menuname",
"height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");
+self.name='loncapaclient';
ENDOPEN
return '';
}
@@ -588,19 +619,19 @@ sub switch {
# Accessibility
if ($nobreak==2) { return ''; }
my $text=$top.' '.$bot;
- $text=~s/\- //;
+ $text=~s/\s*\-\s*//gs;
$inlineremote[10*$row+$col]="\n".($nobreak?' ':'
').
- ''.$text.' '.
+ ''.$text.' '.
($nobreak?'':$desc);
} else {
# Inline Remote
if ($nobreak==2) { return ''; }
my $text=$top.' '.$bot;
- $text=~s/\- //;
+ $text=~s/\s*\-\s*//gs;
$inlineremote[10*$row+$col]="\n".
($nobreak==3?' | '.$text.' | '.
($nobreak?'':''.$desc.'').($nobreak!=1?'':'');
@@ -685,7 +716,7 @@ sub rawconfig {
$output.=&secondlevel(
$uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
}
- } elsif (($pro=~/p(\w+)/) && ($prt)) {
+ } elsif (($pro=~/^p(\w+)/) && ($prt)) {
if (&Apache::lonnet::allowed($1,$prt)) {
$output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
}
@@ -693,6 +724,14 @@ sub rawconfig {
if ($ENV{'request.course.fn'}) {
$output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
}
+ } elsif ($pro =~ /^course_(.*)$/) {
+ # Check for permissions inside of a course
+ if (($ENV{'request.course.id'}) &&
+ (&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);
+ }
} elsif ($pro eq 'author') {
if ($author) {
if ((($prt eq 'rca') && ($ENV{'request.role'}=~/^ca/)) ||
@@ -802,7 +841,7 @@ ENDUTILITY
sub serverform {
return(<
+ |