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

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 03 Jan 2007 21:55:40 -0000


raeburn		Wed Jan  3 16:55:40 2007 EDT

  Modified files:              
    /loncom/interface	loncoursegroups.pm 
  Log:
  Use &getfile() to check if map exists for "All groups folder".
  
  
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.68 loncom/interface/loncoursegroups.pm:1.69
--- loncom/interface/loncoursegroups.pm:1.68	Mon Dec  4 16:44:02 2006
+++ loncom/interface/loncoursegroups.pm	Wed Jan  3 16:55:37 2007
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursegroups.pm,v 1.68 2006/12/04 21:44:02 albertel Exp $
+# $Id: loncoursegroups.pm,v 1.69 2007/01/03 21:55:37 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3679,8 +3679,8 @@
     if ($action eq 'create') {
         if (&get_folder_lock($cdom,$cnum,'group_allfolders',$now) eq 'ok') {
             # check if group_allfolders.sequence exists.
-            my ($errtext,$fatal)=&LONCAPA::map::mapread($allgrpsmap);
-            if ($fatal == 2) { #file does not exist;
+            my $mapcontents = &Apache::lonnet::getfile($allgrpsmap);
+            if ($mapcontents eq '-1') { #file does not exist;
                 my $grpstitle = &mt('[_1] [_2]s',$crstype,$ucgpterm);
                 my $topmap_url = '/'.$env{'course.'.$env{'request.course.id'}.'.url'};
                 $topmap_url =~ s|/+|/|g;