--- loncom/interface/loncreateuser.pm 2006/08/16 19:47:42 1.130 +++ loncom/interface/loncreateuser.pm 2006/11/21 21:03:06 1.133 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.130 2006/08/16 19:47:42 albertel Exp $ +# $Id: loncreateuser.pm,v 1.133 2006/11/21 21:03:06 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(); @@ -772,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", @@ -795,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", @@ -804,9 +813,6 @@ ENDBADAUTH ); $r->print(< - $lt{'err'}: $lt{'uuas'} ($currentauth). $lt{'adcs'}.
@@ -837,7 +843,7 @@ ENDBADAUTH "

$authformint

$authformfsys

"; } $authformcurrent.=' (will override current values)
'; - if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) { + if (&Apache::lonnet::allowed('mau',$ccdomain)) { # Current user has login modification privileges my %lt=&Apache::lonlocal::texthash( 'ccld' => "Change Current Login Data", @@ -855,6 +861,19 @@ $loginscript

$lt{'enld'}

$authform_other ENDOTHERAUTHS + } else { + if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) { + my %lt=&Apache::lonlocal::texthash( + 'ccld' => "Change Current Login Data", + 'yodo' => "You do not have privileges to modify the authentication configuration for this user.", + 'ifch' => "If a change is required, contact a domain coordinator for the domain", + ); + $r->print(< +

$lt{'ccld'}

+$lt{'yodo'} $lt{'ifch'}: $ccdomain +ENDNOPRIV + } } } ## End of "check for bad authentication type" logic } ## End of new user/old user logic @@ -1503,7 +1522,7 @@ sub custom_role_editor { } my %lt=&Apache::lonlocal::texthash( 'prv' => "Privilege", - 'crl' => "Course/Group Level", + 'crl' => "Course Level", 'dml' => "Domain Level", 'ssl' => "System Level" ); @@ -1653,7 +1672,7 @@ sub course_level_table { 'new' => "Define new section", 'ssd' => "Set Start Date", 'sed' => "Set End Date", - 'crl' => "Course/Group Level", + 'crl' => "Course Level", 'act' => "Activate", 'rol' => "Role", 'ext' => "Extent", @@ -1800,8 +1819,8 @@ sub course_level_dc { ''. ''; my $courseform=''.&Apache::loncommon::selectcourse_link - ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course/Group').''; - my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom); + ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').''; + my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu'); my %lt=&Apache::lonlocal::texthash( 'typ' => "Type", 'rol' => "Role", @@ -1813,14 +1832,14 @@ sub course_level_dc { 'ssd' => "Set Start Date", 'sed' => "Set End Date" ); - my $header = '

'.&mt('Course/Group Level').'

'. + my $header = '

'.&mt('Course Level').'

'. ''; my $otheritems = ''."\n". + ''."\n". '
'.$lt{'typ'}.''.$courseform.''.$lt{'rol'}.''.$lt{'grs'}.''.$lt{'sta'}.''.$lt{'end'}.'
'."\n". - '