--- loncom/interface/loncreateuser.pm 2003/02/13 21:35:50 1.48 +++ loncom/interface/loncreateuser.pm 2003/04/30 15:49:45 1.52 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.48 2003/02/13 21:35:50 albertel Exp $ +# $Id: loncreateuser.pm,v 1.52 2003/04/30 15:49:45 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -46,7 +46,7 @@ # 05/10,10/16 Gerd Kortemeyer # 02/11/02 Matthew Hall # -# $Id: loncreateuser.pm,v 1.48 2003/02/13 21:35:50 albertel Exp $ +# $Id: loncreateuser.pm,v 1.52 2003/04/30 15:49:45 matthew Exp $ ### package Apache::loncreateuser; @@ -149,6 +149,7 @@ sub print_user_modification_page { $ccuname=~s/\W//g; $ccdomain=~s/\W//g; + my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); my $dochead =<<"ENDDOCHEAD"; @@ -161,14 +162,7 @@ sub print_user_modification_page { parmwin.close(); } - function pjump(type,dis,value,marker,ret,call) { - parmwin=window.open("/adm/rat/parameter.html?type="+escape(type) - +"&value="+escape(value)+"&marker="+escape(marker) - +"&return="+escape(ret) - +"&call="+escape(call)+"&name="+escape(dis),"LONCAPAparms", - "height=350,width=350,scrollbars=no,menubar=no"); - - } + $pjump_def function dateset() { eval("document.cu."+document.cu.pres_marker.value+ @@ -193,7 +187,7 @@ ENDFORMINFO my $uhome=&Apache::lonnet::homeserver($ccuname,$ccdomain); my %incdomains; my %inccourses; - foreach (%Apache::lonnet::hostdom) { + foreach (values(%Apache::lonnet::hostdom)) { $incdomains{$_}=1; } foreach (keys(%ENV)) { @@ -292,7 +286,12 @@ END if ($area =~ /^\/(\w+)\/(\d\w+)/ ) { my %coursedata= &Apache::lonnet::coursedescription($1.'_'.$2); - my $carea='Course: '.$coursedata{'description'}; + my $carea; + if (defined($coursedata{'description'})) { + $carea='Course: '.$coursedata{'description'}; + } else { + $carea='Unavailable course: '.$area; + } $inccourses{$1.'_'.$2}=1; if (&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2)) { $allowed=1; @@ -831,6 +830,7 @@ sub course_level_table { $thiscourse=~s:_:/:g; my %coursedata=&Apache::lonnet::coursedescription($thiscourse); my $area=$coursedata{'description'}; + if (!defined($area)) { $area='Unavailable course: '.$_; } my $bgcol=$thiscourse; $bgcol=~s/[^8-9b-e]//g; $bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',0,6);