[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonmenu.pm mydesk.tab

raeburn raeburn@source.lon-capa.org
Mon, 04 Oct 2010 23:00:46 -0000


This is a MIME encoded message

--raeburn1286233246
Content-Type: text/plain

raeburn		Mon Oct  4 23:00:46 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	mydesk.tab lonmenu.pm 
  Log:
  - Customization for GCI_3
   - Home link in primary menu for GCI Faculty users points at /adm/gci_info
   - Preferences link in primary menu.
   - Elimination of Main Menu in most GCI contexts
  lonmenu.pm  - Backport 1.312, 1.323, 1.324, 1.339.
              - Modified Main Menu for Course Coordinators of Concept Tests.  
  mydesk.tab - Backport 1.134 (part).
  
  
--raeburn1286233246
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20101004230046.txt"

Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.125 loncom/interface/mydesk.tab:1.125.4.1
--- loncom/interface/mydesk.tab:1.125	Wed Dec 16 14:21:59 2009
+++ loncom/interface/mydesk.tab	Mon Oct  4 23:00:46 2010
@@ -16,8 +16,12 @@
 #   - courses: show Courses instead of Roles
 # prim:link:icon:alt:text:condition
 prim:gotop('/adm/about.html'):/adm/lonIcons/minilogo.gif:LON-CAPA Logo:About:public
+prim:gotop('/adm/menu'):::Home:home
+prim:gotop('/adm/roles?destinationurl=/adm/gci_info'):::Home:gci
+prim:gotop('/adm/menu'):::Home:gcitest
 prim:gotop('/adm/communicate'):::Messages:nonewmsg
 prim:gotop('/adm/communicate'):::New Messages:newmsg
+prim:gotop('/adm/preferences'):::Preferences:
 prim:gotop('/adm/roles'):::Roles:roles
 prim:gotop('/adm/roles'):::Courses:courses
 prim:gotop('/adm/roles'):::Log In:onlypublic
@@ -46,8 +50,7 @@
 #   - noremotenavCommunity: remote navmap is _not_ activated 
 #                          and course is of type Community
 # prim:link:icon:alt:text:condition
-scnd:/adm/menu:::Main Menu:always
-scnd:/adm/flip?postdata=return%3a:::Return to Last Location:showreturn
+scnd:/adm/menu:::Main Menu:showmenu
 scnd:/adm/navmaps?postdata=[url]&postsymb=[symb]:::Course Contents:noremotenav
 scnd:/adm/navmaps?postdata=[url]&postsymb=[symb]:::Course Contents:remotenav
 scnd:/adm/navmaps?postdata=[url]&postsymb=[symb]:::Community Contents:noremotenavCommunity
@@ -55,7 +58,8 @@
 scnd:/adm/coursedocs:::Course Editor:mdcCourse
 scnd:/adm/coursedocs:::Community Editor:mdcCommunity
 scnd:/adm/coursegroups:::Groups:showgroups
-scnd:/adm/roles:::Roles:
+scnd:/adm/roles:::Roles:showroles
+scnd:/adm/flip?postdata=return%3a:::Return to Last Location:showreturn
 
 
 # Categories
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.309.2.15 loncom/interface/lonmenu.pm:1.309.2.16
--- loncom/interface/lonmenu.pm:1.309.2.15	Fri Sep  3 19:20:47 2010
+++ loncom/interface/lonmenu.pm	Mon Oct  4 23:00:46 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.309.2.15 2010/09/03 19:20:47 raeburn Exp $
+# $Id: lonmenu.pm,v 1.309.2.16 2010/10/04 23:00:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -151,6 +151,9 @@
     } else {             # textual Link
         $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>';
 }
 
@@ -177,6 +180,12 @@
         next if    $$menuitem[4]        eq 'onlypublic'# hide links which are 
                 && $env{'user.name'}    ne 'public'    # only visible to public
                 && $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;
+        next if    $$menuitem[4]        eq 'gcitest'
+                && $env{'user.domain'}  eq 'gci';
         next if    $$menuitem[4]        eq 'roles'     # hide links which are
                 && $custommenu;                        # not visible when GCI
         next if    $$menuitem[4]        eq 'courses'   # tabbed interface in use
@@ -213,11 +222,13 @@
                      $env{'user.domain'}, $env{'user.name'},
                      $env{'course.' . $env{'request.course.id'} . '.domain'},
                      $env{'course.' . $env{'request.course.id'} . '.num'});
