--- loncom/interface/loncoursegroups.pm 2006/12/04 14:59:56 1.67
+++ loncom/interface/loncoursegroups.pm 2007/01/03 21:55:37 1.69
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.67 2006/12/04 14:59:56 raeburn Exp $
+# $Id: loncoursegroups.pm,v 1.69 2007/01/03 21:55:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3139,7 +3139,7 @@ sub write_group_data {
$description,$tools,\%groupinfo,
$gpterm,$ucgpterm,$crstype);
if ($result ne 'ok') {
- $r->print(&mt('A problem occurred when creating folders for the new [_1].
[_2]
',$gpterm,$result));
+ $r->print(&mt('A problem occurred when creating folders for the new [_1].
[_2]
',$gpterm,$result));
}
$r->print(&mt('[_1] [_2] was created.
',$ucgpterm,$groupname));
} elsif ($action eq 'modify') {
@@ -3679,8 +3679,8 @@ sub add_group_folder {
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;
@@ -3767,7 +3767,7 @@ sub get_folder_lock {
while (($gotlock ne 'ok') && $tries <3) {
$tries ++;
- sleep 1;
+ sleep(1);
$gotlock = &Apache::lonnet::newput('coursegroups',$lockhash,$cdom,$cnum);
}
return $gotlock;