--- loncom/interface/loncreateuser.pm 2007/06/11 22:24:51 1.155 +++ loncom/interface/loncreateuser.pm 2007/07/20 23:55:12 1.158 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.155 2007/06/11 22:24:51 banghart Exp $ +# $Id: loncreateuser.pm,v 1.158 2007/07/20 23:55:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,7 +65,6 @@ use Apache::lonnet; use Apache::loncommon; use Apache::lonlocal; use Apache::longroup; -use lib '/home/httpd/lib/perl/'; use LONCAPA qw(:DEFAULT :match); my $loginscript; # piece of javascript used in two separate instances @@ -222,10 +221,10 @@ sub print_username_entry_form { $r->print(<<"ENDDOCUMENT"); $start_page
- +

$lt{siur}$helpsiur

-
$lt{usr}: +
$lt{usr}: $sellink
$lt{'dom'}:$domform
@@ -235,7 +234,7 @@ ENDDOCUMENT if (&Apache::lonnet::allowed('mcr','/')) { $r->print(< - +

$lt{'ecrp'}$helpecpr

$lt{'nr'}: $choice
@@ -429,9 +428,8 @@ ENDSCRIPT var checkcurr = str.match(re1); if (checkcurr != null) { if (document.cu.elements[i-1].checked == true) { - var re2 = /^currsec_[a-zA-Z0-9]+_[a-zA-Z0-9]+_(\\w+)\$/; - match = re2.exec(str); - var role = match[1]; + var match = str.split('_'); + var role = match[3]; if (role == 'cc') { alert("Section designations do not apply to Course Coordinator roles.\\nA course coordinator role will be added with access to all sections."); } @@ -506,12 +504,12 @@ ENDSECCODE my $forminfo =<<"ENDFORMINFO"; - - - - - - + + + + + + ENDFORMINFO my $uhome=&Apache::lonnet::homeserver($ccuname,$ccdomain); my %inccourses; @@ -730,7 +728,7 @@ END my $active=1; $active=0 if (($role_end_time) && ($now>$role_end_time)); if (($active) && ($allowed)) { - $row.= ''; + $row.= ''; } else { if ($active) { $row.=' '; @@ -740,13 +738,13 @@ END } $row.=''; if ($allowed && !$active) { - $row.= ''; + $row.= ''; } else { $row.=' '; } $row.=''; if ($delallowed) { - $row.= ''; + $row.= ''; } else { $row.=' '; } @@ -999,13 +997,13 @@ ENDNOPRIV $num_domain_level ++; $domaintext .= &Apache::loncommon::start_data_table_row(). -' +' '.$plrole.' '.$thisdomain.' - + '.$lt{'ssd'}.' - + '.$lt{'sed'}.''. &Apache::loncommon::end_data_table_row(); @@ -1022,10 +1020,10 @@ ENDNOPRIV if ($env{'request.role'} =~ m{^dc\./($match_domain)/$}) { $r->print(&course_level_dc($1,'Course')); - $r->print('
'."\n"); + $r->print('
'."\n"); } else { $r->print(&course_level_table(%inccourses)); - $r->print('
'."\n"); + $r->print('
'."\n"); } $r->print("".&Apache::loncommon::end_page()); } @@ -1710,7 +1708,7 @@ ENDCCF &Apache::loncommon::end_data_table_row()); } $r->print(&Apache::loncommon::end_data_table(). - ''. + ''. &Apache::loncommon::end_page()); } # -------------------------------------------------------- @@ -1933,7 +1931,7 @@ sub course_level_table { if (&Apache::lonnet::allowed('c'.$role,$thiscourse)) { my $plrole=&Apache::lonnet::plaintext($role); $table .= &Apache::loncommon::start_data_table_row(). -' +' '.$plrole.' '.$area.'
Domain: '.$domain.''."\n"; if ($role ne 'cc') { @@ -1946,22 +1944,22 @@ sub course_level_table { $currsec.''. '  '. ' '.$lt{'new'}.'
'. - ''. + ''. ''. + 'name="sec_'.$protectedcourse.'_'.$role.'" />'. ''; } else { $table .= ''; + 'name="sec_'.$protectedcourse.'_'.$role.'" />'; } } else { $table .= ' '; } $table .= < + $lt{'ssd'} - + $lt{'sed'} ENDTIMEENTRY @@ -1974,7 +1972,7 @@ ENDTIMEENTRY my $customrole=$protectedcourse.'_cr_cr_'.$env{'user.domain'}. '_'.$env{'user.name'}.'_'.$plrole; $table .= &Apache::loncommon::start_data_table_row(). -' +' '.$plrole.' '.$area.''."\n"; if (%sections_count) { @@ -1987,17 +1985,17 @@ ENDTIMEENTRY ' '.$lt{'new'}.'
'. ''. ''. + 'name="sec_'.$customrole.'" />'. ''; } else { $table .= ''; + 'name="sec_'.$customrole.'" />'; } $table .= < + $lt{'ssd'} - + $lt{'sed'} ENDENTRY @@ -2014,9 +2012,7 @@ ENDENTRY ''.$lt{'act'}.''.$lt{'rol'}.''.$lt{'ext'}.' '.$lt{'grs'}.''.$lt{'sta'}.''.$lt{'end'}.''. &Apache::loncommon::end_data_table_header_row(). -&Apache::loncommon::start_data_table_row(). $table. -&Apache::loncommon::end_data_table_row(). &Apache::loncommon::end_data_table(); return $result; } @@ -2091,10 +2087,10 @@ sub course_level_dc { ''. ''; $otheritems .= < + $lt{'ssd'} - + $lt{'sed'} ENDTIMEENTRY