Diff for /loncom/interface/Attic/londropadd.pm between versions 1.162 and 1.163

version 1.162, 2007/07/02 21:12:06 version 1.163, 2007/07/17 21:24:17
Line 1296  END Line 1296  END
                                            'start'  => "start date",                                             'start'  => "start date",
                                            'end'    => "end date",                                             'end'    => "end date",
                                            'type'   => "enroll type/action",                                             'type'   => "enroll type/action",
      'email'  => "email address",
                                            'photo'  => "photo",                                             'photo'  => "photo",
    );     );
         unless ($mode eq 'autoenroll') {          unless ($mode eq 'autoenroll') {
Line 1348  function photowindow(photolink) { Line 1349  function photowindow(photolink) {
        <a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a>         <a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a>
     </th><th>      </th><th>
        <a href="javascript:document.studentform.sortby.value='groups';document.studentform.submit();">$lt{'grp'}</a>         <a href="javascript:document.studentform.sortby.value='groups';document.studentform.submit();">$lt{'grp'}</a>
       </th><th>
          <a href="javascript:document.studentform.sortby.value='email';document.studentform.submit();">$lt{'email'}</a>
     </th>      </th>
 END  END
         if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {          if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {
Line 1391  END Line 1394  END
             print $CSVfile '"'.join('","',map {              print $CSVfile '"'.join('","',map {
  &Apache::loncommon::csv_translate(&mt($_))   &Apache::loncommon::csv_translate(&mt($_))
                 } ("username","domain","ID","student name",                  } ("username","domain","ID","student name",
                    "section","start date","end date","status","active groups"))                     "section","start date","end date","status",
      "active groups","email address"))
                   .'"'."\n";                    .'"'."\n";
         } else {          } else {
             print $CSVfile '"'.join('","',map {              print $CSVfile '"'.join('","',map {
  &Apache::loncommon::csv_translate(&mt($_))   &Apache::loncommon::csv_translate(&mt($_))
                 } ("username","domain","ID","student name",                  } ("username","domain","ID","student name",
                    "section","start date","end date","active groups")).'"'."\n";                     "section","start date","end date",
      "active groups","email address")).'"'."\n";
         }          }
     } elsif ($mode eq 'excel') {      } elsif ($mode eq 'excel') {
         # Create the excel spreadsheet          # Create the excel spreadsheet
Line 1413  END Line 1418  END
         $excel_sheet->write($row++,0,["username","domain","ID",          $excel_sheet->write($row++,0,["username","domain","ID",
                                       "student name","section",                                        "student name","section",
                                       "start date","end date","status",                                        "start date","end date","status",
                                       "active groups"],                                        "active groups","email address"],
                             $format->{'bold'});                              $format->{'bold'});
     }      }
     #      #
Line 1452  END Line 1457  END
         my $name     = $sdata->[$index{'fullname'}];          my $name     = $sdata->[$index{'fullname'}];
         my $id       = $sdata->[$index{'id'}];          my $id       = $sdata->[$index{'id'}];
         my $status   = $sdata->[$index{'status'}];          my $status   = $sdata->[$index{'status'}];
           next if (($statusmode ne 'Any') && ($status ne $statusmode));
         my $start    = $sdata->[$index{'start'}];          my $start    = $sdata->[$index{'start'}];
         my $end      = $sdata->[$index{'end'}];          my $end      = $sdata->[$index{'end'}];
         my $type     = $sdata->[$index{'type'}];          my $type     = $sdata->[$index{'type'}];
         next if (($statusmode ne 'Any') && ($status ne $statusmode));  
    my %emails   = &Apache::loncommon::getemails($username,$domain);
    my $email;
    foreach my $type ('critnotification', 'permanentemail',
     'notification') {
       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') {
             if (! defined($start) || $start == 0) {              if (! defined($start) || $start == 0) {
                 $start = &mt('none');                  $start = &mt('none');
Line 1515  END Line 1531  END
     <td>$start</td>      <td>$start</td>
     <td>$end</td>      <td>$end</td>
     <td>$active_groups</td>      <td>$active_groups</td>
       <td>$email</td>
 END  END
             if ($env{'course.'.$env{'request.course.id'}.              if ($env{'course.'.$env{'request.course.id'}.
  '.internal.showphoto'}) {   '.internal.showphoto'}) {
Line 1551  END Line 1568  END
                 push @line,&Apache::loncommon::csv_translate($status);                  push @line,&Apache::loncommon::csv_translate($status);
             }              }
             push @line,&Apache::loncommon::csv_translate($active_groups);              push @line,&Apache::loncommon::csv_translate($active_groups);
               push @line,&Apache::loncommon::csv_translate($email);
             print $CSVfile '"'.join('","',@line).'"'."\n";              print $CSVfile '"'.join('","',@line).'"'."\n";
         } elsif ($mode eq 'excel') {          } elsif ($mode eq 'excel') {
             $excel_sheet->write($row,0,[$username,$domain,$id,              $excel_sheet->write($row,0,[$username,$domain,$id,
Line 1567  END Line 1585  END
             }              }
             $excel_sheet->write($row,$col++,$status);              $excel_sheet->write($row,$col++,$status);
             $excel_sheet->write($row,$col++,$active_groups);              $excel_sheet->write($row,$col++,$active_groups);
               $excel_sheet->write($row,$col++,$email);
             $row++;              $row++;
         }          }
     }      }

Removed from v.1.162  
changed lines
  Added in v.1.163


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