Diff for /loncom/interface/Attic/londropadd.pm between versions 1.133 and 1.134

version 1.133, 2005/11/21 19:44:14 version 1.134, 2006/02/07 05:08:32
Line 1258  sub show_class_list { Line 1258  sub show_class_list {
     if ($sortby !~ /^(username|domain|section|fullname|id|start|end|type)$/) {      if ($sortby !~ /^(username|domain|section|fullname|id|start|end|type)$/) {
         $sortby = 'username';          $sortby = 'username';
     }      }
       if (! exists($env{'form.displayphotos'})) {
           $env{'form.displayphotos'} = 'off';
       }
       my $displayphotos = $env{'form.displayphotos'};
   
     # Print out header       # Print out header 
     unless ($mode eq 'autoenroll') {      unless ($mode eq 'autoenroll') {
         $r->print(<<END);          $r->print(<<END);
Line 1266  END Line 1271  END
     }      }
     $r->print(<<END);      $r->print(<<END);
 <input type="hidden" name="sortby" value="$sortby" />  <input type="hidden" name="sortby" value="$sortby" />
   <input type="hidden" name="displayphotos" value="$displayphotos" />
 END  END
     if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') {      if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') {
         if ($linkto eq 'aboutme') {          if ($linkto eq 'aboutme') {
Line 1280  END Line 1286  END
                                            'sec'    => "section",                                             'sec'    => "section",
                                            'start'  => "start date",                                             'start'  => "start date",
                                            'end'    => "end date",                                             'end'    => "end date",
                                            'type'   => "enroll type/action"                                             'type'   => "enroll type/action",
                                              'photo'  => "photo",
    );     );
         unless ($mode eq 'autoenroll') {          unless ($mode eq 'autoenroll') {
             $r->print(<<END);              $r->print(<<END);
Line 1288  END Line 1295  END
 <input type="hidden" name="sdom"   value="" />  <input type="hidden" name="sdom"   value="" />
 END  END
         }          }
           if ($env{'course.'.$env{'request.course.id'}.'.internal.showphotos'}) {
               $r->print('
   <script type="text/javascript">
   function photowindow(photolink) {
       var title = "Photo_Viewer";
       var options = "scrollbars=1,resizable=1,menubar=0";
       options += ",width=240,height=240";
       stdeditbrowser = open(photolink,title,options,"1");
       stdeditbrowser.focus();
   }
   </script>
              ');
           }
         $r->print("          $r->print("
 <p>  <p>
 <table border=2>  <table border=2>
Line 1318  END Line 1338  END
     </th><th>      </th><th>
        <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>
   </tr>  
 END  END
           if ($env{'course.'.$env{'request.course.id'}.'.internal.showphotos'}) {
               my %photo_options = &Apache::lonlocal::texthash (
                                                               'on' => 'Show',
                                                               'off' => 'Hide',
                                                               );
               my $photochg = 'on';
               if ($displayphotos eq 'on') {
                   $photochg = 'off';
               }
               $r->print('    <th>'."\n".'     '. 
               '<a href="javascript:document.studentform.displayphotos.value='.
                         "'".$photochg."'".';document.studentform.submit();">'.
                         $photo_options{$photochg}.'</a>&nbsp;'.$lt{'photo'}."\n".
                         '    </th>'."\n");
           }
           $r->print("  </tr>\n");
     } elsif ($mode eq 'csv') {      } elsif ($mode eq 'csv') {
  #   #
  # Open a file   # Open a file
Line 1457  END Line 1492  END
     <td>$section</td>      <td>$section</td>
     <td>$start</td>      <td>$start</td>
     <td>$end</td>      <td>$end</td>
    </tr>  
 END  END
               if ($env{'course.'.$env{'request.course.id'}.
                                                        '.internal.showphotos'}) {
                   if ($displayphotos eq 'on') {
                       my $imgurl = &Apache::lonnet::retrievestudentphoto($domain,
                                                     $username,'gif','thumbnail');
                   
                       $r->print('    <td align="right"><a href="javascript:photowindow('."'".&Apache::lonnet::studentphoto($domain,$username,'jpg')."'".')"><img src="'.$imgurl.'" border="1"></a></td>');
                   } else {
                       $r->print('    <td>&nbsp;</td>  ');
                   }
               }
               $r->print('  </tr>  ');
         } elsif ($mode eq 'csv') {          } elsif ($mode eq 'csv') {
             next if (! defined($CSVfile));              next if (! defined($CSVfile));
             # no need to bother with $linkto              # no need to bother with $linkto

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


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