version 1.187, 2006/06/28 20:56:00
|
version 1.203, 2006/08/14 09:11:55
|
Line 52 use vars qw(@desklines $readdesk);
|
Line 52 use vars qw(@desklines $readdesk);
|
|
|
my @inlineremote; |
my @inlineremote; |
|
|
|
|
|
|
# ================================================================ Little texts |
# ================================================================ Little texts |
|
|
sub initlittle { |
sub initlittle { |
Line 62 sub initlittle {
|
Line 64 sub initlittle {
|
'Roles':'Courses'), |
'Roles':'Courses'), |
'docs' => 'Course Documents', |
'docs' => 'Course Documents', |
'exit' => 'Exit', |
'exit' => 'Exit', |
|
'login' => 'Log In', |
'launch' => 'Launch Remote Control', |
'launch' => 'Launch Remote Control', |
'groups' => 'Course Groups', |
'groups' => 'Groups', |
'gdoc' => 'Group Documents', |
'gdoc' => 'Group Documents', |
'teams' => 'Teams', |
|
); |
); |
} |
} |
|
|
Line 91 sub menubuttons {
|
Line 93 sub menubuttons {
|
my $escurl=&escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'})); |
my $escurl=&escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'})); |
my $escsymb=&escape(&Apache::lonenc::check_encrypt($env{'request.symb'})); |
my $escsymb=&escape(&Apache::lonenc::check_encrypt($env{'request.symb'})); |
|
|
|
my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); |
|
$logo = '<td class="LC_top_nav_logo"><a href="/adm/about.html"><img src="'. |
|
$logo.'" alt="LON-CAPA Logo" /></a></td>'; |
|
|
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 100 sub menubuttons {
|
Line 106 sub menubuttons {
|
} |
} |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
my %coursegroups; |
my %coursegroups; |
my $viewgrps_permission = |
my $viewgrps_permission = |
&Apache::lonnet::allowed('vcg',$env{'request.course.id'}); |
&Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); |
if (!$viewgrps_permission) { |
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'}); |
%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)) { |
if ((keys(%coursegroups) > 0) || ($viewgrps_permission)) { |
$showgroups = 1; |
$showgroups = 1; |
} |
} |
Line 131 ENDDOCS
|
Line 137 ENDDOCS
|
} |
} |
if ($showgroups) { |
if ($showgroups) { |
$groups =(<<ENDGROUPS); |
$groups =(<<ENDGROUPS); |
<a href="/adm/coursegroups" target="_top">$lt{'groups'}</a></td> |
<a href="/adm/coursegroups" target="_top">$lt{'groups'}</a> |
ENDGROUPS |
ENDGROUPS |
} |
} |
} |
} |
Line 168 ENDMAINMENU
|
Line 174 ENDMAINMENU
|
my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain); |
my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain); |
my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain); |
my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain); |
if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') { |
if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') { |
my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); |
|
return (<<ENDINLINEMENU); |
return (<<ENDINLINEMENU); |
<table id="LC_top_nav"> |
<table id="LC_top_nav"> |
<tr> |
<tr> |
<td> |
$logo |
<a href="/adm/logout" target="_top">$lt{'exit'}</a> |
<td></td> |
|
<td class="LC_top_nav_login"> |
|
<a href="/adm/roles" target="_top">$lt{'login'}</a> |
</td> |
</td> |
<td "LC_top_nav_logo"> |
</tr> |
<img align="right" src="$logo" alt="Logo" /> |
|
<b>LON-CAPA</b> |
|
</td> |
|
</tr> |
|
</table> |
</table> |
</font> |
</font> |
ENDINLINEMENU |
ENDINLINEMENU |
Line 202 my $is_group = (&Apache::loncommon::cour
|
Line 205 my $is_group = (&Apache::loncommon::cour
|
ENDDOCS |
ENDDOCS |
} |
} |
if ($showgroups) { |
if ($showgroups) { |
my $text = ($is_group) ? $lt{'teams'} : $lt{'groups'}; |
|
$groups =(<<ENDGROUPS); |
$groups =(<<ENDGROUPS); |
<td><a href="/adm/coursegroups" target="_top">$text</a></td> |
<td><a href="/adm/coursegroups" target="_top">$lt{'groups'}</a></td> |
ENDGROUPS |
ENDGROUPS |
} |
} |
if ( |
if ( |
Line 235 ENDCRELOAD
|
Line 237 ENDCRELOAD
|
} |
} |
my $form=&serverform(); |
my $form=&serverform(); |
my $utility=&utilityfunctions(); |
my $utility=&utilityfunctions(); |
my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); |
|
my $remote; |
my $remote; |
if ($env{'user.adv'}) { |
if ($env{'user.adv'}) { |
$remote = '<td><a href="/adm/remote?action=launch&url='.$escurl.'" target="_top">'.$lt{'launch'}.'</a></td>' |
$remote = '<td><a href="/adm/remote?action=launch&url='.$escurl.'" target="_top">'.$lt{'launch'}.'</a></td>' |
} |
} |
|
|
|
my $helplink=&Apache::loncommon::top_nav_help('Help'); |
return (<<ENDINLINEMENU); |
return (<<ENDINLINEMENU); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
Line 249 $utility
|
Line 252 $utility
|
</script> |
</script> |
<table id="LC_top_nav"> |
<table id="LC_top_nav"> |
<tr> |
<tr> |
|
$logo |
<td><a href="/adm/menu" target="_top">$lt{'main'}</a></td> |
<td><a href="/adm/menu" target="_top">$lt{'main'}</a></td> |
$reloadlink |
$reloadlink |
$navmaps |
$navmaps |
Line 256 $docs
|
Line 260 $docs
|
$groups |
$groups |
$remote |
$remote |
<td><a href="/adm/roles" target="_top">$lt{'roles'}</a></td> |
<td><a href="/adm/roles" target="_top">$lt{'roles'}</a></td> |
<td><a href="/adm/logout" target="_top">$lt{'exit'}</a></td> |
<td class="LC_top_nav_help">$helplink</td> |
<td class="LC_top_nav_logo"><img align="right" src="$logo" alt="Logo" /><b>LON-CAPA</b></td> |
<td class="LC_top_nav_exit"><a href="/adm/logout" target="_top">$lt{'exit'}</a></td> |
</tr> |
</tr> |
</table> |
</table> |
$form |
$form |
Line 386 sub innerregister {
|
Line 390 sub innerregister {
|
&Apache::lonnet::allowed('opa',$crs)) { |
&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 parameter settings for this resource'); |
} |
} |
# -- End Homework |
# -- End Homework |
### |
### |
Line 445 sub innerregister {
|
Line 449 sub innerregister {
|
('','',6,1,'cstr.gif','edit[_1]','resource[_2]', |
('','',6,1,'cstr.gif','edit[_1]','resource[_2]', |
"go('".$cfile."');","Edit this resource"); |
"go('".$cfile."');","Edit this resource"); |
} elsif ($editbutton eq '') { |
} elsif ($editbutton eq '') { |
$editbutton=&switch('','',6,1,'port.gif', |
$editbutton=&clear(6,1); |
'port-[_1]','folio[_1]', |
|
"go('/adm/portfolio');", |
|
"Enter my portfolio space"); |
|
} |
} |
} |
} |
### |
### |
Line 463 sub innerregister {
|
Line 464 sub innerregister {
|
$is_const_dir = 1; |
$is_const_dir = 1; |
} else { |
} else { |
$currdir =~ s#[^/]+$##; |
$currdir =~ s#[^/]+$##; |
|
my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn); |
$menuitems=(<<ENDMENUITEMS); |
$menuitems=(<<ENDMENUITEMS); |
s&6&1&list.gif&list[_1]&dir[_1]&golist('$currdir')&List current directory |
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&2&rtrv.gif&retrieve[_1]&version[_1]&gocstr('/adm/retrieve','/~$uname/$cleandisfn')&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/$cleandisfn')&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/$cleandisfn')&Delete this resource |
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/$cleandisfn')&Prepare a printable document |
ENDMENUITEMS |
ENDMENUITEMS |
} |
} |
} elsif (defined($env{'request.course.id'}) && |
} elsif ( defined($env{'request.course.id'}) && |
$env{'request.symb'} ne '') { |
$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 492 s&8&2&fdbk.gif&feedback[_1]&discuss[_1]&
|
Line 494 s&8&2&fdbk.gif&feedback[_1]&discuss[_1]&
|
ENDREALRES |
ENDREALRES |
} |
} |
} |
} |
|
if ($env{'request.uri'} =~ /^\/res/) { |
|
$menuitems .= (<<ENDMENUITEMS); |
|
s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document |
|
ENDMENUITEMS |
|
} |
|
&Apache::lonnet::logthis("Menu items:\n$menuitems\n"); |
my $buttons=''; |
my $buttons=''; |
foreach (split(/\n/,$menuitems)) { |
foreach (split(/\n/,$menuitems)) { |
my ($command,@rest)=split(/\&/,$_); |
my ($command,@rest)=split(/\&/,$_); |
Line 501 ENDREALRES
|
Line 509 ENDREALRES
|
$buttons.=&clear(@rest); |
$buttons.=&clear(@rest); |
} |
} |
} |
} |
|
&Apache::lonnet::logthis("buttons = $buttons"); |
|
|
if ($textual) { |
if ($textual) { |
my $addremote=0; |
my $addremote=0; |
Line 522 ENDREALRES
|
Line 531 ENDREALRES
|
ENDINLINE |
ENDINLINE |
} |
} |
} |
} |
|
&Apache::lonnet::logthis("Inline:\n $inlinebuttons \n"); |
$result =(<<ENDREGTEXT); |
$result =(<<ENDREGTEXT); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
Line 780 ENDRESIZE
|
Line 790 ENDRESIZE
|
$returnval.=(<<ENDOPEN); |
$returnval.=(<<ENDOPEN); |
window.status='Opening LON-CAPA Remote Control'; |
window.status='Opening LON-CAPA Remote Control'; |
var menu=window.open("/res/adm/pages/menu.html","$menuname", |
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"); |
"height=375,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5"); |
self.name='loncapaclient'; |
self.name='loncapaclient'; |
ENDOPEN |
ENDOPEN |
return '<script type="text/javascript">'.$returnval.'</script>'; |
return '<script type="text/javascript">'.$returnval.'</script>'; |