Diff for /loncom/interface/loncreateuser.pm between versions 1.125.2.5 and 1.133

version 1.125.2.5, 2006/08/17 22:45:18 version 1.133, 2006/11/21 21:03:06
Line 313  sub print_user_modification_page { Line 313  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.");                  alert("Section designations do not apply to Course Coordinator roles.\\nA course coordinator role will be added with access to all sections.");
                 section = "";                  section = "";
             }              }
               var coursename = "_$dcdom"+"_"+course+"_"+userrole
             var numcourse = getIndex(document.cu.dccourse);              var numcourse = getIndex(document.cu.dccourse);
             if (numcourse == "-1") {              if (numcourse == "-1") {
                 alert("There was a problem with your course selection");                  alert("There was a problem with your course selection");
                 return                  return
             }              }
             else {               else {
                 var coursename = "_$dcdom"+"_"+course+"_"+userrole                  document.cu.elements[numcourse].name = "act"+coursename;
                 document.cu.elements[numcourse].name = "act"+coursename                  var numnewsec = getIndex(document.cu.newsec);
                 document.cu.elements[numcourse+5].name = "sec"+coursename                  if (numnewsec != "-1") {
                 document.cu.elements[numcourse+5].value = section                      document.cu.elements[numnewsec].name = "sec"+coursename;
                 document.cu.elements[numcourse+7].name = "start"+coursename                      document.cu.elements[numnewsec].value = section;
                 document.cu.elements[numcourse+8].name = "end"+coursename                  }
                   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();          document.cu.submit();
Line 340  sub print_user_modification_page { Line 349  sub print_user_modification_page {
     }      }
   
     function setType() {      function setType() {
         var crstype = 'Course'          var crstype = document.cu.crstype.options[document.cu.crstype.selectedIndex].value;
         rolevals = new Array("$rolevalslist");          rolevals = new Array("$rolevalslist");
         if (crstype == 'Group') {          if (crstype == 'Group') {
             if (document.cu.currsec.options[0].text == "$pickcrsfirst") {              if (document.cu.currsec.options[0].text == "$pickcrsfirst") {
Line 772  END Line 781  END
  $currentauth=~/^internal:/ or   $currentauth=~/^internal:/ or
  $currentauth=~/^localauth:/   $currentauth=~/^localauth:/
  ) { # bad authentication scheme   ) { # bad authentication scheme
     if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) {      if (&Apache::lonnet::allowed('mau',$ccdomain)) {
                 &initialize_authen_forms();                  &initialize_authen_forms();
  my %lt=&Apache::lonlocal::texthash(   my %lt=&Apache::lonlocal::texthash(
                                'err'   => "ERROR",                                 'err'   => "ERROR",
Line 795  $lt{'uuas'} ($currentauth). $lt{'sldb'}. Line 804  $lt{'uuas'} ($currentauth). $lt{'sldb'}.
 <p>$authformloc</p>  <p>$authformloc</p>
 ENDBADAUTH  ENDBADAUTH
             } else {               } 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                  # authentication scheme, so just notify them of the problem
  my %lt=&Apache::lonlocal::texthash(   my %lt=&Apache::lonlocal::texthash(
                                'err'   => "ERROR",                                 'err'   => "ERROR",
Line 804  ENDBADAUTH Line 813  ENDBADAUTH
    );     );
  $r->print(<<ENDBADAUTH);   $r->print(<<ENDBADAUTH);
 <hr />  <hr />
 <script type="text/javascript" language="Javascript">  
 $loginscript  
 </script>  
 <font color="#ff0000"> $lt{'err'}: </font>  <font color="#ff0000"> $lt{'err'}: </font>
 $lt{'uuas'} ($currentauth). $lt{'adcs'}.  $lt{'uuas'} ($currentauth). $lt{'adcs'}.
 <hr />  <hr />
Line 837  ENDBADAUTH Line 843  ENDBADAUTH
                     "<p>$authformint</p><p>$authformfsys</p>";                      "<p>$authformint</p><p>$authformfsys</p>";
     }      }
             $authformcurrent.=' <i>(will override current values)</i><br />';              $authformcurrent.=' <i>(will override current values)</i><br />';
             if (&Apache::lonnet::allowed('mau',$env{'request.role.domain'})) {              if (&Apache::lonnet::allowed('mau',$ccdomain)) {
  # Current user has login modification privileges   # Current user has login modification privileges
  my %lt=&Apache::lonlocal::texthash(   my %lt=&Apache::lonlocal::texthash(
                                'ccld'  => "Change Current Login Data",                                 'ccld'  => "Change Current Login Data",
Line 855  $loginscript Line 861  $loginscript
 <h3>$lt{'enld'}</h3>  <h3>$lt{'enld'}</h3>
 $authform_other  $authform_other
 ENDOTHERAUTHS  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(<<ENDNOPRIV);
   <hr />
   <h3>$lt{'ccld'}</h3>
   $lt{'yodo'} $lt{'ifch'}: $ccdomain 
   ENDNOPRIV
                   } 
             }              }
         }  ## End of "check for bad authentication type" logic          }  ## End of "check for bad authentication type" logic
     } ## End of new user/old user logic      } ## End of new user/old user logic
Line 1801  sub course_level_dc { Line 1820  sub course_level_dc {
                       '<input type="hidden" name="dccourse" value="" />';                        '<input type="hidden" name="dccourse" value="" />';
     my $courseform='<b>'.&Apache::loncommon::selectcourse_link      my $courseform='<b>'.&Apache::loncommon::selectcourse_link
             ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').'</b>';              ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').'</b>';
     my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom);      my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu');
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
                     'typ' => "Type",                      'typ' => "Type",
                     'rol'  => "Role",                      'rol'  => "Role",
Line 1814  sub course_level_dc { Line 1833  sub course_level_dc {
                     'sed'  => "Set End Date"                      'sed'  => "Set End Date"
                   );                    );
     my $header = '<h4>'.&mt('Course Level').'</h4>'.      my $header = '<h4>'.&mt('Course Level').'</h4>'.
                  '<table border="2"><tr><th>'.$courseform.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th></tr>';                   '<table border="2"><tr><th>'.$lt{'typ'}.'</th><th>'.$courseform.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th></tr>';
     my $otheritems = '<tr><td><input type="text" name="coursedesc" value="" onFocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc',".')" /></td>'."\n".      my $otheritems = '<tr><td><select name="crstype" onChange="javascript:setType();">'."\n".
                        ' <option value="">'.&mt('Please select')."\n".
                        ' <option value="Course">'.&mt('Course')."\n".
                        ' <option value="Non-standard course">'.&mt('Non-standard course')."\n".
                        '</select>'."\n".
                        '<td><input type="text" name="coursedesc" value="" onFocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc',''".')" /></td>'."\n".
                      '<td><select name="role">'."\n";                       '<td><select name="role">'."\n";
     foreach  ('st','ta','ep','in','cc') {      foreach  ('st','ta','ep','in','cc') {
         my $plrole=&Apache::lonnet::plaintext($_);          my $plrole=&Apache::lonnet::plaintext($_);

Removed from v.1.125.2.5  
changed lines
  Added in v.1.133


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>