[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages grp_add.png grp_settings.png grp_tools.png /interface loncoursegroups.pm doc/loncapafiles loncapafiles.lpml

wenzelju wenzelju@source.lon-capa.org
Mon, 23 Nov 2009 14:37:57 -0000


wenzelju		Mon Nov 23 14:37:57 2009 EDT

  Added files:                 
    /loncom/html/res/adm/pages	grp_add.png grp_tools.png 
                              	grp_settings.png 

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/interface	loncoursegroups.pm 
  Log:
  Added generate_menu()-call in modify_menu() and inserted corresponding icons.
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.666 doc/loncapafiles/loncapafiles.lpml:1.667
--- doc/loncapafiles/loncapafiles.lpml:1.666	Mon Nov  9 04:04:27 2009
+++ doc/loncapafiles/loncapafiles.lpml	Mon Nov 23 14:37:42 2009
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.666 2009/11/09 04:04:27 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.667 2009/11/23 14:37:42 wenzelju Exp $ -->
 
 <!--
 
@@ -6684,6 +6684,9 @@
 format-justify-fill.png;
 fromfile.png;
 groupportfolio.png;
+grp_add.png;
+grp_settings.png;
+grp_tools.png;
 ims.png;
 imsexport.png;
 list-add.png;
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.105 loncom/interface/loncoursegroups.pm:1.106
--- loncom/interface/loncoursegroups.pm:1.105	Mon Nov 16 14:07:57 2009
+++ loncom/interface/loncoursegroups.pm	Mon Nov 23 14:37:50 2009
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursegroups.pm,v 1.105 2009/11/16 14:07:57 bisitz Exp $
+# $Id: loncoursegroups.pm,v 1.106 2009/11/23 14:37:50 wenzelju Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3710,36 +3710,32 @@
 sub modify_menu {
     my ($r,$groupname,$page,$gpterm) = @_;
     my @menu =
-        (
-          { text => "Modify default $gpterm settings",
-            help => 'Course_Modify_Group',
-            state => 'change_settings',
-            branch => 'settings',
+        ( { categorytitle =>'Group Actions',
+	items => [
+
+          { linktext => "Modify default $gpterm settings",
+            url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_settings&branch=settings',
+            icon => 'grp_settings.png',
+            alttext => "Modify default $gpterm settings",
+            permission => '1',
+            help => 'Course_Modify_Group',            
             },
-          { text => 'Modify access, tools and/or privileges for previous, '.
-                    'future, or current members',
+          { linktext => 'Modify access, tools and privileges for members',
+            url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_members&branch=members',
+            icon => 'grp_tools.png',
+            alttext => 'Modify access, tools and privileges for members',
+            permission => '1',
             help => 'Course_Modify_Group_Membership',
-            state => 'change_members',
-            branch => 'members',
             },
-          { text => "Add member(s) to the $gpterm",
+          { linktext => "Add member(s) to the $gpterm",
+            url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=add_members&branch=adds',
+            icon => 'grp_add.png',
+            alttext =>  "Add member(s) to the $gpterm",
+            permission => '1',
             help => 'Course_Group_Add_Members',
-            state => 'add_members',
-            branch => 'adds',
-            },
-          );
-    my $menu_html = '';
-    foreach my $menu_item (@menu) {
-        $menu_html .=
-        '<p><font size="+1"><a href="/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state='.$menu_item->{'state'}.'&branch='.$menu_item->{'branch'}.'">';
-        $menu_html.= &mt($menu_item->{'text'}).'</a></font>';
-        if (exists($menu_item->{'help'})) {
-            $menu_html.=
-                &Apache::loncommon::help_open_topic($menu_item->{'help'});
-        }
-        $menu_html.='</p>'.$/;
-    }
-    $r->print($menu_html);
+            }]}
+          );   
+    $r->print(&Apache::lonhtmlcommon::generate_menu(@menu));
     return;
 }
 
@@ -4232,3 +4228,4 @@
 }
 
 1;
+