version 1.156, 2005/07/05 21:30:14
|
version 1.165, 2006/02/21 20:14:49
|
Line 64 sub initlittle {
|
Line 64 sub initlittle {
|
'Roles':'Courses'), |
'Roles':'Courses'), |
'docs' => 'Course Documents', |
'docs' => 'Course Documents', |
'exit' => 'Exit', |
'exit' => 'Exit', |
'launch' => 'Launch Remote Control'); |
'launch' => 'Launch Remote Control', |
|
'groups' => 'Groups'); |
} |
} |
|
|
# ============================= This gets called at the top of the body section |
# ============================= This gets called at the top of the body section |
Line 78 sub menubuttons {
|
Line 79 sub menubuttons {
|
['inhibitmenu']); |
['inhibitmenu']); |
if (($env{'form.inhibitmenu'} eq 'yes') || |
if (($env{'form.inhibitmenu'} eq 'yes') || |
($ENV{'REQUEST_URI'} eq '/adm/logout')) { return ''; } |
($ENV{'REQUEST_URI'} eq '/adm/logout')) { return ''; } |
|
my %lt=&initlittle(); |
my $navmaps=''; |
my $navmaps=''; |
my $reloadlink=''; |
my $reloadlink=''; |
my $docs=''; |
my $docs=''; |
|
my $groups=''; |
|
my $showgroups=0; |
my $escurl=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'})); |
my $escurl=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'})); |
my $escsymb=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.symb'})); |
my $escsymb=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.symb'})); |
|
my $face= 'face="Arial,Helvetica,sans-serif"'; |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) { |
if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) { |
my $returnurl = $env{'request.filename'}; |
my $returnurl = $env{'request.filename'}; |
Line 91 sub menubuttons {
|
Line 95 sub menubuttons {
|
$escurl = &Apache::lonnet::escape($returnurl); |
$escurl = &Apache::lonnet::escape($returnurl); |
} |
} |
} |
} |
|
if ($env{'request.course.id'}) { |
|
my %coursegroups; |
|
my $viewgrps_permission = |
|
&Apache::lonnet::allowed('vcg',$env{'request.course.id'}); |
|
if (!$viewgrps_permission) { |
|
%coursegroups = &Apache::lonnet::get_active_groups($env{'user.domain'},$env{'user.name'},$env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); |
|
} |
|
if ((keys(%coursegroups) > 0) || ($viewgrps_permission)) { |
|
$showgroups = 1; |
|
} |
|
} |
|
|
if ($env{'browser.interface'} eq 'textual') { |
if ($env{'browser.interface'} eq 'textual') { |
# Textual display only |
# Textual display only |
my %lt=&initlittle(); |
|
$pgbg='#FFFFFF'; |
$pgbg='#FFFFFF'; |
$tabbg='#FFFFFF'; |
$tabbg='#FFFFFF'; |
$font='#000000'; |
$font='#000000'; |
Line 106 ENDNAV
|
Line 121 ENDNAV
|
($env{'request.noversionuri'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) { |
($env{'request.noversionuri'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) { |
my $escreload=&Apache::lonnet::escape('return:'); |
my $escreload=&Apache::lonnet::escape('return:'); |
$reloadlink=(<<ENDRELOAD); |
$reloadlink=(<<ENDRELOAD); |
<a href="/adm/flip?postdata=$escreload" target="_top"><font color="$font">$lt{'ret'}</font></a> |
<a href="/adm/flip?postdata=$escreload" target="_top"><font $face color="$font">$lt{'ret'}</font></a> |
ENDRELOAD |
ENDRELOAD |
} |
} |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
$docs=(<<ENDDOCS); |
$docs=(<<ENDDOCS); |
<a href="/adm/coursedocs" target="_top"><font color="$font">$lt{'docs'}</font></a> |
<a href="/adm/coursedocs" target="_top"><font $face color="$font">$lt{'docs'}</font></a> |
ENDDOCS |
ENDDOCS |
} |
} |
|
if ($showgroups) { |
|
$groups =(<<ENDGROUPS); |
|
<td bgcolor="$tabbg"> |
|
<a href="/adm/coursegroups" target="_top"><font $face color="$font">$lt{'groups'}</font></a></td> |
|
ENDGROUPS |
|
} |
} |
} |
my $form=&serverform(); |
my $form=&serverform(); |
my $utility=&utilityfunctions(); |
my $utility=&utilityfunctions(); |
Line 123 ENDDOCS
|
Line 144 ENDDOCS
|
$utility |
$utility |
</script> |
</script> |
<a href="/adm/menu" target="_top">$lt{'main'}</a> |
<a href="/adm/menu" target="_top">$lt{'main'}</a> |
$reloadlink $navmaps $docs |
$reloadlink $navmaps $docs $groups |
<a href="/adm/roles" target="_top"><font color="$font">$lt{'roles'}</font></a> |
<a href="/adm/roles" target="_top"><font $face color="$font">$lt{'roles'}</font></a> |
<a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a> |
<a href="/adm/logout" target="_top"><font $face color="$font">$lt{'exit'}</font></a> |
<br /> |
<br /> |
<script type="text/javascript"> |
<script type="text/javascript"> |
// END LON-CAPA Internal |
// END LON-CAPA Internal |
Line 167 ENDMAINMENU
|
Line 188 ENDMAINMENU
|
<a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a> |
<a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a> |
</td> |
</td> |
<td align="right" bgcolor="$tabbg"> |
<td align="right" bgcolor="$tabbg"> |
<img align="right" src="$logo" /> |
<img align="right" src="$logo" alt="Logo" /> |
<b>LON-CAPA</b> |
<b>LON-CAPA</b> |
</td> |
</td> |
</tr> |
</tr> |
Line 184 ENDINLINEMENU
|
Line 205 ENDINLINEMENU
|
} |
} |
$navmaps=(<<ENDNAV); |
$navmaps=(<<ENDNAV); |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="$link"><font color="$font">$lt{'nav'}</font></a></td> |
<a href="$link" target="_top"><font $face color="$font">$lt{'nav'}</font></a></td> |
ENDNAV |
ENDNAV |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
$docs=(<<ENDDOCS); |
$docs=(<<ENDDOCS); |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="/adm/coursedocs"><font color="$font">$lt{'docs'}</font></a></td> |
<a href="/adm/coursedocs" target="_top"><font $face color="$font">$lt{'docs'}</font></a></td> |
ENDDOCS |
ENDDOCS |
} |
} |
|
if ($showgroups) { |
|
$groups =(<<ENDGROUPS); |
|
<td bgcolor="$tabbg"> |
|
<a href="/adm/coursegroups" target="_top"><font $face color="$font">$lt{'groups'}</font></a></td> |
|
ENDGROUPS |
|
} |
if ( |
if ( |
($env{'request.noversionuri'}=~m[^/(res|public)/] && |
($env{'request.noversionuri'}=~m[^/(res|public)/] && |
$env{'request.symb'} eq '') |
$env{'request.symb'} eq '') |
Line 205 ENDDOCS
|
Line 232 ENDDOCS
|
my $escreload=&Apache::lonnet::escape('return:'); |
my $escreload=&Apache::lonnet::escape('return:'); |
$reloadlink=(<<ENDRELOAD); |
$reloadlink=(<<ENDRELOAD); |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="/adm/flip?postdata=$escreload" target="_top"><font color="$font">$lt{'ret'}</font></a></td> |
<a href="/adm/flip?postdata=$escreload" target="_top"><font $face color="$font">$lt{'ret'}</font></a></td> |
ENDRELOAD |
ENDRELOAD |
} |
} |
} |
} |
|
if (($env{'request.state'} eq 'construct') && ($env{'request.course.id'})) { |
|
my $escreload=&Apache::lonnet::escape('return:'); |
|
$reloadlink=(<<ENDCRELOAD); |
|
<td bgcolor="$tabbg"> |
|
<a href="/adm/flip?postdata=$escreload" target="_top"><font $face color="$font">$lt{'ret'}</font></a></td> |
|
ENDCRELOAD |
|
} |
my $reg=''; |
my $reg=''; |
if ($registration) { |
if ($registration) { |
$reg=&innerregister($forcereg,$target,$titletable); |
$reg=&innerregister($forcereg,$target,$titletable); |
Line 216 ENDRELOAD
|
Line 250 ENDRELOAD
|
my $form=&serverform(); |
my $form=&serverform(); |
my $utility=&utilityfunctions(); |
my $utility=&utilityfunctions(); |
my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); |
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 |
Line 223 ENDRELOAD
|
Line 258 ENDRELOAD
|
$utility |
$utility |
// ]]> |
// ]]> |
</script> |
</script> |
<font face="Arial,Helvetica,sans-serif"><table bgcolor="$pgbg" width="100%" border="0" cellpadding="1" cellspacing="1"> |
<table bgcolor="$pgbg" width="100%" border="0" cellpadding="1" cellspacing="1"> |
<tr> |
<tr> |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="/adm/menu" target="_top"><font color="$font">$lt{'main'}</font></a> |
<a href="/adm/menu" target="_top"><font $face color="$font">$lt{'main'}</font></a> |
</td> |
</td> |
$reloadlink |
$reloadlink |
$navmaps |
$navmaps |
$docs |
$docs |
|
$groups |
<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 $face color="$font">$lt{'launch'}</font></a></td> |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="/adm/roles" target="_top"><font color="$font">$lt{'roles'}</font></a> |
<a href="/adm/roles" target="_top"><font $face color="$font">$lt{'roles'}</font></a> |
</td> |
</td> |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a> |
<a href="/adm/logout" target="_top"><font $face color="$font">$lt{'exit'}</font></a> |
</td> |
</td> |
<td bgcolor="$tabbg"> |
<td bgcolor="$tabbg"> |
<img align="right" src="$logo" /> |
<img align="right" src="$logo" alt="Logo" /> |
<b>LON-CAPA</b></td> |
<b>LON-CAPA</b></td> |
$form |
$form |
</tr> |
</tr> |
</table> |
</table> |
</font> |
|
<script type="text/javascript"> |
<script type="text/javascript"> |
// END LON-CAPA Internal |
// END LON-CAPA Internal |
</script> |
</script> |
Line 319 sub innerregister {
|
Line 354 sub innerregister {
|
|
|
my $newmail=''; |
my $newmail=''; |
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='<table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td bgcolor="'.$tabbg.'"><font face="Arial,Helvetica,sans-serif">'; |
} |
} |
if (($textual) && ($env{'request.symb'}) && ($env{'request.course.id'})) { |
if (($textual) && ($env{'request.symb'}) && ($env{'request.course.id'})) { |
my ($mapurl,$rid,$resurl)= |
my ($mapurl,$rid,$resurl)= |
Line 344 sub innerregister {
|
Line 379 sub innerregister {
|
$newmail = $titletable; |
$newmail = $titletable; |
} else { |
} else { |
if ($noremote) { |
if ($noremote) { |
$newmail.='</td></tr></table></font>'; |
$newmail.='</font></td></tr></table>'; |
} |
} |
} |
} |
my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');'); |
my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');'); |
Line 362 sub innerregister {
|
Line 397 sub innerregister {
|
|
|
my $hwkadd=''; |
my $hwkadd=''; |
if ($env{'request.symb'} ne '' && |
if ($env{'request.symb'} ne '' && |
$env{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { |
$env{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form|task)$/) { |
if (&Apache::lonnet::allowed('mgr',$crs)) { |
if (&Apache::lonnet::allowed('mgr',$crs)) { |
$hwkadd.=&switch('','',7,2,'pgrd.gif','problem[_1]','grades[_3]', |
$hwkadd.=&switch('','',7,2,'pgrd.gif','problem[_1]','grades[_3]', |
"gocmd('/adm/grades','gradingmenu')", |
"gocmd('/adm/grades','gradingmenu')", |
Line 1101 function gocstr(url,filename) {
|
Line 1136 function gocstr(url,filename) {
|
this.document.cstrprint.curseed.value = this.document.lonhomework.rndseed.value |
this.document.cstrprint.curseed.value = this.document.lonhomework.rndseed.value |
} |
} |
if (this.document.lonhomework.problemtype) { |
if (this.document.lonhomework.problemtype) { |
for (var i=0; i<this.document.lonhomework.problemtype.options.length; i++) { |
if (this.document.lonhomework.problemtype.value) { |
if (this.document.lonhomework.problemtype.options[i].selected) { |
this.document.cstrprint.problemtype.value = |
if (this.document.lonhomework.problemtype.options[i].value != null && this.document.lonhomework.problemtype.options[i].value != '') { |
this.document.lonhomework.problemtype.value; |
this.document.cstrprint.problemtype.value = this.document.lonhomework.problemtype.options[i].value |
} else if (this.document.lonhomework.problemtype.options) { |
} |
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(); |
this.document.cstrprint.submit(); |
return; |
return; |
} |
} |
Line 1142 ENDUTILITY
|
Line 1182 ENDUTILITY
|
|
|
sub serverform { |
sub serverform { |
return(<<ENDSERVERFORM); |
return(<<ENDSERVERFORM); |
|
|
<form name="server" action="/adm/logout" method="post" target="_top"> |
<form name="server" action="/adm/logout" method="post" target="_top"> |
<input type="hidden" name="postdata" value="none" /> |
<input type="hidden" name="postdata" value="none" /> |
<input type="hidden" name="command" value="none" /> |
<input type="hidden" name="command" value="none" /> |
Line 1186 sub get_nav_status {
|
Line 1225 sub get_nav_status {
|
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
|
&Apache::loncommon::no_cache($r); |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |