--- loncom/interface/loncommon.pm 2010/02/21 02:38:23 1.942 +++ loncom/interface/loncommon.pm 2010/02/25 03:43:20 1.943 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.942 2010/02/21 02:38:23 raeburn Exp $ +# $Id: loncommon.pm,v 1.943 2010/02/25 03:43:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -10096,11 +10096,19 @@ sub construct_course { # if anyone ever decides to not show this, and Utils::Course::new # will need to be suitably modified. $outcome .= &mt('New LON-CAPA [_1] ID: [_2]',$crstype,$$courseid).$linefeed; + if ($$courseid =~ /^error:/) { + return (0,$outcome); + } + # # Check if created correctly # ($$crsudom,$$crsunum)= &LONCAPA::split_courseid($$courseid); my $crsuhome=&Apache::lonnet::homeserver($$crsunum,$$crsudom); + if ($crsuhome eq 'no_host') { + $outcome .= &mt('Course creation failed, unrecognized course home server.').$linefeed; + return (0,$outcome); + } $outcome .= &mt('Created on').': '.$crsuhome.$linefeed; #