Diff for /loncom/interface/Attic/londropadd.pm between versions 1.167 and 1.168

version 1.167, 2007/08/28 13:00:45 version 1.168, 2007/08/29 04:12:33
Line 179  sub print_main_menu { Line 179  sub print_main_menu {
           { text => 'Create a new group',            { text => 'Create a new group',
             help => 'Course_Create_Group',              help => 'Course_Create_Group',
             permission => $permission->{'grp_manage'},              permission => $permission->{'grp_manage'},
             url => '/adm/coursegroups?refpage=enrl&action=create',              url => '/adm/coursegroups?refpage=enrl&action=create',
             },              },
           { text => 'Modify an existing group',            { text => 'Modify an existing group',
             help => 'Course_Modify_Group',              help => 'Course_Modify_Group',
             permission => $permission->{'grp_manage'},              permission => $permission->{'grp_manage'},
             url => '/adm/coursegroups?refpage=enrl&action=modify',              url => '/adm/coursegroups?refpage=enrl&action=modify',
             },              },
           { text => 'Delete an existing group',            { text => 'Delete an existing group',
             help => 'Course_Delete_Group',              help => 'Course_Delete_Group',
             permission => $permission->{'grp_manage'},              permission => $permission->{'grp_manage'},
             url => '/adm/coursegroups?refpage=enrl&action=delete',              url => '/adm/coursegroups?refpage=enrl&action=delete',
             },              },
           { text => 'Re-enable a deleted group',            { text => 'Re-enable a deleted group',
             help => 'Course_Reenable_Group',              help => 'Course_Reenable_Group',
             permission => $permission->{'grp_manage'},              permission => $permission->{'grp_manage'},
             url => '/adm/coursegroups?refpage=enrl&action=reenable',              url => '/adm/coursegroups?refpage=enrl&action=reenable',
             },              },
           { text => 'Enter an existing group',            { text => 'Enter an existing group',
             help => 'Course_Display_Group',              help => 'Course_Display_Group',
             permission => $permission->{'grp_view'},              permission => $permission->{'grp_view'},
             url => '/adm/coursegroups?refpage=enrl&action=view',              url => '/adm/coursegroups?refpage=enrl&action=view',
             },              },
           );            );
     my $menu_html = '';      my $menu_html = '';
