[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonmenu.pm
raeburn
raeburn@source.lon-capa.org
Mon, 14 Dec 2009 23:03:28 -0000
raeburn Mon Dec 14 23:03:28 2009 EDT
Modified files: (Branch: GCI_3)
/loncom/interface lonmenu.pm
Log:
- Customization for GCI_3
- Combine "Manage Tests" and "Create a Test" into single tab.
- Use standard 3.0 styles for main menu.
- In course context (CC) "Test Management" contains links to:
/adm/navmaps, /adm/coursedocs, /adm/createuser, /adm/whatsnew.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.309.2.2 loncom/interface/lonmenu.pm:1.309.2.3
--- loncom/interface/lonmenu.pm:1.309.2.2 Mon Dec 7 21:48:37 2009
+++ loncom/interface/lonmenu.pm Mon Dec 14 23:03:27 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.309.2.2 2009/12/07 21:48:37 raeburn Exp $
+# $Id: lonmenu.pm,v 1.309.2.3 2009/12/14 23:03:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -290,32 +290,21 @@
my %linktext = (
'review' => 'Review Questions',
'submit' => 'Submit Questions',
- 'createtest' => 'Create a Test',
+ 'managetest' => 'Manage Tests',
);
- my (%links,$current);
+ my %links = (
+ 'managetest' => '/adm/menu',
+ );
+ my $current = 'managetest';
foreach my $key (keys(%courses)) {
$links{$key} = "javascript:switchpage('$key');";
if ($env{'request.course.id'} eq $courses{$key}) {
$links{$key} = '/adm/navmaps';
$current = $key;
+ $links{'managetest'} = '/adm/roles?selectrole=1&cm=1&orgurl=%2fadm%2fmenu';
}
}
- $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;
- }
- }
+ my @menutabs = ('review','submit','managetest');
my $tabs;
foreach my $item (@menutabs) {
if ($item eq $current) {
@@ -1389,24 +1378,30 @@
undef(%category_members);
my $output;
if ($context eq 'gcicustom') {
- $output ='<div class="LC_left_float">'.
- '<fieldset id="LC_mainmenu_fieldset">'.
- '<legend class="LC_mainmenu_fieldset_category">'.&mt('Utilities').'</legend>'.
- '<table id="LC_menubuttons_mainmenu">';
+ my $createtext = &mt('Create Concept Test');
+ if ($switcher) {
+ $createtext = &mt('Create New Test');
+ }
+ $output='<table><tr>'.
+ '<td class="LC_mainmenu_col_fieldset">'.
+ '<div class="LC_Box LC_400Box">'.
+ '<h3 class="LC_hcell">'.&mt('Utilities').'</h3>'.
+ '<table><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) {
- $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"><span class="LC_menubuttons_inline_text">'.$switcher.'</span></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></table></div></td>';
if (($env{'request.course.id'}) &&
(&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) {
- $output.= '<div class="LC_left_float">'.
- '<fieldset id="LC_mainmenu_fieldset">'.
- '<legend class="LC_mainmenu_fieldset_category">'.&mt('Test Management').'</legend>'.
- '<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.= '<td class="LC_mainmenu_col_fieldset">'.
+ '<div class="LC_Box LC_400Box">'.
+ '<h3 class="LC_hcell">'.&mt('Test Management').'</h3>'.
+ '<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 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>';
}
- $output.='<br clear="all />';
+ $output.='</tr></table>';
} else {
# calling rawconfig with "1" will evaluate mydesk.tab,
# even if there is no active remote control