version 1.244.2.3, 2009/08/13 13:52:01
|
version 1.244.2.8, 2010/01/18 20:28:20
|
Line 144 use Apache::loncommon();
|
Line 144 use Apache::loncommon();
|
use Apache::lonenc(); |
use Apache::lonenc(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
use HTML::Entities(); |
|
|
use vars qw(@desklines %category_names %category_members %category_positions $readdesk); |
use vars qw(@desklines %category_names %category_members %category_positions $readdesk); |
|
|
Line 647 if(length($annotation) > 0){
|
Line 648 if(length($annotation) > 0){
|
$menuitems.="&anno-[_1]&tations[_1]&annotate()&"; |
$menuitems.="&anno-[_1]&tations[_1]&annotate()&"; |
$menuitems.="Make notes and annotations about this resource&&1\n"; |
$menuitems.="Make notes and annotations about this resource&&1\n"; |
|
|
|
unless ($noremote) { |
|
my $showreqcrs = &check_for_rcrs(); |
|
if ($showreqcrs) { |
|
$menuitems.="s&8&1&rcrs.gif&request[_1]&course[_16]". |
|
"&go('/adm/requestcourse')&Course requests\n"; |
|
} |
|
} |
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) { |
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) { |
if (!$env{'request.enc'}) { |
if (!$env{'request.enc'}) { |
$menuitems.=(<<ENDREALRES); |
$menuitems.=(<<ENDREALRES); |
Line 1021 sub open {
|
Line 1029 sub open {
|
($env{'environment.remote'} eq 'off')) { |
($env{'environment.remote'} eq 'off')) { |
return |
return |
'<script type="text/javascript">'."\n". |
'<script type="text/javascript">'."\n". |
'// <![CDATA['."\n" |
'// <![CDATA['."\n". |
'self.name="loncapaclient";'."\n". |
'self.name="loncapaclient";'."\n". |
'// ]]>'."\n" |
'// ]]>'."\n". |
'</script>'; |
'</script>'; |
} |
} |
my $menuname = &get_menu_name(); |
my $menuname = &get_menu_name(); |
Line 1186 sub inlinemenu {
|
Line 1194 sub inlinemenu {
|
} |
} |
foreach my $item (sort(keys(%active))) { |
foreach my $item (sort(keys(%active))) { |
$output.=$inlineremote[$item]; |
$output.=$inlineremote[$item]; |
&Apache::lonnet::logthis("item=$item output=$inlineremote[$item]"); |
|
} |
} |
$output.='</table>'; |
$output.='</table>'; |
$output.='</fieldset>'; |
$output.='</fieldset>'; |
Line 1315 sub rawconfig {
|
Line 1322 sub rawconfig {
|
$output.=&clear($row,$col); |
$output.=&clear($row,$col); |
next; |
next; |
} |
} |
} elsif ($prt eq 'reqcrs') { |
} elsif (($prt eq 'reqcrsnsc') || ($prt eq 'reqcrsshc')) { |
my $showreqcrs = 0; |
if (($prt eq 'reqcrsnsc') && ($show_course)) { |
foreach my $type ('official','unofficial') { |
next; |
if (&Apache::lonnet::usertools_access($env{'user.name'}, |
} |
$env{'user.domain'}, |
if (($prt eq 'reqcrsshc') && (!$show_course)) { |
$type,undef,'requestcourses')) { |
next; |
$showreqcrs = 1; |
|
last; |
|
} |
|
} |
} |
|
my $showreqcrs = &check_for_rcrs(); |
if (!$showreqcrs) { |
if (!$showreqcrs) { |
$output.=&clear($row,$col); |
$output.=&clear($row,$col); |
next; |
next; |
Line 1347 sub rawconfig {
|
Line 1352 sub rawconfig {
|
return $output; |
return $output; |
} |
} |
|
|
|
sub check_for_rcrs { |
|
my $showreqcrs = 0; |
|
my @reqtypes = ('official','unofficial','community'); |
|
foreach my $type (@reqtypes) { |
|
if (&Apache::lonnet::usertools_access($env{'user.name'}, |
|
$env{'user.domain'}, |
|
$type,undef,'requestcourses')) { |
|
$showreqcrs = 1; |
|
last; |
|
} |
|
} |
|
if (!$showreqcrs) { |
|
foreach my $type (@reqtypes) { |
|
if ($env{'environment.reqcrsotherdom.'.$type} ne '') { |
|
$showreqcrs = 1; |
|
last; |
|
} |
|
} |
|
} |
|
return $showreqcrs; |
|
} |
|
|
# ======================================================================= Close |
# ======================================================================= Close |
|
|
sub close { |
sub close { |
Line 1703 sub roles_selector {
|
Line 1730 sub roles_selector {
|
} |
} |
$role_selector .= '</select>'."\n". |
$role_selector .= '</select>'."\n". |
'<input type="hidden" name="destinationurl" value="'. |
'<input type="hidden" name="destinationurl" value="'. |
$ENV{'REQUEST_URI'}.'" />'."\n". |
&HTML::Entities::encode($ENV{'REQUEST_URI'},'"<>&').'" />'."\n". |
'<input type="hidden" name="gotorole" value="1" />'."\n". |
'<input type="hidden" name="gotorole" value="1" />'."\n". |
'<input type="hidden" name="selectrole" value="" />'."\n". |
'<input type="hidden" name="selectrole" value="" />'."\n". |
'<input type="hidden" name="switch" value="1" />'."\n". |
'<input type="hidden" name="switch" value="1" />'."\n". |