version 1.184, 2006/05/30 20:09:25
|
version 1.197, 2006/07/18 19:45:15
|
Line 63 sub initlittle {
|
Line 63 sub initlittle {
|
'docs' => 'Course Documents', |
'docs' => 'Course Documents', |
'exit' => 'Exit', |
'exit' => 'Exit', |
'launch' => 'Launch Remote Control', |
'launch' => 'Launch Remote Control', |
'groups' => 'Course Groups', |
'groups' => 'Groups', |
'gdoc' => 'Group Documents', |
'gdoc' => 'Group Documents', |
'teams' => 'Teams', |
|
); |
); |
} |
} |
|
|
Line 100 sub menubuttons {
|
Line 99 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 130 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 175 ENDMAINMENU
|
Line 174 ENDMAINMENU
|
<td> |
<td> |
<a href="/adm/logout" target="_top">$lt{'exit'}</a> |
<a href="/adm/logout" target="_top">$lt{'exit'}</a> |
</td> |
</td> |
<td align="right"> |
<td class="LC_top_nav_logo">LON-CAPA<img src="$logo" alt="Logo" /></td> |
<img align="right" src="$logo" alt="Logo" /> |
</tr> |
<b>LON-CAPA</b> |
|
</td> |
|
</tr> |
|
</table> |
</table> |
</font> |
</font> |
ENDINLINEMENU |
ENDINLINEMENU |
Line 194 ENDINLINEMENU
|
Line 190 ENDINLINEMENU
|
$navmaps=(<<ENDNAV); |
$navmaps=(<<ENDNAV); |
<td><a href="$link" target="_top">$lt{'nav'}</a></td> |
<td><a href="$link" target="_top">$lt{'nav'}</a></td> |
ENDNAV |
ENDNAV |
|
my $is_group = (&Apache::loncommon::course_type() eq 'Group'); |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
my $text = $lt{'docs'}; |
my $text = ($is_group) ? $lt{'gdoc'} : $lt{'docs'}; |
if ($env{'course.'.$env{'request.course.id'}.'.type'} eq |
|
'Group') { |
|
$text = $lt{'gdoc'}; |
|
} |
|
$docs=(<<ENDDOCS); |
$docs=(<<ENDDOCS); |
<td><a href="/adm/coursedocs" target="_top">$text</a></td> |
<td><a href="/adm/coursedocs" target="_top">$text</a></td> |
ENDDOCS |
ENDDOCS |
} |
} |
if ($showgroups) { |
if ($showgroups) { |
my $text = $lt{'groups'}; |
|
if ($env{'course.'.$env{'request.course.id'}.'.type'} eq |
|
'Group') { |
|
$text = $lt{'teams'}; |
|
} |
|
$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 247 ENDCRELOAD
|
Line 235 ENDCRELOAD
|
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 $helptopic='Student_Intro'; |
|
if ($env{'request.role'}=~/^(ca|au)/) { |
|
$helptopic='Authoring_Intro'; |
|
} elsif ($env{'request.role'}=~/^cc/) { |
|
$helptopic='Course_Coordination_Intro'; |
|
} |
|
my $helplink=&Apache::loncommon::help_open_topic($helptopic,'Help'); |
return (<<ENDINLINEMENU); |
return (<<ENDINLINEMENU); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// BEGIN LON-CAPA Internal |
// BEGIN LON-CAPA Internal |
Line 256 $utility
|
Line 251 $utility
|
</script> |
</script> |
<table id="LC_top_nav"> |
<table id="LC_top_nav"> |
<tr> |
<tr> |
|
<td class="LC_top_nav_logo"> |
|
<a href="/adm/about.html"><img src="$logo" alt="LON-CAPA Logo" align="left" border="0" /></a></td> |
<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 263 $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>$helplink</td> |
<td class="LC_top_nav_logo"><img align="right" src="$logo" alt="Logo" /><b>LON-CAPA</b></td> |
<td class="LC_top_logout"><a href="/adm/logout" target="_top">$lt{'exit'}</a></td> |
</tr> |
</tr> |
</table> |
</table> |
$form |
$form |
Line 393 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 452 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 787 ENDRESIZE
|
Line 781 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>'; |
Line 940 sub rawconfig {
|
Line 934 sub rawconfig {
|
$prt=~s/\$udom/$udom/g; |
$prt=~s/\$udom/$udom/g; |
$prt=~s/\$crs/$crs/g; |
$prt=~s/\$crs/$crs/g; |
$prt=~s/\$requested_domain/$requested_domain/g; |
$prt=~s/\$requested_domain/$requested_domain/g; |
my $type = $env{'course.'.$env{'request.course.id'}.'.type'}; |
my $type = &Apache::loncommon::course_type(); |
if ($type eq 'Group') { |
if ($type eq 'Group') { |
$desc = &convert_menu_function($desc,$type); |
$desc = &convert_menu_function($desc,$type); |
} |
} |
Line 1272 sub get_nav_status {
|
Line 1266 sub get_nav_status {
|
return $navstatus; |
return $navstatus; |
} |
} |
|
|
|
#FIXME this needs to move into mydesktab and the other locations |
|
# the text is generated |
sub convert_menu_function { |
sub convert_menu_function { |
my ($rolename,$type) = @_; |
my ($rolename,$type) = @_; |
if ($type eq 'Group') { |
if ($type eq 'Group') { |