version 1.142, 2005/01/31 19:24:02
|
version 1.148, 2005/02/18 21:23:12
|
Line 108 ENDRELOAD
|
Line 108 ENDRELOAD
|
my $utility=&utilityfunctions(); |
my $utility=&utilityfunctions(); |
my $output=(<<ENDMAINMENU); |
my $output=(<<ENDMAINMENU); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
<!-- // BEGIN LON-CAPA Internal |
$utility |
$utility |
|
--> |
</script> |
</script> |
<a href="/adm/menu" target="_top">$lt{'main'}</a> |
<a href="/adm/menu" target="_top">$lt{'main'}</a> |
$reloadlink $navmaps<br /> |
$reloadlink $navmaps<br /> |
Line 154 ENDMAINMENU
|
Line 155 ENDMAINMENU
|
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="$link"><font color="$font">$lt{'nav'}</font></a></td> |
<a href="$link"><font color="$font">$lt{'nav'}</font></a></td> |
ENDNAV |
ENDNAV |
if (($ENV{'request.noversionuri'}=~/^\/adm\//) && |
if ( |
($ENV{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
($ENV{'request.noversionuri'}=~m[^/(res|public)/] && |
($ENV{'request.noversionuri'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) { |
$ENV{'request.symb'} eq '') |
|
|| |
|
(($ENV{'request.noversionuri'}=~/^\/adm\//) && |
|
($ENV{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
|
($ENV{'request.noversionuri'}!~ |
|
m[^/adm/.*/(smppg|bulletinboard|aboutme)($|\?)]) |
|
) |
|
) { |
my $escreload=&Apache::lonnet::escape('return:'); |
my $escreload=&Apache::lonnet::escape('return:'); |
$reloadlink=(<<ENDRELOAD); |
$reloadlink=(<<ENDRELOAD); |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
Line 170 ENDRELOAD
|
Line 178 ENDRELOAD
|
} |
} |
my $form=&serverform(); |
my $form=&serverform(); |
my $utility=&utilityfunctions(); |
my $utility=&utilityfunctions(); |
|
my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); |
return (<<ENDINLINEMENU); |
return (<<ENDINLINEMENU); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
<!-- // BEGIN LON-CAPA Internal |
$utility |
$utility |
|
--> |
</script> |
</script> |
<font face="Arial,Helvetica,sans-serif"><table bgcolor="$pgbg" width="100%" border="0" cellpadding="1" cellspacing="1"> |
<font face="Arial,Helvetica,sans-serif"><table bgcolor="$pgbg" width="100%" border="0" cellpadding="1" cellspacing="1"> |
<tr> |
<tr> |
Line 186 $navmaps
|
Line 196 $navmaps
|
<a href="/adm/remote?action=launch&url=$escurl" target="_top"> |
<a href="/adm/remote?action=launch&url=$escurl" target="_top"> |
<font color="$font">$lt{'launch'}</font></a></td> |
<font color="$font">$lt{'launch'}</font></a></td> |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<img align="right" src="/adm/lonIcons/minilogo.gif" /> |
<img align="right" src="$logo" /> |
<b>LON-CAPA</b></td> |
<b>LON-CAPA</b></td> |
$form |
$form |
</tr> |
</tr> |
Line 295 sub innerregister {
|
Line 305 sub innerregister {
|
my $tableend=($noremote?'</table></font>':'').($textinter?'<a name="content" />':''); |
my $tableend=($noremote?'</table></font>':'').($textinter?'<a name="content" />':''); |
# ============================================================================= |
# ============================================================================= |
# ============================ This is for URLs that actually can be registered |
# ============================ This is for URLs that actually can be registered |
if (($ENV{'request.noversionuri'}!~/^\/(res\/)*adm\//) || ($forcereg)) { |
if (($ENV{'request.noversionuri'}!~m|^/(res/)*adm/|) || ($forcereg)) { |
# -- This applies to homework problems for users with grading privileges |
# -- This applies to homework problems for users with grading privileges |
my $crs='/'.$ENV{'request.course.id'}; |
my $crs='/'.$ENV{'request.course.id'}; |
if ($ENV{'request.course.sec'}) { |
if ($ENV{'request.course.sec'}) { |
Line 304 sub innerregister {
|
Line 314 sub innerregister {
|
$crs=~s/\_/\//g; |
$crs=~s/\_/\//g; |
|
|
my $hwkadd=''; |
my $hwkadd=''; |
if ($ENV{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { |
if ($ENV{'request.symb'} ne '' && |
|
$ENV{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { |
if (&Apache::lonnet::allowed('vgr',$crs)) { |
if (&Apache::lonnet::allowed('vgr',$crs)) { |
$hwkadd.=&switch('','',7,1,'subm.gif','view sub-[_1]','missions[_1]', |
$hwkadd.=&switch('','',7,1,'subm.gif','view sub-[_1]','missions[_1]', |
"gocmd('/adm/grades','submission')", |
"gocmd('/adm/grades','submission')", |
Line 316 sub innerregister {
|
Line 327 sub innerregister {
|
'Modify user grades for this assessment resource'); |
'Modify user grades for this assessment resource'); |
} |
} |
} |
} |
if (&Apache::lonnet::allowed('opa',$crs)) { |
if ($ENV{'request.symb'} ne '' && |
|
&Apache::lonnet::allowed('opa',$crs)) { |
$hwkadd.=&switch('','',7,3,'pparm.gif','problem[_2]','parms[_2]', |
$hwkadd.=&switch('','',7,3,'pparm.gif','problem[_2]','parms[_2]', |
"gocmd('/adm/parmset','set')", |
"gocmd('/adm/parmset','set')", |
'Modify deadlines, etc, for this resource'); |
'Modify deadlines, etc, for this resource'); |
Line 401 s&7&1&del.gif&delete[_1]&resource[_2]&go
|
Line 413 s&7&1&del.gif&delete[_1]&resource[_2]&go
|
s&7&2&prt.gif&prepare[_1]&printout[_1]&gocstr('/adm/printout','/~$uname/$thisdisfn')&Prepare a printable document |
s&7&2&prt.gif&prepare[_1]&printout[_1]&gocstr('/adm/printout','/~$uname/$thisdisfn')&Prepare a printable document |
ENDMENUITEMS |
ENDMENUITEMS |
} |
} |
} elsif (defined($ENV{'request.course.id'})) { |
} elsif (defined($ENV{'request.course.id'}) && |
|
$ENV{'request.symb'} ne '') { |
$menuitems=(<<ENDMENUITEMS); |
$menuitems=(<<ENDMENUITEMS); |
c&3&1 |
c&3&1 |
s&2&1&back.gif&backward[_1]&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&1 |
s&2&1&back.gif&backward[_1]&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&1 |
Line 430 ENDREALRES
|
Line 443 ENDREALRES
|
$buttons.=&clear(@rest); |
$buttons.=&clear(@rest); |
} |
} |
} |
} |
|
|
if ($textual) { |
if ($textual) { |
# Registered, textual output |
my $addremote=0; |
|
foreach (@inlineremote) { if ($_ ne '') { $addremote=1; } } |
my $inlinebuttons=''; |
my $inlinebuttons=''; |
|
if ($addremote) { |
|
# Registered, textual output |
|
|
if ($ENV{'browser.interface'} eq 'textual') { |
if ($ENV{'browser.interface'} eq 'textual') { |
$inlinebuttons= |
$inlinebuttons= |
join('',map { (defined($_)?$_:'') } @inlineremote); |
join('',map { (defined($_)?$_:'') } @inlineremote); |
} else { |
} else { |
$inlinebuttons=(<<ENDINLINE); |
$inlinebuttons=(<<ENDINLINE); |
<tr><td>$inlineremote[21]</td><td> </td><td>$inlineremote[23]</td></tr> |
<tr><td>$inlineremote[21]</td><td> </td><td>$inlineremote[23]</td></tr> |
<tr><td>$inlineremote[61]</td><td>$inlineremote[62]</td><td>$inlineremote[63]</td></tr> |
<tr><td>$inlineremote[61]</td><td>$inlineremote[62]</td><td>$inlineremote[63]</td></tr> |
<tr><td>$inlineremote[71]</td><td>$inlineremote[72]</td><td>$inlineremote[73]</td></tr> |
<tr><td>$inlineremote[71]</td><td>$inlineremote[72]</td><td>$inlineremote[73]</td></tr> |
<tr><td>$inlineremote[81]</td><td>$inlineremote[82]</td><td>$inlineremote[83]</td></tr> |
<tr><td>$inlineremote[81]</td><td>$inlineremote[82]</td><td>$inlineremote[83]</td></tr> |
<tr><td>$inlineremote[91]</td><td>$inlineremote[92]</td><td>$inlineremote[93]</td></tr> |
<tr><td>$inlineremote[91]</td><td>$inlineremote[92]</td><td>$inlineremote[93]</td></tr> |
ENDINLINE |
ENDINLINE |
|
} |
} |
} |
if ($const_space && $is_const_dir) { |
|
$inlinebuttons = ''; |
|
} |
|
$result =(<<ENDREGTEXT); |
$result =(<<ENDREGTEXT); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
Line 470 ENDREGTEXT
|
Line 485 ENDREGTEXT
|
my $cursymb=&Apache::lonenc::check_encrypt($ENV{'request.symb'}); |
my $cursymb=&Apache::lonenc::check_encrypt($ENV{'request.symb'}); |
my $navstatus=&get_nav_status(); |
my $navstatus=&get_nav_status(); |
my $clearcstr; |
my $clearcstr; |
|
|
if ($ENV{'user.adv'}) { $clearcstr='clearbut(6,1)'; } |
if ($ENV{'user.adv'}) { $clearcstr='clearbut(6,1)'; } |
$result = (<<ENDREGTHIS); |
$result = (<<ENDREGTHIS); |
|
|
<script type="text/javascript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// <!-- BEGIN LON-CAPA Internal |
var swmenu=null; |
var swmenu=null; |
|
|
function LONCAPAreg() { |
function LONCAPAreg() { |
Line 509 var swmenu=null;
|
Line 525 var swmenu=null;
|
2000); |
2000); |
} |
} |
|
|
// END LON-CAPA Internal |
// END LON-CAPA Internal --> |
</script> |
</script> |
ENDREGTHIS |
ENDREGTHIS |
} |
} |
Line 979 sub utilityfunctions {
|
Line 995 sub utilityfunctions {
|
my $caller = shift; |
my $caller = shift; |
unless (($ENV{'browser.interface'} eq 'textual') || |
unless (($ENV{'browser.interface'} eq 'textual') || |
($ENV{'environment.remote'} eq 'off') || ($caller eq '/adm/menu')) { return ''; } |
($ENV{'environment.remote'} eq 'off') || ($caller eq '/adm/menu')) { return ''; } |
my $currenturl=&Apache::lonenc::check_encrypt($ENV{'request.noversionuri'}); |
my $currenturl=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$ENV{'request.noversionuri'}))[0])); |
|
$currenturl=&Apache::lonenc::check_encrypt(&Apache::lonnet::unescape($currenturl)); |
|
|
my $currentsymb=&Apache::lonenc::check_encrypt($ENV{'request.symb'}); |
my $currentsymb=&Apache::lonenc::check_encrypt($ENV{'request.symb'}); |
my $nav_control=&nav_control_js(); |
my $nav_control=&nav_control_js(); |
Line 1160 ENDSCRIPT
|
Line 1177 ENDSCRIPT
|
$ENV{'browser.interface'}='faketextual'; |
$ENV{'browser.interface'}='faketextual'; |
$ENV{'environment.remote'}='off'; |
$ENV{'environment.remote'}='off'; |
} |
} |
|
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<ENDHEADER); |
$r->print(<<ENDHEADER); |
<html><head> |
$html |
|
<head> |
<title>LON-CAPA Main Menu</title> |
<title>LON-CAPA Main Menu</title> |
$script_tag |
$script_tag |
</head> |
</head> |