--- loncom/interface/loncreateuser.pm 2006/08/11 21:55:19 1.129 +++ loncom/interface/loncreateuser.pm 2006/11/20 23:36:40 1.132 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.129 2006/08/11 21:55:19 albertel Exp $ +# $Id: loncreateuser.pm,v 1.132 2006/11/20 23:36:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -313,18 +313,27 @@ sub print_user_modification_page { alert("Section designations do not apply to Course Coordinator roles.\\nA course coordinator role will be added with access to all sections."); section = ""; } + var coursename = "_$dcdom"+"_"+course+"_"+userrole var numcourse = getIndex(document.cu.dccourse); if (numcourse == "-1") { alert("There was a problem with your course selection"); return } - else { - var coursename = "_$dcdom"+"_"+course+"_"+userrole - document.cu.elements[numcourse].name = "act"+coursename - document.cu.elements[numcourse+5].name = "sec"+coursename - document.cu.elements[numcourse+5].value = section - document.cu.elements[numcourse+7].name = "start"+coursename - document.cu.elements[numcourse+8].name = "end"+coursename + else { + document.cu.elements[numcourse].name = "act"+coursename; + var numnewsec = getIndex(document.cu.newsec); + if (numnewsec != "-1") { + document.cu.elements[numnewsec].name = "sec"+coursename; + document.cu.elements[numnewsec].value = section; + } + var numstart = getIndex(document.cu.start); + if (numstart != "-1") { + document.cu.elements[numstart].name = "start"+coursename; + } + var numend = getIndex(document.cu.end); + if (numend != "-1") { + document.cu.elements[numend].name = "end"+coursename + } } } document.cu.submit(); @@ -604,7 +613,7 @@ END if ($area =~ /^\/(\w+)\/(\d\w+)/ ) { $class='Course'; my ($coursedom,$coursedir) = ($1,$2); - $sortkey.="\0$1"; + $sortkey.="\0$coursedom"; # $1.'_'.$2 is the course id (eg. 103_12345abcef103l3). my %coursedata= &Apache::lonnet::coursedescription($1.'_'.$2); @@ -619,6 +628,7 @@ END $carea=&mt('Unavailable course').': '.$area; $sortkey.="\0".&mt('Unavailable course').': '.$area; } + $sortkey.="\0$coursedir"; $inccourses{$1.'_'.$2}=1; if ((&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2)) || (&Apache::lonnet::allowed('c'.$role_code,$ccdomain))) { @@ -771,7 +781,7 @@ END $currentauth=~/^internal:/ or $currentauth=~/^localauth:/ ) { # bad authentication scheme - if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) { + if (&Apache::lonnet::allowed('mau',$ccdomain)) { &initialize_authen_forms(); my %lt=&Apache::lonlocal::texthash( 'err' => "ERROR", @@ -794,7 +804,7 @@ $lt{'uuas'} ($currentauth). $lt{'sldb'}.
$authformloc
ENDBADAUTH } else { - # This user is not allowed to modify the users + # This user is not allowed to modify the user's # authentication scheme, so just notify them of the problem my %lt=&Apache::lonlocal::texthash( 'err' => "ERROR", @@ -803,9 +813,6 @@ ENDBADAUTH ); $r->print(<$authformint
$authformfsys
"; } $authformcurrent.=' (will override current values)'.$lt{'typ'}.' | '.$courseform.' | '.$lt{'rol'}.' | '.$lt{'grs'}.' | '.$lt{'sta'}.' | '.$lt{'end'}.' |
---|---|---|---|---|---|
'."\n". - ' | '."\n". + ' | '."\n". ' |