[LON-CAPA-cvs] cvs: loncom /interface loncoursegroups.pm longroup.pm
raeburn
raeburn@source.lon-capa.org
Sun, 29 Aug 2010 22:59:50 -0000
raeburn Sun Aug 29 22:59:50 2010 EDT
Modified files:
/loncom/interface longroup.pm loncoursegroups.pm
Log:
- Prevent ISE in case where Course Group folder has been removed using
Course Editor.
Index: loncom/interface/longroup.pm
diff -u loncom/interface/longroup.pm:1.24 loncom/interface/longroup.pm:1.25
--- loncom/interface/longroup.pm:1.24 Tue Feb 23 14:18:12 2010
+++ loncom/interface/longroup.pm Sun Aug 29 22:59:49 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# accessor routines used to provide information about course groups
#
-# $Id: longroup.pm,v 1.24 2010/02/23 14:18:12 raeburn Exp $
+# $Id: longroup.pm,v 1.25 2010/08/29 22:59:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -693,9 +693,14 @@
if (ref($navmap)) {
my $symb = 'uploaded/'.$cdom.'/'.$cnum.'/group_folder_'.$group.'.sequence___1___adm/'.$cdom.'/'.$cnum.'/'.$group.'/smppg';
my $res = $navmap->getBySymb($symb);
- my $link = $res->link();
- $link .= (($link=~/\?/)?'&':'?').'symb='.$res->shown_symb();
- return $link;
+ my $link;
+ if (ref($res)) {
+ $link = $res->link();
+ $link .= (($link=~/\?/)?'&':'?').'symb='.$res->shown_symb();
+ } else {
+ $link = '/adm/'.$cdom.'/'.$cnum.'/'.$group.'/smppg';
+ }
+ return $link;
}
return;
}
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.110 loncom/interface/loncoursegroups.pm:1.111
--- loncom/interface/loncoursegroups.pm:1.110 Tue Feb 23 14:18:12 2010
+++ loncom/interface/loncoursegroups.pm Sun Aug 29 22:59:49 2010
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.110 2010/02/23 14:18:12 raeburn Exp $
+# $Id: loncoursegroups.pm,v 1.111 2010/08/29 22:59:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -333,7 +333,8 @@
$link .= $group;
} else {
$link .=
- &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap).'&ref=grouplist';
+ &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap);
+ $link .= (($link=~/\?/)?'&':'?').'ref=grouplist';
if (exists($env{'form.refpage'})) {
$link .= '&refpage='.$env{'form.refpage'};
}