version 1.309.2.1, 2009/12/07 20:04:18
|
version 1.309.2.7, 2010/01/05 15:27:31
|
Line 290 sub gci_secondary_menu {
|
Line 290 sub gci_secondary_menu {
|
my %linktext = ( |
my %linktext = ( |
'review' => 'Review Questions', |
'review' => 'Review Questions', |
'submit' => 'Submit Questions', |
'submit' => 'Submit Questions', |
'createtest' => 'Create a Test', |
'managetest' => 'Manage Tests', |
); |
); |
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'; |
$links{$key} = '/adm/navmaps'; |
$current = $key; |
$current = $key; |
|
$links{'managetest'} = '/adm/roles?selectrole=1&cm=1&orgurl=%2fadm%2fmenu'; |
} |
} |
} |
} |
$links{'createtest'} = "javascript:switchpage('createtest');"; |
my @menutabs = ('review','submit','managetest'); |
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; |
|
} |
|
} |
|
my $tabs; |
my $tabs; |
foreach my $item (@menutabs) { |
foreach my $item (@menutabs) { |
if ($item eq $current) { |
if ($item eq $current) { |
Line 1388 sub inlinemenu {
|
Line 1380 sub inlinemenu {
|
undef(@inlineremote); |
undef(@inlineremote); |
undef(%category_members); |
undef(%category_members); |
my $output; |
my $output; |
if ($context eq 'gcicustom') { |
if (($context eq 'gcicustom') || ($context eq 'gcistudent')) { |
$output.='<div class="LC_left_float">'. |
$output='<table><tr>'. |
'<fieldset id="LC_mainmenu_fieldset">'. |
'<td class="LC_mainmenu_col_fieldset">'. |
'<legend class="LC_mainmenu_fieldset_category">'.&mt('Utilities').'</legend>'. |
'<div class="LC_Box LC_400Box">'. |
'<table id="LC_menubuttons_mainmenu">'; |
'<h3 class="LC_hcell">'.&mt('Utilities').'</h3>'. |
|
'<table>'; |
|
if ($context eq 'gcicustom') { |
|
my $createtext = &mt('Create Concept Test'); |
|
if ($switcher) { |
|
$createtext = &mt('Create New Test'); |
|
} |
|
$output .= '<tr><td align="left"><a href="javascript:switchpage('."'createtest'".');"><img alt="choose role" src="/res/adm/pages/rcrs.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:switchpage('."'createtest'".');"><span class="LC_menubuttons_inline_text">'.$createtext.'</span></a></td></tr>'; |
|
} |
if ($switcher) { |
if ($switcher) { |
$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>'; |
$output .= '<tr><td align="left"><a href="javascript:courseswitcher('."'icon'".');"><img alt="choose role" src="/res/adm/pages/roles.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="2">'.$switcher.'</td></tr>'; |
} |
} |
$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>'; |
$output .= '<tr><td align="left"><a href="javascript:go('."'/adm/communicate'".');"><img alt="communication" src="/res/adm/pages/com.png" align="left" class="LC_icon" /></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/Display Messages').'</span></a></td></tr>'; |
if (($env{'request.course.id'}) && |
if ($env{'request.course.id'}) { |
(&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) { |
if (($context eq 'gcicustom') && (&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) { |
$output.= '<div class="LC_left_float">'. |
$output.= '</td></tr></table></div></td>'. |
'<fieldset id="LC_mainmenu_fieldset">'. |
'<td class="LC_mainmenu_col_fieldset">'. |
'<legend class="LC_mainmenu_fieldset_category">'.&mt('Test Management').'</legend>'. |
'<div class="LC_Box LC_400Box">'. |
'<table id="LC_menubuttons_mainmenu">'. |
'<h3 class="LC_hcell">'.&mt('Test Management').'</h3>'. |
'<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". |
'<table><tr><td align="left"><a href="javascript:gonav('."'/adm/navmaps'".');"><img alt="course contents" src="/res/adm/pages/nav.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:gonav('."'/adm/navmaps'".');"><span class="LC_menubuttons_inline_text">Concept Test Contents</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>'; |
'<tr><td align="left"><a href="javascript:go('."'/adm/coursedocs'".');"><img alt="assemble test" src="/res/adm/pages/docs.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:go('."'/adm/coursedocs'".');"><span class="LC_menubuttons_inline_text">Assemble Concept Test</span></a></td></tr>'."\n". |
|
'<tr><td align="left"><a href="javascript:go('."'/adm/createuser'".');"><img alt="user privs" src="/res/adm/pages/cprv.png" align="left" class="LC_icon" /></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 align="left"><a href="javascript:go('."'/adm/whatsnew'".');"><img alt="what is new" src="/res/adm/pages/new.png" align="left" class="LC_icon" /></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></div></td>'; |
|
} else { |
|
my $navtext = &mt('Table of Contents'); |
|
if ($env{'request.role.domain'} eq 'gcitest') { |
|
$navtext = &mt('Display Test Contents'); |
|
} |
|
$output .= '<tr><td align="left"><a href="javascript:gonav('."'/adm/navmaps'".');"><img alt="course contents" src="/res/adm/pages/nav.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:gonav('."'/adm/navmaps'".');"><span class="LC_menubuttons_inline_text">'.$navtext.'</span></a></td></tr></table></div></td>'; |
|
} |
} |
} |
$output.='<br clear="all />'; |
$output.='</tr></table>'; |
} else |
} 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 1440 sub inlinemenu {
|
} |
} |
$output.='</table>'; |
$output.='</table>'; |
$output.='</div>'; |
$output.='</div>'; |
|
} |
} |
} |
$output.="</td>"; |
$output.="</td>"; |
} |
} |
Line 2014 sub hidden_button_check {
|
Line 2024 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; |