+    my $custommenu = &Apache::loncommon::needs_gci_custom();
+    my $numdc = &Apache::loncommon::check_for_gci_dc();
     foreach my $menuitem (@secondary_menu) {
         # evaluate conditions 
         next if    ref($menuitem)  ne 'ARRAY';
-        next if    $$menuitem[4]   ne 'always'
-                && !$env{'request.course.id'};
+        next if    $$menuitem[4]   eq 'showmenu'
+                && ($custommenu || !$numdc);   
         next if    $$menuitem[4]   eq 'showreturn'
                 && !$showlink
                 && !($env{'request.state'} eq 'construct');
@@ -238,8 +249,9 @@
         next if    $$menuitem[4]   =~ /showgroups$/
                 && !$canviewgrps
                 && !%groups;
-
-        if ($$menuitem[3] eq 'Roles' && $env{'request.course.id'}) {
+        next if   $$menuitem[4]  eq 'showroles'
+                && ($custommenu || !$numdc);
+        if ($$menuitem[3] eq 'Roles' && $env{'request.course.id'} && !$custommenu) {
             # special treatment for role selector
             my $roles_selector = &roles_selector(
                         $env{'course.' . $env{'request.course.id'} . '.domain'},
@@ -517,6 +529,10 @@
 }
 
 sub show_return_link {
+    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)/} &&
 	     $env{'request.symb'} eq '')
 	    ||
@@ -525,7 +541,7 @@
 	    (($env{'request.noversionuri'}=~/^\/adm\//) &&
 	     ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
 	     ($env{'request.noversionuri'}!~
-	      m[^/adm/.*/(smppg|bulletinboard|aboutme)($|\?)])
+	      m[^/adm/.*/(smppg|bulletinboard)($|\?)])
 	     ));
 }
 
@@ -598,9 +614,13 @@
         } else {
             $contentstext = &mt('Course Contents');
         }
