version 1.125, 2004/11/11 19:55:44
|
version 1.141, 2005/01/31 19:20:47
|
Line 43 use Apache::lonnet();
|
Line 43 use Apache::lonnet();
|
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
use Apache::loncommon(); |
use Apache::loncommon(); |
|
use Apache::lonenc(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
|
use vars qw(@desklines $readdesk); |
use vars qw(@desklines $readdesk); |
Line 68 sub menubuttons {
|
Line 69 sub menubuttons {
|
my $forcereg=shift; |
my $forcereg=shift; |
my $target =shift; |
my $target =shift; |
my $registration=shift; |
my $registration=shift; |
|
my $titletable=shift; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['inhibitmenu']); |
['inhibitmenu']); |
if ($ENV{'form.inhibitmenu'} eq 'yes') { return ''; } |
if ($ENV{'form.inhibitmenu'} eq 'yes') { return ''; } |
|
|
my $navmaps=''; |
my $navmaps=''; |
my $reloadlink=''; |
my $reloadlink=''; |
my $escurl=&Apache::lonnet::escape(&check_encrypt($ENV{'request.noversionuri'})); |
my $escurl=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($ENV{'request.noversionuri'})); |
my $escsymb=&Apache::lonnet::escape(&check_encrypt($ENV{'request.symb'})); |
my $escsymb=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($ENV{'request.symb'})); |
|
if ($ENV{'request.state'} eq 'construct') { |
|
if (($ENV{'request.noversionuri'} eq '') || (!defined($ENV{'request.noversionuri'}))) { |
|
my $returnurl = $ENV{'request.filename'}; |
|
$returnurl =~ s:^/home/([^/]+)/public_html/(.*)$:/priv/$1/$2:; |
|
$escurl = &Apache::lonnet::escape($returnurl); |
|
} |
|
} |
if ($ENV{'browser.interface'} eq 'textual') { |
if ($ENV{'browser.interface'} eq 'textual') { |
# Textual display only |
# Textual display only |
my %lt=&initlittle(); |
my %lt=&initlittle(); |
Line 95 ENDNAV
|
Line 104 ENDNAV
|
ENDRELOAD |
ENDRELOAD |
} |
} |
} |
} |
|
my $form=&serverform(); |
my $utility=&utilityfunctions(); |
my $utility=&utilityfunctions(); |
my $output=(<<ENDMAINMENU); |
my $output=(<<ENDMAINMENU); |
<script> |
<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 /> |
<script> |
<script type="text/javascript"> |
// END LON-CAPA Internal |
// END LON-CAPA Internal |
</script> |
</script> |
|
$form |
ENDMAINMENU |
ENDMAINMENU |
if ($registration) { $output.=&innerregister($forcereg,$target); } |
if ($registration) { $output.=&innerregister($forcereg,$target); } |
return $output."<hr />"; |
return $output."<hr />"; |
Line 134 ENDMAINMENU
|
Line 145 ENDMAINMENU
|
my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain); |
my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain); |
# Do we have a NAV link? |
# Do we have a NAV link? |
if ($ENV{'request.course.id'}) { |
if ($ENV{'request.course.id'}) { |
$navmaps=(<<ENDNAV); |
my $link='/adm/navmaps?postdata='.$escurl.'&postsymb='. |
|
$escsymb; |
|
if ($ENV{'environment.remotenavmap'} eq 'on') { |
|
$link="javascript:gonav('".$link."')"; |
|
} |
|
$navmaps=(<<ENDNAV); |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="javascript:gonav('/adm/navmaps?postdata=$escurl&postsymb=$escsymb')"><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\//) && |
($ENV{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
($ENV{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
Line 150 ENDRELOAD
|
Line 166 ENDRELOAD
|
} |
} |
my $reg=''; |
my $reg=''; |
if ($registration) { |
if ($registration) { |
$reg=&innerregister($forcereg,$target); |
$reg=&innerregister($forcereg,$target,$titletable); |
} |
} |
|
my $form=&serverform(); |
my $utility=&utilityfunctions(); |
my $utility=&utilityfunctions(); |
return (<<ENDINLINEMENU); |
return (<<ENDINLINEMENU); |
<script> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
$utility |
$utility |
</script> |
</script> |
Line 166 $utility
|
Line 183 $utility
|
$reloadlink |
$reloadlink |
$navmaps |
$navmaps |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<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="/adm/lonIcons/minilogo.gif" /> |
<b>LON-CAPA</b></td> |
<b>LON-CAPA</b></td> |
|
$form |
</tr> |
</tr> |
</table> |
</table> |
</font> |
</font> |
<script> |
<script type="text/javascript"> |
// END LON-CAPA Internal |
// END LON-CAPA Internal |
</script> |
</script> |
$reg |
$reg |
Line 224 sub registerurl {
|
Line 242 sub registerurl {
|
sub innerregister { |
sub innerregister { |
my $forcereg=shift; |
my $forcereg=shift; |
my $target = shift; |
my $target = shift; |
|
my $titletable = shift; |
my $result = ''; |
my $result = ''; |
my ($uname,$thisdisfn); |
my ($uname,$thisdisfn); |
my $const_space = 0; |
my $const_space = ($ENV{'request.state'} eq 'construct'); |
if ($ENV{'request.filename'} =~ /^\/home\/([^\/]+)\/public_html\/(.*)/) { |
my $is_const_dir = 0; |
$const_space = 1; |
|
$uname = $1; |
|
$thisdisfn = $2; |
|
} |
|
|
|
if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } |
if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } |
|
|
Line 251 sub innerregister {
|
Line 266 sub innerregister {
|
if ($noremote) { |
if ($noremote) { |
$newmail='<font face="Arial,Helvetica,sans-serif"><table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td bgcolor="'.$tabbg.'">'; |
$newmail='<font face="Arial,Helvetica,sans-serif"><table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td bgcolor="'.$tabbg.'">'; |
} |
} |
if ($textual && $const_space) { |
|
my $formaction='/priv/'.$uname.'/'.$thisdisfn; |
|
$formaction=~s/\/+/\//g; |
|
my $titleinfo = '<form name="dirs" method="post" action="'.$formaction |
|
.'" target="_top">'. |
|
&Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn,'_top','/priv','','-1'). |
|
&Apache::lonhtmlcommon::select_recent('construct','recent', |
|
'this.form.action=this.form.recent.value;this.form.submit()'). |
|
'</form>'; |
|
&Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); |
|
$newmail .= &constspaceform(); |
|
# role and realm |
|
my ($role,$realm) = &Apache::lonnet::plaintext((split(/\./,$ENV{'request.role'}))[0]); |
|
unless ($realm) { $realm=' '; } |
|
$newmail .= <<END; |
|
<table width="100%" cellspacing="0" border="0" cellpadding="0"> |
|
<tr> |
|
<td> |
|
$titleinfo |
|
</td> |
|
<td align="right"> |
|
<font size="2" face="Arial, Helvetica, sans-serif"> |
|
$ENV{'environment.firstname'} |
|
$ENV{'environment.middlename'} |
|
$ENV{'environment.lastname'} |
|
$ENV{'environment.generation'} |
|
</font> <br /> |
|
<font size="2" face="Arial, Helvetica, sans-serif">$role</font> |
|
</td></tr> |
|
</table> |
|
END |
|
} |
|
if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) { |
if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) { |
my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'}); |
my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'}); |
$newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
$newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
my $maptitle=&Apache::lonnet::gettitle($mapurl); |
my $maptitle=&Apache::lonnet::gettitle($mapurl); |
my $restitle=&Apache::lonnet::gettitle($resurl); |
my $restitle=&Apache::lonnet::gettitle($resurl); |
if ($maptitle) { |
if ($maptitle && $maptitle ne 'default.sequence') { |
$newmail.=', '.$maptitle; |
$newmail.=', '.$maptitle; |
} |
} |
if ($restitle) { |
if ($restitle) { |
Line 301 END
|
Line 284 END
|
'<b><a href="/adm/communicate" target="_top">You have new messages</a></b><br />': |
'<b><a href="/adm/communicate" target="_top">You have new messages</a></b><br />': |
'swmenu.setstatus("you have","messages");'); |
'swmenu.setstatus("you have","messages");'); |
} |
} |
|
if ($ENV{'request.state'} eq 'construct') { |
|
$newmail = $titletable; |
|
} |
if ($noremote) { |
if ($noremote) { |
$newmail.='</td></tr></table></font>'; |
$newmail.='</td></tr></table></font>'; |
} |
} |
Line 400 END
|
Line 386 END
|
# Prepare the rest of the buttons |
# Prepare the rest of the buttons |
my $menuitems; |
my $menuitems; |
if ($const_space) { |
if ($const_space) { |
|
my ($uname,$thisdisfn) = |
|
($ENV{'request.filename'}=~m|^/home/([^/]+)/public_html/(.*)|); |
my $currdir = '/priv/'.$uname.'/'.$thisdisfn; |
my $currdir = '/priv/'.$uname.'/'.$thisdisfn; |
$currdir =~ s#[^/]+$##; |
if ($currdir =~ m-/$-) { |
$menuitems=(<<ENDMENUITEMS); |
$is_const_dir = 1; |
s&6&1&list.gif&list[_1]&dir[_1]&go('$currdir')&List current directory |
} else { |
s&6&2&rtrv.gif&retrieve[_1]&version[_1]&gocstr('/adm/retrieve','/~$uname/$thisdisfn')&Retreive old version |
$currdir =~ s#[^/]+$##; |
|
$menuitems=(<<ENDMENUITEMS); |
|
s&6&1&list.gif&list[_1]&dir[_1]&golist('$currdir')&List current directory |
|
s&6&2&rtrv.gif&retrieve[_1]&version[_1]&gocstr('/adm/retrieve','/~$uname/$thisdisfn')&Retrieve old version |
s&6&3&pub.gif&publish[_1]&resource[_1]&gocstr('/adm/publish','/~$uname/$thisdisfn')&Publish this resource |
s&6&3&pub.gif&publish[_1]&resource[_1]&gocstr('/adm/publish','/~$uname/$thisdisfn')&Publish this resource |
s&7&1&del.gif&delete[_1]&resource[_2]&gocstr('/adm/cfile?action=delete','/~$uname/$thisdisfn')&Delete this resource |
s&7&1&del.gif&delete[_1]&resource[_2]&gocstr('/adm/cfile?action=delete','/~$uname/$thisdisfn')&Delete this resource |
s&7&2&prt.gif&prepare[_1]&printout[_1]&gopost('/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 |
} else { |
} |
|
} elsif (defined($ENV{'request.course.id'})) { |
$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 440 ENDREALRES
|
Line 432 ENDREALRES
|
} |
} |
if ($textual) { |
if ($textual) { |
# Registered, textual output |
# Registered, textual output |
my $form=&serverform(); |
|
my $inlinebuttons=''; |
my $inlinebuttons=''; |
|
|
if ($ENV{'browser.interface'} eq 'textual') { |
if ($ENV{'browser.interface'} eq 'textual') { |
Line 448 ENDREALRES
|
Line 439 ENDREALRES
|
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> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
</script> |
</script> |
$timesync |
$timesync |
Line 464 $newmail
|
Line 458 $newmail
|
$tablestart |
$tablestart |
$inlinebuttons |
$inlinebuttons |
$tableend |
$tableend |
$form |
<script type="text/javascript"> |
<script> |
|
// END LON-CAPA Internal |
// END LON-CAPA Internal |
</script> |
</script> |
|
|
ENDREGTEXT |
ENDREGTEXT |
# Registered, graphical output |
# Registered, graphical output |
} else { |
} else { |
my $requri=(split(/\?/,$ENV{'request.noversionuri'}))[0]; |
my $requri=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$ENV{'request.noversionuri'}))[0])); |
$requri=&check_encrypt(&Apache::lonnet::unescape($requri)); |
$requri=&Apache::lonenc::check_encrypt(&Apache::lonnet::unescape($requri)); |
my $cursymb=&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; |
|
if ($ENV{'user.adv'}) { $clearcstr='clearbut(6,1)'; } |
$result = (<<ENDREGTHIS); |
$result = (<<ENDREGTHIS); |
|
|
<script language="JavaScript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
var swmenu=null; |
var swmenu=null; |
|
|
Line 510 var swmenu=null;
|
Line 505 var swmenu=null;
|
swmenu.clearbut(7,3); |
swmenu.clearbut(7,3); |
swmenu.menucltim=swmenu.setTimeout( |
swmenu.menucltim=swmenu.setTimeout( |
'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+ |
'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+ |
'clearbut(9,1);clearbut(9,3);clearbut(6,3);clearbut(6,1)', |
'clearbut(9,1);clearbut(9,3);clearbut(6,3);$clearcstr', |
2000); |
2000); |
} |
} |
|
|
Line 529 ENDDONOTREGTEXT
|
Line 524 ENDDONOTREGTEXT
|
# Not registered, graphical |
# Not registered, graphical |
$result = (<<ENDDONOTREGTHIS); |
$result = (<<ENDDONOTREGTHIS); |
|
|
<script language="JavaScript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
var swmenu=null; |
var swmenu=null; |
|
|
Line 563 ENDDONOTREGTHIS
|
Line 558 ENDDONOTREGTHIS
|
} |
} |
|
|
sub loadevents() { |
sub loadevents() { |
if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } |
if ($ENV{'request.state'} eq 'construct' || |
|
$ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } |
return 'LONCAPAreg();'; |
return 'LONCAPAreg();'; |
} |
} |
|
|
sub unloadevents() { |
sub unloadevents() { |
if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } |
if ($ENV{'request.state'} eq 'construct' || |
|
$ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } |
return 'LONCAPAstale();'; |
return 'LONCAPAstale();'; |
} |
} |
|
|
Line 587 sub startupremote {
|
Line 584 sub startupremote {
|
my $esclowerurl=&Apache::lonnet::escape($lowerurl); |
my $esclowerurl=&Apache::lonnet::escape($lowerurl); |
my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited'); |
my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited'); |
return(<<ENDREMOTESTARTUP); |
return(<<ENDREMOTESTARTUP); |
<script> |
<script type="text/javascript"> |
var timestart; |
var timestart; |
function wheelswitch() { |
function wheelswitch() { |
if (typeof(document.wheel) != 'undefined') { |
if (typeof(document.wheel) != 'undefined') { |
Line 644 ENDREMOTESTARTUP
|
Line 641 ENDREMOTESTARTUP
|
|
|
sub setflags() { |
sub setflags() { |
return(<<ENDSETFLAGS); |
return(<<ENDSETFLAGS); |
<script> |
<script type="text/javascript"> |
menuloaded=0; |
menuloaded=0; |
tim=0; |
tim=0; |
</script> |
</script> |
Line 655 sub maincall() {
|
Line 652 sub maincall() {
|
if (($ENV{'browser.interface'} eq 'textual') || |
if (($ENV{'browser.interface'} eq 'textual') || |
($ENV{'environment.remote'} eq 'off')) { return ''; } |
($ENV{'environment.remote'} eq 'off')) { return ''; } |
return(<<ENDMAINCALL); |
return(<<ENDMAINCALL); |
<script> |
<script type="text/javascript"> |
main(); |
main(); |
</script> |
</script> |
ENDMAINCALL |
ENDMAINCALL |
Line 713 var menu=window.open("/res/adm/pages/men
|
Line 710 var menu=window.open("/res/adm/pages/men
|
"height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5"); |
"height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5"); |
self.name='loncapaclient'; |
self.name='loncapaclient'; |
ENDOPEN |
ENDOPEN |
return '<script>'.$returnval.'</script>'; |
return '<script type="text/javascript">'.$returnval.'</script>'; |
} |
} |
|
|
|
|
Line 941 sub close {
|
Line 938 sub close {
|
($ENV{'environment.remote'} eq 'off')) { return ''; } |
($ENV{'environment.remote'} eq 'off')) { return ''; } |
my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; |
my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; |
return(<<ENDCLOSE); |
return(<<ENDCLOSE); |
<script> |
<script type="text/javascript"> |
window.status='Accessing Remote Control'; |
window.status='Accessing Remote Control'; |
menu=window.open("/adm/rat/empty.html","$menuname", |
menu=window.open("/adm/rat/empty.html","$menuname", |
"height=350,width=150,scrollbars=no,menubar=no"); |
"height=350,width=150,scrollbars=no,menubar=no"); |
Line 978 function gonav(url) {
|
Line 975 function gonav(url) {
|
NAVCONTROL |
NAVCONTROL |
} |
} |
|
|
sub check_encrypt { |
|
my $str=shift; |
|
if ($ENV{'request.enc'}) { return &Apache::lonenc::encrypted($str); } |
|
return $str; |
|
} |
|
|
|
sub utilityfunctions { |
sub utilityfunctions { |
|
my $caller = shift; |
unless (($ENV{'browser.interface'} eq 'textual') || |
unless (($ENV{'browser.interface'} eq 'textual') || |
($ENV{'environment.remote'} eq 'off')) { return ''; } |
($ENV{'environment.remote'} eq 'off') || ($caller eq '/adm/menu')) { return ''; } |
my $currenturl=&check_encrypt($ENV{'request.noversionuri'}); |
my $currenturl=&Apache::lonenc::check_encrypt($ENV{'request.noversionuri'}); |
|
|
my $currentsymb=&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(); |
return (<<ENDUTILITY) |
return (<<ENDUTILITY) |
|
|
Line 1035 function gocstr(url,filename) {
|
Line 1027 function gocstr(url,filename) {
|
this.document.cstrdelete.submit(); |
this.document.cstrdelete.submit(); |
return; |
return; |
} |
} |
|
if (url == '/adm/printout') { |
|
this.document.cstrprint.postdata.value = filename |
|
this.document.cstrprint.curseed.value = 0; |
|
this.document.cstrprint.problemtype.value = 0; |
|
if (this.document.lonhomework) { |
|
if ((this.document.lonhomework.rndseed) && (this.document.lonhomework.rndseed.value != null) && (this.document.lonhomework.rndseed.value != '')) { |
|
this.document.cstrprint.curseed.value = this.document.lonhomework.rndseed.value |
|
} |
|
if (this.document.lonhomework.problemtype) { |
|
for (var i=0; i<this.document.lonhomework.problemtype.options.length; i++) { |
|
if (this.document.lonhomework.problemtype.options[i].selected) { |
|
if (this.document.lonhomework.problemtype.options[i].value != null && this.document.lonhomework.problemtype.options[i].value != '') { |
|
this.document.cstrprint.problemtype.value = this.document.lonhomework.problemtype.options[i].value |
|
} |
|
} |
|
} |
|
} |
|
} |
|
this.document.cstrprint.submit(); |
|
return; |
|
} |
if (url !='') { |
if (url !='') { |
this.document.constspace.filename.value = filename; |
this.document.constspace.filename.value = filename; |
this.document.constspace.action = url; |
this.document.constspace.action = url; |
Line 1042 function gocstr(url,filename) {
|
Line 1055 function gocstr(url,filename) {
|
} |
} |
} |
} |
|
|
|
function golist(url) { |
|
if (url!='' && url!= null) { |
|
currentURL = null; |
|
currentSymb= null; |
|
top.location.href=url; |
|
} |
|
} |
|
|
|
|
|
|
function catalog_info() { |
function catalog_info() { |
loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); |
loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); |
Line 1074 sub constspaceform {
|
Line 1096 sub constspaceform {
|
<input type="hidden" name="action" value="delete" /> |
<input type="hidden" name="action" value="delete" /> |
<input type="hidden" name="filename" value="" /> |
<input type="hidden" name="filename" value="" /> |
</form> |
</form> |
|
<form name="cstrprint" action="/adm/printout" target="_parent" method="post"> |
|
<input type="hidden" name="postdata" value="" /> |
|
<input type="hidden" name="curseed" value="" /> |
|
<input type="hidden" name="problemtype" value="" /> |
|
</form> |
|
|
ENDCONSTSPACEFORM |
ENDCONSTSPACEFORM |
} |
} |
|
|
Line 1097 sub handler {
|
Line 1125 sub handler {
|
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
my $form=&serverform(); |
my $form; |
|
if ($ENV{'environment.remote'} ne 'off' && |
|
$ENV{'browser.interface'} ne 'textual') { |
|
$form=&serverform(); |
|
} |
my $bodytag=&Apache::loncommon::bodytag('Main Menu'); |
my $bodytag=&Apache::loncommon::bodytag('Main Menu'); |
my $function='student'; |
my $function='student'; |
if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) { |
if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) { |
Line 1114 sub handler {
|
Line 1146 sub handler {
|
$pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain); |
$pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain); |
$tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); |
$tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); |
$font=&Apache::loncommon::designparm($function.'.font',$domain); |
$font=&Apache::loncommon::designparm($function.'.font',$domain); |
# ---- Print the screen, pretent to be in text mode to generate text-based menu |
my $script_tag; |
|
if ($ENV{'environment.remote'} eq 'on') { |
|
my $utility=&utilityfunctions('/adm/menu'); |
|
$script_tag=(<<ENDSCRIPT); |
|
<script type="text/javascript"> |
|
$utility |
|
</script> |
|
ENDSCRIPT |
|
} |
|
# ---- Print the screen, pretend to be in text mode to generate text-based menu |
unless ($ENV{'browser.interface'} eq 'textual') { |
unless ($ENV{'browser.interface'} eq 'textual') { |
$ENV{'browser.interface'}='faketextual'; |
$ENV{'browser.interface'}='faketextual'; |
$ENV{'environment.remote'}='off'; |
$ENV{'environment.remote'}='off'; |
Line 1122 sub handler {
|
Line 1163 sub handler {
|
$r->print(<<ENDHEADER); |
$r->print(<<ENDHEADER); |
<html><head> |
<html><head> |
<title>LON-CAPA Main Menu</title> |
<title>LON-CAPA Main Menu</title> |
|
$script_tag |
</head> |
</head> |
$bodytag |
$bodytag |
ENDHEADER |
ENDHEADER |