Diff for /loncom/interface/portfolio.pm between versions 1.59 and 1.60

version 1.59, 2004/11/26 00:17:37 version 1.60, 2004/12/04 02:15:42
Line 159  sub display_file_select { Line 159  sub display_file_select {
     my ($r,$current_path,$is_empty,$dir_list)=@_;      my ($r,$current_path,$is_empty,$dir_list)=@_;
     my $iconpath= $r->dir_config('lonIconsURL') . "/";      my $iconpath= $r->dir_config('lonIconsURL') . "/";
     my $display_out;      my $display_out;
       my %checked_files = &Apache::lonnet::files_in_path($ENV{'user.name'}, $ENV{'form.currentpath'});
     if ($is_empty && ($current_path ne '/')) {      if ($is_empty && ($current_path ne '/')) {
         $display_out = '<form method="post" action="/adm/portfolio">'.          $display_out = '<form method="post" action="/adm/portfolio">'.
         '<input type="hidden" name="action" value="deletedir" />'.          '<input type="hidden" name="action" value="deletedir" />'.
Line 205  sub display_file_select { Line 206  sub display_file_select {
         }          }
     }      }
     $r->print('</table>      $r->print('</table>
               <input type="hidden" name="continue" value="true">
               <input type="hidden" name="fieldname" value="'.$ENV{'form.fieldname'}.'">
               <input type="hidden" name="mode" value="selectfile">
               <input type="submit" name="submit" value="Select checked files, and continue selecting." /><br />
             <input type="button" name="doit" onClick= "finishSelect();" value="Select checked files, and close window" />              <input type="button" name="doit" onClick= "finishSelect();" value="Select checked files, and close window" />
             <input type="hidden" name="currentpath" value="'.$current_path.'" />              <input type="hidden" name="currentpath" value="'.$current_path.'" />
     </form>');      </form>');
Line 349  sub rename_confirmed { Line 354  sub rename_confirmed {
 }  }
 sub select_files {  sub select_files {
     my ($r)=@_;      my ($r)=@_;
       if ($ENV{'form.continue'} eq 'true') {
           # here we update the selections for the currentpath
           # eventually, have to handle removing those not checked, but . . . 
           my @items=&Apache::loncommon::get_env_multiple('form.selectedfile');
           &Apache::lonnet::save_selected_files($ENV{'user.name'}, $ENV{'form.currentpath'}, @items);
       }
     my $java_script =(<<ENDSMP);      my $java_script =(<<ENDSMP);
         <script language='javascript'>          <script language='javascript'>
         function finishSelect() {          function finishSelect() {
Line 370  ENDSMP Line 381  ENDSMP
     $r->print($java_script);      $r->print($java_script);
     $r->print("<h1>Select portfolio files</h1>      $r->print("<h1>Select portfolio files</h1>
                 Check as many as you wish in response to the essay problem.<br />");                  Check as many as you wish in response to the essay problem.<br />");
       $r->print("<strong>Files selected:</strong><br />");
       foreach (&Apache::lonnet::files_not_in_path($ENV{'user.name'}, $ENV{'form.currentpath'})) {
           $r->print($_."<br />");
       }
 }  }
 sub upload {  sub upload {
     my ($r)=@_;      my ($r)=@_;

Removed from v.1.59  
changed lines
  Added in v.1.60


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