-        my @crumbs = ({text  => $contentstext, 
-                       href  => "Javascript:gonav('/adm/navmaps')"});
-
+        my @crumbs;
+        unless (($forcereg) && ($env{'request.noversionuri'} eq '/adm/navmaps')
+                && ($mapurl eq $env{'course.'.$env{'request.course.id'}.'.url'})) {
+            @crumbs = ({text  => Apache::loncommon::course_type()
+                                . ' Contents',
+                        href  => "Javascript:gopost('/adm/navmaps','')"});
+        }
         if ($mapurl ne $env{'course.'.$env{'request.course.id'}.'.url'}) { 
             push(@crumbs, {text  => '...',
                            no_mt => 1});
@@ -844,7 +864,7 @@
                                 "&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/})) {
 		    $menuitems.=(<<ENDREALRES);
 s&6&3&catalog.gif&catalog[_2]&info[_1]&catalog_info()&Show Metadata
@@ -884,41 +904,32 @@
 	    my $addremote=0;
 	    foreach (@inlineremote) { if ($_ ne '') { $addremote=1; last;} }
 	    my $inlinebuttons='';
+
     if ($addremote) {
 
-        #SD START (work in progress!)
         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
 #        if ( $env{'environment.icons'} eq 'iconsonly' ) {
 #            $inlinebuttons = (<<ENDARROWSINLINE);
@@ -1379,62 +1390,130 @@
 }
 
 sub inlinemenu {
-    my ($context,$switcher) = @_;
+    my ($context) = @_;
     undef(@inlineremote);
     undef(%category_members);
     my $output;
-    if (($context eq 'gcicustom') || ($context eq 'gcistudent') ||
-        ($context eq 'gcinorole')) {
-        $output='<table><tr>'.
-                '<td class="LC_mainmenu_col_fieldset">'.
-                '<div class="LC_Box LC_400Box">'.
-                '<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');
+    if ($context eq 'gcicustom') {
+        my (%can_request,%request_domains,$canreq,$createtext);
+        my $role = 'st';
+        my $custommenu = &Apache::loncommon::needs_gci_custom();
+        if ($custommenu) {
+            $role = 'cc';
+        }
+        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
             }
-            $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>';
+            $switcher = $switcher_js.$switcher;
         }
-        if ($switcher) {
-            $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>';
+        if ($env{'user.domain'} eq 'gci') {
+            $canreq =
+                &Apache::lonnet::check_can_request('gcitest',\%can_request,\%request_domains);
+            $createtext = &mt('Create Concept Test');
+            if ($numcourses) {
+                $createtext = &mt('Create New Test');
+            }
         }
-        $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>'.
-'<tr><td align="left"><a href="javascript:go('."'/adm/preferences'".');"><img alt="user preferences" src="/res/adm/pages/pref.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:go('."'/adm/preferences'".');"><span class="LC_menubuttons_inline_text">'.&mt('Set my user preferences').'</span></a></td></tr>';
         if ($env{'request.course.id'}) {
-            if (($context eq 'gcicustom') && (&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) {
-                $output.= '</td></tr></table></div></td>'.
-                          '<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('Enrollment and Student Activity').'</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>'.
-                         '<tr><td align="left"><a href="javascript:go('."'/adm/printout'".');"><img alt="print concept test" src="/res/adm/pages/prnt.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:go('."'/adm/printout'".');"><span class="LC_menubuttons_inline_text">'.&mt("Prepare Printable Concept Test").'</span></a></td></tr>'.
-                         '<tr><td align="left"><a href="javascript:go('."'/adm/statistics'".');"><img alt="Test Statistics" src="/res/adm/pages/chrt.png" align="left" class="LC_icon" /></a></td><td class="LC_menubuttons_text" colspan="3"><a class="LC_menubuttons_link" href="javascript:go('."'/adm/statistics'".');"><span class="LC_menubuttons_inline_text">'.&mt("Concept Test Statistics").'</span></a></td></tr></table></div></td>';
+            if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
+                $output .= 
+                  '<div class="LC_Box LC_800Box LC_GCI_Menu">'.
+                  '<h3 class="LC_hcell">'.&mt('Test Management').'</h3>'.
+                  '<div class="LC_GCI_Menu_left">'.
+                  '<dl class="LC_GCI_Menu">'.
+                  '<dt><a href="/adm/navmaps">'.&mt('Concept Test Contents').'</a></dt>'.
+                  '<dd style="background-image:url(\'/res/adm/pages/nav.png\');"><a class="LC_menubuttons_link" href="/adm/navmaps">'.&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');
+                }
+                $output .= 
+                           '<div class="LC_Box LC_800Box LC_GCI_Menu">'.
+                           '<h3 class="LC_hcell">'.&mt('Utilities').'</h3>'.
+                           '<div class="LC_GCI_Menu_left">'.
+                           '<dl class="LC_GCI_Menu">'.
+                           '<dt><a href="/adm/navmaps">'.$navtext.'</dt>'.
+                           '<dd style="background-image:url(\'/res/adm/pages/nav.png\');">'.
+                           '<a class="LC_menubuttons_link" href="/adm/navmaps">'.$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_800Box 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">';
                 }
-                $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>';
             }
-        } else {
-            $output.='</td></tr></table></div></td>';
-        }
-        if ($context eq 'gcinorole') {
-            my $queued =  &Apache::loncoursequeueadmin::queued_selfenrollment('notitle');
-            if ($queued) {
-                $output .= '<td class="LC_mainmenu_col_fieldset">'.
-                           '<div class="LC_Box LC_400Box">'.
-                           '<h3 class="LC_hcell">'.&mt('Pending Enrollment Requests').'</h3>'.
-                           $queued.
-                           '</td></tr></table></div></td>';
+            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 LC_800Box">'.
+                       '<h3 class="LC_hcell">'.&mt('Pending Enrollment Requests').'</h3>'.
+                       $queued.
+                       '</div>';
         }
-        $output.='</tr></table>';
     } else {
         # calling rawconfig with "1" will evaluate mydesk.tab, 
         # even if there is no active remote control
@@ -1801,7 +1880,6 @@
     if (caller == 'tutorial') {
         document.location.href = '/adm/roles?selectrole=1&st./gci/5422913620b814c90gcil1=1';
     }
-
     return;
 }
 
@@ -2255,7 +2333,7 @@
             secok = 0;
             var numrolesec = rolesections[selidx].length;
             var msgidx = numsec[selidx] - numrolesec;
-            secchoice = prompt("$lt{'this'}\\n"+secpick[msgidx]+"\\n$lt{'avai'} "+roleseclist[selidx],"");
+            secchoice = prompt("$lt{'this'} "+secpick[msgidx]+"\\n$lt{'avai'} "+roleseclist[selidx],"");
             if (secchoice == '') {
                 if (msgidx > 0) {
                     secok = 1;

--raeburn1286233246--