version 1.309.2.1, 2009/12/07 20:04:18
|
version 1.309.2.18, 2010/11/08 22:51:23
|
Line 131 use Apache::lonhtmlcommon();
|
Line 131 use Apache::lonhtmlcommon();
|
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonenc(); |
use Apache::lonenc(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::loncoursequeueadmin; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
use HTML::Entities(); |
use HTML::Entities(); |
|
|
Line 150 sub prep_menuitem {
|
Line 151 sub prep_menuitem {
|
} else { # textual Link |
} else { # textual Link |
$link = &mt($$menuitem[3]); |
$link = &mt($$menuitem[3]); |
} |
} |
|
if($$menuitem[4] eq 'newmsg'){ #special style for New Messages |
|
return '<li><a href="'.$$menuitem[0].'"><span class="LC_new_message">'.$link.'</span></a></li>'; |
|
} |
return '<li><a href="'.$$menuitem[0].'">'.$link.'</a></li>'; |
return '<li><a href="'.$$menuitem[0].'">'.$link.'</a></li>'; |
} |
} |
|
|
Line 161 sub prep_menuitem {
|
Line 165 sub prep_menuitem {
|
sub primary_menu { |
sub primary_menu { |
my $menu; |
my $menu; |
my $custommenu = &Apache::loncommon::needs_gci_custom(); |
my $custommenu = &Apache::loncommon::needs_gci_custom(); |
|
my $numdc = &Apache::loncommon::check_for_gci_dc(); |
# each element of @primary contains following array: |
# each element of @primary contains following array: |
# (link url, icon path, alt text, link text, condition) |
# (link url, icon path, alt text, link text, condition) |
foreach my $menuitem (@primary_menu) { |
foreach my $menuitem (@primary_menu) { |
Line 176 sub primary_menu {
|
Line 181 sub primary_menu {
|
next if $$menuitem[4] eq 'onlypublic'# hide links which are |
next if $$menuitem[4] eq 'onlypublic'# hide links which are |
&& $env{'user.name'} ne 'public' # only visible to public |
&& $env{'user.name'} ne 'public' # only visible to public |
&& $env{'user.domain'} ne 'public'; # users |
&& $env{'user.domain'} ne 'public'; # users |
|
next if $$menuitem[4] eq 'gci' |
|
&& (!$custommenu || $env{'request.role'} =~ m{^st\./gcitest/}); |
|
next if $$menuitem[4] eq 'home' |
|
&& (($custommenu) || ($env{'user.domain'} eq 'gcitest') || |
|
(($env{'user.domain'} eq 'gci') && !$numdc)); |
|
next if $$menuitem[4] eq 'gcitest' |
|
&& (($env{'user.domain'} eq 'gci') || ($env{'request.role'} eq 'cm')); |
next if $$menuitem[4] eq 'roles' # hide links which are |
next if $$menuitem[4] eq 'roles' # hide links which are |
&& $custommenu; # not visible when GCI |
&& $custommenu; # not visible when GCI |
next if $$menuitem[4] eq 'courses' # tabbed interface in use |
next if $$menuitem[4] eq 'courses' # tabbed interface in use |
Line 212 sub secondary_menu {
|
Line 224 sub secondary_menu {
|
$env{'user.domain'}, $env{'user.name'}, |
$env{'user.domain'}, $env{'user.name'}, |
$env{'course.' . $env{'request.course.id'} . '.domain'}, |
$env{'course.' . $env{'request.course.id'} . '.domain'}, |
$env{'course.' . $env{'request.course.id'} . '.num'}); |
$env{'course.' . $env{'request.course.id'} . '.num'}); |
|
my $custommenu = &Apache::loncommon::needs_gci_custom(); |
|
my $numdc = &Apache::loncommon::check_for_gci_dc(); |
|
my $role = $env{'request.role'}; |
foreach my $menuitem (@secondary_menu) { |
foreach my $menuitem (@secondary_menu) { |
# evaluate conditions |
# evaluate conditions |
next if ref($menuitem) ne 'ARRAY'; |
next if ref($menuitem) ne 'ARRAY'; |
next if $$menuitem[4] ne 'always' |
next if $$menuitem[4] eq 'showmenu' |
|
&& ($custommenu || (!$numdc && $role eq 'cm')); |
|
next if $$menuitem[4] ne 'showmenu' |
|
&& $$menuitem[4] ne 'author' |
&& !$env{'request.course.id'}; |
&& !$env{'request.course.id'}; |
next if $$menuitem[4] eq 'showreturn' |
next if $$menuitem[4] eq 'showreturn' |
&& !$showlink |
&& !$showlink |
Line 237 sub secondary_menu {
|
Line 255 sub secondary_menu {
|
next if $$menuitem[4] =~ /showgroups$/ |
next if $$menuitem[4] =~ /showgroups$/ |
&& !$canviewgrps |
&& !$canviewgrps |
&& !%groups; |
&& !%groups; |
|
next if $$menuitem[4] eq 'showroles' |
if ($$menuitem[3] eq 'Roles' && $env{'request.course.id'}) { |
&& ($custommenu || !$numdc || ($numdc && $env{'request.noversionuri'} eq '/adm/roles')); |
|
if ($$menuitem[3] eq 'Roles' && $env{'request.course.id'} && !$custommenu) { |
# special treatment for role selector |
# special treatment for role selector |
my $roles_selector = &roles_selector( |
my $roles_selector = &roles_selector( |
$env{'course.' . $env{'request.course.id'} . '.domain'}, |
$env{'course.' . $env{'request.course.id'} . '.domain'}, |
Line 286 sub gci_secondary_menu {
|
Line 305 sub gci_secondary_menu {
|
my %courses = ( |
my %courses = ( |
'review' => 'gci_9615072b469884921gcil1', |
'review' => 'gci_9615072b469884921gcil1', |
'submit' => 'gci_1H96711d710194bfegcil1', |
'submit' => 'gci_1H96711d710194bfegcil1', |
|
'tutorial' => 'gci_5422913620b814c90gcil1', |
); |
); |
my %linktext = ( |
my %linktext = ( |
'review' => 'Review Questions', |
'review' => 'Review Questions', |
'submit' => 'Submit Questions', |
'submit' => 'Submit Questions', |
'createtest' => 'Create a Test', |
'managetest' => 'Manage Tests', |
|
'tutorial' => 'Tutorials', |
); |
); |
my (%links,$current); |
my %links = ( |
|
'managetest' => '/adm/menu', |
|
); |
|
my $current = 'managetest'; |
|
if ($env{'form.destinationurl'} eq '/adm/gci_info') { |
|
undef($current); |
|
} |
foreach my $key (keys(%courses)) { |
foreach my $key (keys(%courses)) { |
$links{$key} = "javascript:switchpage('$key');"; |
$links{$key} = "javascript:switchpage('$key');"; |
if ($env{'request.course.id'} eq $courses{$key}) { |
if ($env{'request.course.id'} eq $courses{$key}) { |
$links{$key} = '/adm/navmaps'; |
if ($env{'environment.remotenavmap'} eq 'on') { |
$current = $key; |
$links{$key} = "javascript:gonav('/adm/navmaps')"; |
} |
} else { |
} |
$links{$key} = '/adm/navmaps'; |
$links{'createtest'} = "javascript:switchpage('createtest');"; |
} |
if (($ENV{'REQUEST_URI'} eq '/adm/requestcourse') || |
|
($env{'form.orgurl'} eq '/adm/requestcourse')) { |
|
$current = 'createtest'; |
|
} |
|
my @menutabs = ('review','submit','createtest'); |
|
if ($env{'user.adv'}) { |
|
my $key = 'managetest'; |
|
push(@menutabs,$key); |
|
$linktext{$key} = 'Manage Tests'; |
|
$links{$key} = "javascript:switchpage('$key');"; |
|
if (($current eq '') && (($ENV{'REQUEST_URI'} eq '/adm/menu') || |
|
($env{'form.orgurl'} eq '/adm/menu'))) { |
|
$current = $key; |
$current = $key; |
|
$links{'managetest'} = '/adm/roles?selectrole=1&cm=1&orgurl=%2fadm%2fmenu'; |
} |
} |
} |
} |
|
my @menutabs = ('review','submit','managetest','tutorial'); |
my $tabs; |
my $tabs; |
foreach my $item (@menutabs) { |
foreach my $item (@menutabs) { |
if ($item eq $current) { |
if ($item eq $current) { |
$tabs .= ' <li id="current"><a href="'.$links{$item}.'">'. |
$tabs .= '<li id="current"><a href="'.$links{$item}.'">'. |
$linktext{$item}.'</a></li>'; |
$linktext{$item}.'</a></li>'; |
} else { |
} else { |
$tabs .= ' <li><a href="'.$links{$item}.'">'. |
$tabs .= '<li><a href="'.$links{$item}.'">'. |
$linktext{$item}.'</a></li>'; |
$linktext{$item}.'</a></li>'; |
} |
} |
} |
} |
Line 522 ENDINLINEMENU
|
Line 539 ENDINLINEMENU
|
} |
} |
|
|
sub show_return_link { |
sub show_return_link { |
|
return unless ($env{'request.course.id'}); |
|
if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)}) |
|
|| ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) { |
|
return if ($env{'form.register'}); |
|
} |
return (($env{'request.noversionuri'}=~m{^/(res|public)/} && |
return (($env{'request.noversionuri'}=~m{^/(res|public)/} && |
$env{'request.symb'} eq '') |
$env{'request.symb'} eq '') |
|| |
|| |
Line 530 sub show_return_link {
|
Line 552 sub show_return_link {
|
(($env{'request.noversionuri'}=~/^\/adm\//) && |
(($env{'request.noversionuri'}=~/^\/adm\//) && |
($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
($env{'request.noversionuri'}!~ |
($env{'request.noversionuri'}!~ |
m[^/adm/.*/(smppg|bulletinboard|aboutme)($|\?)]) |
m[^/adm/.*/(smppg|bulletinboard)($|\?)]) |
)); |
)); |
} |
} |
|
|
Line 603 sub innerregister {
|
Line 625 sub innerregister {
|
} else { |
} else { |
$contentstext = &mt('Course Contents'); |
$contentstext = &mt('Course Contents'); |
} |
} |
my @crumbs = ({text => $contentstext, |
my @crumbs; |
href => "Javascript:gonav('/adm/navmaps')"}); |
unless (($forcereg) && ($env{'request.noversionuri'} eq '/adm/navmaps') |
|
&& ($mapurl eq $env{'course.'.$env{'request.course.id'}.'.url'})) { |
|
my $link = "javascript:gopost('/adm/navmaps','')"; |
|
if ($env{'environment.remotenavmap'} eq 'on') { |
|
$link = "javascript:gonav('/adm/navmaps','')" |
|
} |
|
@crumbs = ({text => Apache::loncommon::course_type() |
|
. ' Contents', |
|
href => $link}); |
|
} |
if ($mapurl ne $env{'course.'.$env{'request.course.id'}.'.url'}) { |
if ($mapurl ne $env{'course.'.$env{'request.course.id'}.'.url'}) { |
push(@crumbs, {text => '...', |
push(@crumbs, {text => '...', |
no_mt => 1}); |
no_mt => 1}); |
Line 849 $menuitems.="Make notes and annotations
|
Line 879 $menuitems.="Make notes and annotations
|
"&go('/adm/requestcourse')&Course requests\n"; |
"&go('/adm/requestcourse')&Course requests\n"; |
} |
} |
} |
} |
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) { |
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|portfolio)(\?|$)/) { |
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/})) { |
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/})) { |
$menuitems.=(<<ENDREALRES); |
$menuitems.=(<<ENDREALRES); |
s&6&3&catalog.gif&catalog[_2]&info[_1]&catalog_info()&Show Metadata |
s&6&3&catalog.gif&catalog[_2]&info[_1]&catalog_info()&Show Metadata |
Line 889 ENDMENUITEMS
|
Line 919 ENDMENUITEMS
|
my $addremote=0; |
my $addremote=0; |
foreach (@inlineremote) { if ($_ ne '') { $addremote=1; last;} } |
foreach (@inlineremote) { if ($_ ne '') { $addremote=1; last;} } |
my $inlinebuttons=''; |
my $inlinebuttons=''; |
|
|
if ($addremote) { |
if ($addremote) { |
|
|
#SD START (work in progress!) |
|
Apache::lonhtmlcommon::clear_breadcrumb_tools(); |
Apache::lonhtmlcommon::clear_breadcrumb_tools(); |
# Arrows for navigation |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'A', $inlineremote[21] ); |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'A', $inlineremote[23] ); |
|
if(hidden_button_check() ne 'yes'){ |
|
# notes |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'B', $inlineremote[93]); |
|
# bookmark |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'B', $inlineremote[91]); |
|
# evaluate |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'B', $inlineremote[81]); |
|
# feedback |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'B', $inlineremote[82]); |
|
# print |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'B', $inlineremote[83]); |
|
# metadata |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'B', $inlineremote[63]); |
|
|
|
# ? |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'C', $inlineremote[61]); |
|
# ? |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'C', $inlineremote[71]); |
|
# ? |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'C', $inlineremote[72]); |
|
# ? |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'C', $inlineremote[73]); |
|
# ? |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( 'C', $inlineremote[92]); |
|
|
|
|
Apache::lonhtmlcommon::add_breadcrumb_tool( |
|
'navigation', @inlineremote[21,23]); |
|
if(hidden_button_check() ne 'yes') { |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( |
|
'tools', @inlineremote[93,91,81,82,83]); |
|
|
|
#publish button in construction space |
|
if ($env{'request.state'} eq 'construct'){ |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( |
|
'advtools', @inlineremote[63]); |
|
}else{ |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( |
|
'tools', @inlineremote[63]); |
|
} |
|
|
|
unless ($env{'request.noversionuri'}=~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) { |
|
Apache::lonhtmlcommon::add_breadcrumb_tool( |
|
'advtools', @inlineremote[61,71,72,73,92]); |
|
} |
} |
} |
|
|
#SD END |
|
# # Registered, textual output |
# # Registered, textual output |
# if ( $env{'environment.icons'} eq 'iconsonly' ) { |
# if ( $env{'environment.icons'} eq 'iconsonly' ) { |
# $inlinebuttons = (<<ENDARROWSINLINE); |
# $inlinebuttons = (<<ENDARROWSINLINE); |
Line 1384 sub openmenu {
|
Line 1405 sub openmenu {
|
} |
} |
|
|
sub inlinemenu { |
sub inlinemenu { |
my ($context,$switcher) = @_; |
my ($context) = @_; |
undef(@inlineremote); |
undef(@inlineremote); |
undef(%category_members); |
undef(%category_members); |
my $output; |
my $output; |
if ($context eq 'gcicustom') { |
if ($context eq 'gcicustom') { |
$output.='<div class="LC_left_float">'. |
my (%can_request,%request_domains,$canreq,$createtext); |
'<fieldset id="LC_mainmenu_fieldset">'. |
my $role = 'st'; |
'<legend class="LC_mainmenu_fieldset_category">'.&mt('Utilities').'</legend>'. |
my $custommenu = &Apache::loncommon::needs_gci_custom(); |
'<table id="LC_menubuttons_mainmenu">'; |
if ($custommenu) { |
if ($switcher) { |
$role = 'cc'; |
$output .= '<tr><td class="LC_menubuttons_img" align="left"><a href="javascript:courseswitcher('."'icon'".');"><img alt="choose role" src="/res/adm/pages/roles.png" align="left" /></a></td><td class="LC_menubuttons_text" colspan="3"><span class="LC_menubuttons_inline_text">'.$switcher.'</span></td></tr>'; |
} |
|
my %courses = &Apache::loncommon::existing_gcitest_courses($role); |
|
my $numcourses = keys(%courses); |
|
my ($switcher_js,$switcher); |
|
my $formname = 'testpicker'; |
|
if ($numcourses > 0) { |
|
$switcher = &Apache::loncommon::gcitest_switcher($role,$formname,%courses); |
|
my $current; |
|
my $cid = $env{'request.course.id'}; |
|
if ($cid) { |
|
$current = $role.'./'.$env{'course.'.$cid.'.domain'}. |
|
'/'.$env{'course.'.$cid.'.num'}; |
|
} |
|
$switcher_js = &Apache::loncommon::gcitest_switcher_js($current,$numcourses,$formname); |
|
if ($switcher_js) { |
|
$switcher_js= <<"ENDSCRIPT"; |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
|
|
$switcher_js |
|
|
|
// ]]> |
|
</script> |
|
|
|
ENDSCRIPT |
|
} |
|
$switcher = $switcher_js.$switcher; |
} |
} |
$output .= '<tr><td class="LC_menubuttons_img" align="left"><a href="javascript:go('."'/adm/communicate'".');"><img alt="communication" src="/res/adm/pages/com.png" align="left" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:go('."'/adm/communicate'".');"><span class="LC_menubuttons_inline_text">'.&mt('Send and display messages').'</span></a></td></tr></table></fieldset></div>'; |
if ($env{'user.domain'} eq 'gci') { |
if (($env{'request.course.id'}) && |
$canreq = |
(&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) { |
&Apache::lonnet::check_can_request('gcitest',\%can_request,\%request_domains); |
$output.= '<div class="LC_left_float">'. |
$createtext = &mt('Create Concept Test'); |
'<fieldset id="LC_mainmenu_fieldset">'. |
if ($numcourses) { |
'<legend class="LC_mainmenu_fieldset_category">'.&mt('Test Management').'</legend>'. |
$createtext = &mt('Create New Test'); |
'<table id="LC_menubuttons_mainmenu">'. |
} |
'<tr><td class="LC_menubuttons_img" align="left"><a href="javascript:go('."'/adm/createuser'".');"><img alt="user privs" src="/res/adm/pages/cprv.png" align="left" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:go('."'/adm/createuser'".');"><span class="LC_menubuttons_inline_text">'.&mt('Manage Enrollment').'</span></a></td></tr>'."\n". |
|
'<tr><td class="LC_menubuttons_img" align="left"><a href="javascript:go('."'/adm/whatsnew'".');"><img alt="what is new" src="/res/adm/pages/new.png" align="left" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:go('."'/adm/whatsnew'".');"><span class="LC_menubuttons_inline_text">'.&mt("What's New?").'</span></a></td></tr></table></fieldset></div>'; |
|
} |
} |
$output.='<br clear="all />'; |
if ($env{'request.course.id'}) { |
} else |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
|
my $navlink; |
|
if ($env{'environment.remotenavmap'} eq 'on') { |
|
$navlink = "javascript:gonav('/adm/navmaps')"; |
|
} else { |
|
$navlink = '/adm/navmaps'; |
|
} |
|
$output .= |
|
'<br /><br clear="all" /><div class="LC_Box LC_GCI_Menu">'. |
|
'<h3 class="LC_hcell">'.&mt('Management').'</h3>'. |
|
'<div class="LC_GCI_Menu_left">'. |
|
'<dl class="LC_GCI_Menu">'. |
|
'<dt><a href="'.$navlink.'">'.&mt('Concept Test Contents').'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/nav.png\');"><a class="LC_menubuttons_link" href="'.$navlink.'">'.&mt('Display the table of contents for your Concept Test.').'</a></dd>'. |
|
'<dt><a href="/adm/coursedocs">'.&mt('Assemble Concept Test').'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/docs.png\');"><a class="LC_menubuttons_link" href="/adm/coursedocs">'.&mt('If no students have attempted the Concept Test you will be able to modify it. You can also change the start and end date of the test itself.').'</a></dd>'. |
|
'<dt><a href="/adm/createuser">'.&mt('Enrollment and Student Activity').'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/cprv.png\');"><a class="LC_menubuttons_link" href="/adm/createuser">'.&mt('Display or download a course roster, and view information about completion status and last login. You can also add new students, or change access dates for existing students.').'</a></dd></dl></div>'. |
|
'<div class="LC_GCI_Menu_right"><dl class="LC_GCI_Menu">'. |
|
'<dt><a href="/adm/whatsnew">'.&mt("What's New?").'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/new.png\');"><a class="LC_menubuttons_link" href="/adm/whatsnew">'.&mt('View information about changes in your Concept Test course.').'</a></dd>'. |
|
'<dt><a href="/adm/printout">'.&mt('Prepare Printable Concept Test').'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/prnt.png\');"><a class="LC_menubuttons_link" href="/adm/printout">'.&mt('Create a PDF which you can send to a printer to create a hardcopy of the Concept Test.').'</a></dd>'. |
|
'<dt><a href="/adm/statistics">'.&mt('Concept Test Statistics').'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/chrt.png\');"><a class="LC_menubuttons_link" href="/adm/statistics">'.&mt('After the closing date of the Concept Test you can view and download statistics for the test, as well as anonymized submission data.').'</a></dd>'; |
|
if ($canreq) { |
|
$output .= '<dt><a href="javascript:switchpage('."'createtest'".');">'.&mt('Create New Test').'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/rcrs.png\');"><a class="LC_menubuttons_link" href="javascript:switchpage('."'createtest'".');">'. |
|
&mt('Create a new Concept Test Course Container. Choose GCI questions to include in the test and upload a student roster.').'</a></dd>'; |
|
} |
|
$output .= '</dl></div></div><br clear="all"/>'; |
|
} else { |
|
my $navtext = &mt('Table of Contents'); |
|
my $navdesc = &mt('Display Table of Contents for Geoscience Concept Inventory'); |
|
if ($env{'request.role.domain'} eq 'gcitest') { |
|
$navtext = &mt('Display Test Contents'); |
|
$navdesc = &mt('Display the table of contents for this Concept Test'); |
|
} |
|
my $navlink; |
|
if ($env{'environment.remotenavmap'} eq 'on') { |
|
$navlink = "javascript:gonav('/adm/navmaps');" |
|
} else { |
|
$navlink = '/adm/navmaps'; |
|
} |
|
$output .= |
|
'<div class="LC_Box LC_GCI_Menu">'. |
|
'<h3 class="LC_hcell">'.&mt('Utilities').'</h3>'. |
|
'<div class="LC_GCI_Menu_left">'. |
|
'<dl class="LC_GCI_Menu">'. |
|
'<dt><a href="'.$navlink.'">'.$navtext.'</dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/nav.png\');">'. |
|
'<a class="LC_menubuttons_link" href="'.$navlink.'">'.$navdesc.'</a></dd></dl></div>'; |
|
if ($canreq) { |
|
$output .= '<div class="LC_GCI_Menu_right">'. |
|
'<dl class="LC_GCI_Menu">'. |
|
'<dt><a href="javascript:switchpage('."'createtest'".');">'.$createtext.'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/rcrs.png\');"><a class="LC_menubuttons_link" href="javascript:switchpage('."'createtest'".');">'.&mt('Create a new Concept Test Course Container').'</a>. '.&mt('Choose GCI questions to include in the test and upload a student roster.').'</dd></dl></div>'; |
|
} |
|
$output .= '</div><br clear="all"/>'; |
|
} |
|
} elsif ($switcher || $canreq) { |
|
$output .= '<br /><br />'. |
|
'<div class="LC_Box LC_GCI_Menu">'. |
|
'<h3 class="LC_hcell">'.&mt('Utilities').'</h3>'. |
|
'<div class="LC_GCI_Menu_left">'. |
|
'<dl class="LC_GCI_Menu">'; |
|
if ($canreq) { |
|
$output .= '<dt><a href="javascript:switchpage('."'createtest'".');">'.$createtext.'</a></dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/rcrs.png\');"><a class="LC_menubuttons_link" href="javascript:switchpage('."'createtest'".');">'.&mt('Create a new Concept Test Course Container. Choose GCI questions to include in the test and upload a student roster.').'</a></dd></dl></div>'; |
|
if ($switcher) { |
|
$output .= '<div class="LC_GCI_Menu_right">'. |
|
'<dl class="LC_GCI_Menu">'; |
|
} |
|
} |
|
if ($switcher) { |
|
$output .= '<dt>'.&mt('Select Concept Test').'</dt>'. |
|
'<dd style="background-image:url(\'/res/adm/pages/roles.png\');">'.$switcher.'<br /><br /></dd></dl></div>'; |
|
} |
|
$output .= '</div><br clear="all"/>'; |
|
} |
|
} elsif ($context eq 'gcinorole') { |
|
my $queued = &Apache::loncoursequeueadmin::queued_selfenrollment('notitle'); |
|
if ($queued) { |
|
$output .= |
|
'<div class="LC_Box">'. |
|
'<h3 class="LC_hcell">'.&mt('Pending Enrollment Requests').'</h3>'. |
|
$queued. |
|
'</div>'; |
|
} |
|
} else { |
# calling rawconfig with "1" will evaluate mydesk.tab, |
# calling rawconfig with "1" will evaluate mydesk.tab, |
# even if there is no active remote control |
# even if there is no active remote control |
&rawconfig(1); |
&rawconfig(1); |
my $output='<table><tr>'; |
$output='<table><tr>'; |
for (my $col=1; $col<=2; $col++) { |
for (my $col=1; $col<=2; $col++) { |
$output.='<td class="LC_mainmenu_col_fieldset">'; |
$output.='<td class="LC_mainmenu_col_fieldset">'; |
for (my $row=1; $row<=8; $row++) { |
for (my $row=1; $row<=8; $row++) { |
Line 1431 sub inlinemenu {
|
Line 1565 sub inlinemenu {
|
} |
} |
$output.='</table>'; |
$output.='</table>'; |
$output.='</div>'; |
$output.='</div>'; |
|
} |
} |
} |
$output.="</td>"; |
$output.="</td>"; |
} |
} |
Line 1737 sub utilityfunctions {
|
Line 1872 sub utilityfunctions {
|
|
|
my $gcimenujs; |
my $gcimenujs; |
if ($custommenu) { |
if ($custommenu) { |
my %concepttests = &Apache::loncommon::existing_gcitest_courses(); |
my %concepttests = &Apache::loncommon::existing_gcitest_courses('cc'); |
my $managetesturl = '/adm/menu'; |
my $managetesturl = '/adm/menu'; |
my $createtesturl = '/adm/requestcourse'; |
my $createtesturl = '/adm/requestcourse'; |
if (($env{'request.course.id'}) && |
if (($env{'request.course.id'}) && |
Line 1769 function switchpage(caller) {
|
Line 1904 function switchpage(caller) {
|
if (caller == 'managetest') { |
if (caller == 'managetest') { |
document.location.href = '$managetesturl'; |
document.location.href = '$managetesturl'; |
} |
} |
|
if (caller == 'tutorial') { |
|
document.location.href = '/adm/roles?selectrole=1&st./gci/5422913620b814c90gcil1=1'; |
|
} |
return; |
return; |
} |
} |
|
|
Line 2014 sub hidden_button_check {
|
Line 2152 sub hidden_button_check {
|
return; |
return; |
} |
} |
if ($env{'request.role.adv'}) { |
if ($env{'request.role.adv'}) { |
return; |
unless (&Apache::loncommon::needs_gci_custom()) { |
|
return; |
|
} |
} |
} |
my $buttonshide = &Apache::lonnet::EXT('resource.0.buttonshide'); |
my $buttonshide = &Apache::lonnet::EXT('resource.0.buttonshide'); |
return $buttonshide; |
return $buttonshide; |