Line 1557  END Line 1557  END
   
  my %emails   = &Apache::loncommon::getemails($username,$domain);   my %emails   = &Apache::loncommon::getemails($username,$domain);
  my $email;   my $email;
  foreach my $type ('critnotification', 'permanentemail',   if ($emails{'permanentemail'} =~ /\S/) {
   'notification') {      $email = $emails{'permanentemail'};
     if ($emails{$type} =~ /\S/) {  
  $email = $emails{$type};  
  last;  
     }  
  }   }
   
         if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') {          if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') {
Line 1715  sub print_modify_student_form { Line 1711  sub print_modify_student_form {
     # determine the students name information      # determine the students name information
     my %info=&Apache::lonnet::get('environment',      my %info=&Apache::lonnet::get('environment',
                                   ['firstname','middlename',                                    ['firstname','middlename',
                                    'lastname','generation','id'],                                     'lastname','generation','id',
                                   $sdom, $sname);                                     'permanentemail'], $sdom, $sname);
     my ($tmp) = keys(%info);      my ($tmp) = keys(%info);
     if ($tmp =~ /^(con_lost|error|no_such_host)/i) {      if ($tmp =~ /^(con_lost|error|no_such_host)/i) {
         $r->print('<font color="#ff0000" size="+2">'.&mt('Error').'</font>'.          $r->print('<font color="#ff0000" size="+2">'.&mt('Error').'</font>'.
Line 1770  sub print_modify_student_form { Line 1766  sub print_modify_student_form {
                    'mn'    => "Middle",                     'mn'    => "Middle",
                    'ln'    => "Last",                     'ln'    => "Last",
                    'gen'   => "Generation",                     'gen'   => "Generation",
                      'email' => "E-mail address",
                    'sid'   => "Student ID",                     'sid'   => "Student ID",
                    'disn'  => "Disable ID/Student Number Safeguard and Force Change of Conflicting IDs (only do if you know what you are doing)",                     'disn'  => "Disable ID/Student Number Safeguard and Force Change of Conflicting IDs (only do if you know what you are doing)",
                    'sec'   => "Section",                     'sec'   => "Section",
Line 1799  $lt{'odcc'} Line 1796  $lt{'odcc'}
 <input type="hidden" name="state"   value="done" />  <input type="hidden" name="state"   value="done" />
 <input type="hidden" name="sortby"  value="$sortby" />  <input type="hidden" name="sortby"  value="$sortby" />
 <input type="hidden" name="Status"  value="$env{'form.Status'}" />  <input type="hidden" name="Status"  value="$env{'form.Status'}" />
 <h2>$lt{'mef'} $info{'firstname'} $info{'middlename'}   <h3>$lt{'mef'} $info{'firstname'} $info{'middlename'} 
 $info{'lastname'} $info{'generation'}, $sname:$sdom</h2>  $info{'lastname'} $info{'generation'}, $sname:$sdom</h3>
 <p>  <p>
 <b>$lt{'sn'}</b>  <b>$lt{'sn'}</b>
 <table>  <table>
Line 1812  $info{'lastname'} $info{'generation'}, $ Line 1809  $info{'lastname'} $info{'generation'}, $
 <input type="text" name="generation" value="$info{'generation'}" /></td></tr>  <input type="text" name="generation" value="$info{'generation'}" /></td></tr>
 </table>  </table>
 </p><p>  </p><p>
   <b>$lt{'email'}</b>: <input type="text" name="permanentemail" value="$info{'permanentemail'}" size="30" />
   </p><p>
 <b>$lt{'sid'}</b>: <input type="text" name="id" value="$info{'id'}" size="12" />  <b>$lt{'sid'}</b>: <input type="text" name="id" value="$info{'id'}" size="12" />
 </p><p>  </p><p>
 <label>  <label>
Line 1855  sub modify_single_student { Line 1854  sub modify_single_student {
     # Get the old data      # Get the old data
     my %old=&Apache::lonnet::get('environment',      my %old=&Apache::lonnet::get('environment',
                                  ['firstname','middlename',                                   ['firstname','middlename',
                                   'lastname','generation','id'],                                    'lastname','generation','id',
                                  $sdom, $slogin);                                    'permanentemail'],$sdom, $slogin);
     $old{'section'} = &Apache::lonnet::getsection($sdom,$slogin,      $old{'section'} = &Apache::lonnet::getsection($sdom,$slogin,
                                                   $env{'request.course.id'});                                                    $env{'request.course.id'});
     my ($tmp) = keys(%old);      my ($tmp) = keys(%old);
Line 1871  sub modify_single_student { Line 1870  sub modify_single_student {
     my $middlename = $env{'form.middlename'};      my $middlename = $env{'form.middlename'};
     my $lastname   = $env{'form.lastname'};      my $lastname   = $env{'form.lastname'};
     my $generation = $env{'form.generation'};      my $generation = $env{'form.generation'};
       my $permanentemail = $env{'form.permanentemail'};
     my $section    = $env{'form.section'};      my $section    = $env{'form.section'};
     my $courseid   = $env{'request.course.id'};      my $courseid   = $env{'request.course.id'};
     my $sid        = $env{'form.id'};      my $sid        = $env{'form.id'};
Line 1895  sub modify_single_student { Line 1895  sub modify_single_student {
                    'mn'    => "Middle name",                     'mn'    => "Middle name",
                    'ln'    => "Last name",                     'ln'    => "Last name",
                    'gen'   => "Generation",                     'gen'   => "Generation",
                      'em'    => "E-mail address",
                    'sec'   => "Section",                     'sec'   => "Section",
                    'ri'    => "Role Information",                     'ri'    => "Role Information",
                    'st'    => "Start Time",                     'st'    => "Start Time",
                    'et'    => "End Time",                     'et'    => "End Time",
        );         );
     $r->print(<<END);      $r->print(<<END);
     <h2>$lt{'mdu'} $slogin : $sdom </h2>      <h3>$lt{'mdu'} $slogin:$sdom </h3>
 <h3>$lt{'si'}</h3>  END
 <table rules="rows" border="1" cellpadding="3" >      $r->print(<<END);
 <tr>  
     <th> $lt{'fd'} </th>  
     <th> $lt{'ov'} </th>  
     <th> $lt{'nv'} </th>  
 </tr>  
 <tr>  
     <td> <b>$lt{'fn'}</b> </td>  
     <td> $old{'firstname'} </td>  
     <td> $firstname </td>  
 </tr><tr>  
     <td> <b>$lt{'mn'}</b> </td>  
     <td> $old{'middlename'} </td>  
     <td> $middlename </td>  
 </tr><tr>  
     <td> <b>$lt{'ln'}</b> </td>  
     <td> $old{'lastname'} </td>  
     <td> $lastname </td>  
 </tr><tr>  
     <td> <b>$lt{'gen'}</b> </td>  
     <td> $old{'generation'} </td>  
     <td> $generation </td>  
 </tr><tr>  
     <td> <b>ID</b> </td>  
     <td> $old{'id'} </td>  
     <td> $sid </td>  
 </tr><tr>  
     <td> <b>$lt{'sec'}</b> </td>  
     <td> $old{'section'} </td>  
     <td> $section</td>  
 </tr>  
 </table>  
 <h3>$lt{'ri'}</h3>  
 <table>  <table>
 <tr><td align="right"><b>$lt{'st'}:</b></td><td> $displayable_starttime </td></tr>   <tr>
 <tr><td align="right"><b>$lt{'et'}:</b></td><td> $displayable_endtime   </td></tr>    <td>
       <table class="LC_nested_outer">
        <tr>
         <th>$lt{si}</th>
        </tr>
        <tr>
         <td>
          <table class="LC_nested">
           <tr class="LC_info_row">
            <td class="LC_left_item"> $lt{'fd'} </td>
            <td class="LC_left_item"> $lt{'ov'} </td>
            <td class="LC_left_item"> $lt{'nv'} </td>
           </tr>
           <tr class="LC_odd_row">
            <td class="LC_left_item"> <b>$lt{'fn'}</b> </td>
            <td class="LC_left_item"> $old{'firstname'} </td>
            <td class="LC_left_item"> $firstname </td>
           </tr>
           <tr>
            <td class="LC_left_item"> <b>$lt{'mn'}</b> </td>
            <td class="LC_left_item"> $old{'middlename'} </td>
            <td class="LC_left_item"> $middlename </td>
           </tr>
           <tr class="LC_odd_row">
            <td class="LC_left_item"> <b>$lt{'ln'}</b> </td>
            <td class="LC_left_item"> $old{'lastname'} </td>
            <td class="LC_left_item"> $lastname </td>
           </tr>
           <tr>
            <td class="LC_left_item"> <b>$lt{'gen'}</b> </td>
            <td class="LC_left_item"> $old{'generation'} </td>
            <td class="LC_left_item"> $generation </td>
           </tr>
           <tr class="LC_odd_row">
            <td class="LC_left_item"> <b>ID</b> </td>
            <td class="LC_left_item"> $old{'id'} </td>
            <td class="LC_left_item"> $sid </td>
           </tr>
           <tr>
            <td class="LC_left_item"> <b>$lt{'em'}</b> </td>
            <td class="LC_left_item"> $old{'permanentemail'} </td>
            <td class="LC_left_item"> $permanentemail </td>
           <tr class="LC_odd_row">
            <td> <b>$lt{'sec'}</b> </td>
            <td> $old{'section'} </td>
            <td> $section</td>
           </tr>
          </table>
         </td>
        </tr>
      </table>
      <br />
      <table class="LC_nested_outer">
        <tr>
         <th>$lt{'ri'}</th>
        </tr>
        <tr>
         <td>
          <table class="LC_nested">
           <tr class="LC_odd_row">
            <td class="LC_left_item"><b>$lt{'st'}:</b></td>
            <td class="LC_right_item"> $displayable_starttime </td>
           </tr>
           <tr>
            <td class="LC_left_item"><b>$lt{'et'}:</b></td>
            <td class="LC_right_item"> $displayable_endtime   </td>
           </tr>
          </table>
         </td>
        </tr>
       </table>
     </td>
    </tr>
 </table>  </table>
 <p>  <p>
 END  END
Line 1953  END Line 1994  END
     }      }
     my $roleresults = &Apache::lonnet::modifystudent      my $roleresults = &Apache::lonnet::modifystudent
         ($sdom,$slogin,$sid,undef,undef,$firstname,$middlename,$lastname,          ($sdom,$slogin,$sid,undef,undef,$firstname,$middlename,$lastname,
          $generation,$section,$endtime,$starttime,$env{'form.forceid'});           $generation,$section,$endtime,$starttime,$env{'form.forceid'},
            undef,$permanentemail);
       if ($old{'permanentemail'} ne $permanentemail) {
           &Apache::loncommon::flush_email_cache($slogin,$sdom);
       }
     if ($roleresults eq 'refused' ) {      if ($roleresults eq 'refused' ) {
         $r->print(&mt('Your request to change the role information for this student was refused. You do not appear to have sufficient authority to change student information.'));          $r->print(&mt('Your request to change the role information for this student was refused. You do not appear to have sufficient authority to change student information.'));
     } elsif ($roleresults !~ /ok/) {      } elsif ($roleresults !~ /ok/) {

Removed from v.1.167  
changed lines
  Added in v.1.168


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