--- loncom/interface/lonmenu.pm 2010/01/15 04:05:21 1.309.2.11 +++ loncom/interface/lonmenu.pm 2010/09/03 19:20:47 1.309.2.15 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.309.2.11 2010/01/15 04:05:21 raeburn Exp $ +# $Id: lonmenu.pm,v 1.309.2.15 2010/09/03 19:20:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -131,6 +131,7 @@ use Apache::lonhtmlcommon(); use Apache::loncommon(); use Apache::lonenc(); use Apache::lonlocal; +use Apache::loncoursequeueadmin; use LONCAPA qw(:DEFAULT :match); use HTML::Entities(); @@ -286,11 +287,13 @@ sub gci_secondary_menu { my %courses = ( 'review' => 'gci_9615072b469884921gcil1', 'submit' => 'gci_1H96711d710194bfegcil1', + 'tutorial' => 'gci_5422913620b814c90gcil1', ); my %linktext = ( 'review' => 'Review Questions', 'submit' => 'Submit Questions', 'managetest' => 'Manage Tests', + 'tutorial' => 'Tutorials', ); my %links = ( 'managetest' => '/adm/menu', @@ -307,7 +310,7 @@ sub gci_secondary_menu { $links{'managetest'} = '/adm/roles?selectrole=1&cm=1&orgurl=%2fadm%2fmenu'; } } - my @menutabs = ('review','submit','managetest'); + my @menutabs = ('review','submit','managetest','tutorial'); my $tabs; foreach my $item (@menutabs) { if ($item eq $current) { @@ -1380,7 +1383,8 @@ sub inlinemenu { undef(@inlineremote); undef(%category_members); my $output; - if (($context eq 'gcicustom') || ($context eq 'gcistudent')) { + if (($context eq 'gcicustom') || ($context eq 'gcistudent') || + ($context eq 'gcinorole')) { $output=''. ''; } else { my $navtext = &mt('Table of Contents'); @@ -1419,6 +1424,16 @@ sub inlinemenu { } else { $output.='
'. '
'; } + if ($context eq 'gcinorole') { + my $queued = &Apache::loncoursequeueadmin::queued_selfenrollment('notitle'); + if ($queued) { + $output .= ''. + '
'. + '

'.&mt('Pending Enrollment Requests').'

'. + $queued. + '
'; + } + } $output.=''; } else { # calling rawconfig with "1" will evaluate mydesk.tab, @@ -1783,6 +1798,10 @@ function switchpage(caller) { if (caller == 'managetest') { document.location.href = '$managetesturl'; } + if (caller == 'tutorial') { + document.location.href = '/adm/roles?selectrole=1&st./gci/5422913620b814c90gcil1=1'; + } + return; }