[LON-CAPA-cvs] cvs: loncom /interface loncoursegroups.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 07 Jul 2006 21:04:58 -0000


raeburn		Fri Jul  7 17:04:58 2006 EDT

  Modified files:              
    /loncom/interface	loncoursegroups.pm 
  Log:
  Changing sequence names for all groups folder, individual group folder, and group's discussion board folder when creating group. 
  
  
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.46 loncom/interface/loncoursegroups.pm:1.47
--- loncom/interface/loncoursegroups.pm:1.46	Fri Jul  7 16:53:40 2006
+++ loncom/interface/loncoursegroups.pm	Fri Jul  7 17:04:57 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursegroups.pm,v 1.46 2006/07/07 20:53:40 albertel Exp $
+# $Id: loncoursegroups.pm,v 1.47 2006/07/07 21:04:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1164,7 +1164,10 @@
     if ($totalmembers == 0) {
         $$group_info{$group}{'totalmembers'} = 'None';
     } else {
-        $$group_info{$group}{'totalmembers'} = $active.' - active<br />'.$previous.' -previous<br />'.$future.' -future';
+        $$group_info{$group}{'totalmembers'} = '<nobr>'.$active.
+            '&nbsp;-&nbsp;active</nobr><br /><nobr>'.$previous.
+            '&nbsp;-&nbsp;previous</nobr><br /><nobr>'.$future.
+            '&nbsp;-&nbsp;future</nobr>';
     }
     return 'ok';
 }
@@ -1449,7 +1452,7 @@
     my $earlyout = &validate_groupname($groupname,$action,$cdom,$cnum,$gpterm,
                                        $ucgpterm,$crstype);
     if ($earlyout) {
-	$r->print($earlyout)
+	$r->print($earlyout);
         &display_navbuttons($r,$formname,$$states{$action}[$page-1],
                            $$navbuttons{'gtps'});
         return;
@@ -3280,23 +3283,23 @@
     my ($outcome,$allgrpsmap,$grpmap,$boardsmap,$grppage);
     my $navmap = Apache::lonnavmaps::navmap->new();
     my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/';
-    $allgrpsmap = $crspath.'default_0.sequence';
+    $allgrpsmap = $crspath.'group_allfolders.sequence';
     my $topmap = $navmap->getResourceByUrl($allgrpsmap);
     undef($navmap);
     if ($action eq 'create') {
-    # check if default_0.sequence exists.
+    # check if group_allfolders.sequence exists.
         if (!$topmap) {
             my $grpstitle = &mt('[_1] [_2]',$crstype,$ucgpterm);
             my $topmap_url = '/'.$env{'course.'.$env{'request.course.id'}.'.url'};
             $topmap_url =~ s|/+|/|g;
             if ($topmap_url =~ m|^/uploaded|) {
-                $outcome = &map_updater($cdom,$cnum,'default_0.sequence',
+                $outcome = &map_updater($cdom,$cnum,'group_allfolders.sequence',
                                         'toplevelgroup',$grpstitle,$topmap_url);
                 if ($outcome ne 'ok') {
                     return $outcome;
                 }
             } else {
-                $outcome = &mt('Non-standard course - group folder not added.');
+                $outcome = &mt('Non-standard course - folder for all groups not added.');
                 return $outcome;
             }
         }
@@ -3304,7 +3307,7 @@
         $grppage='/adm/'.$cdom.'/'.$cnum.'/'.$groupname.'/grppg';
         my $grptitle = &mt('Group homepage').' - '.$description;
         my ($seqid,$discussions,$disctitle);
-        my $outcome = &map_updater($cdom,$cnum,'default_'.$now.'.sequence',
+        my $outcome = &map_updater($cdom,$cnum,'group_folder_'.$groupname.'.sequence',
                                    'grpseq',$grpfolder,$allgrpsmap,$grppage,
                                    $grptitle);
         if ($outcome ne 'ok') {
@@ -3313,16 +3316,16 @@
         my $pageout = &create_homepage($cdom,$cnum,$groupname,$groupinfo,
                                        $tools,$gpterm,$ucgpterm,$now);
         # Link to folder for bulletin boards
-        $grpmap = $crspath.'default_'.$now.'.sequence';
+        $grpmap = $crspath.'group_folder_'.$groupname.'.sequence';
         if (grep/^discussion$/,@{$tools}) {
             $seqid = $now + 1;
             $disctitle = &mt('Discussion Boards');
-            my $outcome = &map_updater($cdom,$cnum,'default_'.$seqid.
+            my $outcome = &map_updater($cdom,$cnum,'group_boards_'.$groupname.
                                        '.sequence','bbseq',$disctitle,$grpmap);
             if ($outcome ne 'ok') {
                 return $outcome;
             }
-            $boardsmap = $crspath.'default_'.$seqid.'.sequence';
+            $boardsmap = $crspath.'group_boards_'.$groupname.'.sequence';
         }
     } else {
         #modify group folder if status of discussions tools is changed