Diff for /loncom/homework/inputtags.pm between versions 1.319 and 1.320

version 1.319, 2013/07/24 18:21:42 version 1.320, 2013/08/20 00:46:35
Line 691  sub current_file_submissions { Line 691  sub current_file_submissions {
     my $uploadedfile=$Apache::lonhomework::history{"resource.$part.$id.uploadedfile"};      my $uploadedfile=$Apache::lonhomework::history{"resource.$part.$id.uploadedfile"};
     my $portfiles=$Apache::lonhomework::history{"resource.$part.$id.portfiles"};      my $portfiles=$Apache::lonhomework::history{"resource.$part.$id.portfiles"};
     return if (($uploadedfile eq '') && ($portfiles !~/[^\s]/));      return if (($uploadedfile eq '') && ($portfiles !~/[^\s]/));
     my $header = &Apache::loncommon::start_data_table().      my $header = &portpath_popup_js().
                    &Apache::loncommon::start_data_table().
                  &Apache::loncommon::start_data_table_header_row();                   &Apache::loncommon::start_data_table_header_row();
     if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {      if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
         $header .= '<th>'.&mt('Delete?').'</th>';          $header .= '<th>'.&mt('Delete?').'</th>';
Line 757  sub current_file_submissions { Line 758  sub current_file_submissions {
                                  ' value="'.$portfile.'" id="HWFILE'.$jspart.'_'.$id.'_'.$num.'_delete" /></td>'."\n";                                   ' value="'.$portfile.'" id="HWFILE'.$jspart.'_'.$id.'_'.$num.'_delete" /></td>'."\n";
                             $num ++;                              $num ++;
                         }                          }
                         my $showname = $rows{$url}{path}.$name;                          my $pathid = 'HWFILE'.$jspart.'_'.$id.'_'.$num.'_path';
                           my $pathidtext = $pathid.'text';
                           my ($showname,$showpath);
                         if ($legacy{$url}) {                          if ($legacy{$url}) {
                             $showname = $name.' '.&mt('not in portfolio');                              $showname = $name.' '.&mt('not in portfolio');
                           } else {
                               $showname = $name;
                               $showpath = '<br />'. 
                                           '<span id="'.$pathidtext.'" class="LC_cusr_subheading">'.
                                           '<a href="javascript:showPortPath('."'$pathid','$pathidtext'".');" '.
                                           'class="LC_menubuttons_link">'.
                                           &mt('(Show path)').'</a></span>'.
                                           '<div id="'.$pathid.'" class="LC_dccid">'.$rows{$url}{path}.$name.
   '</div>';
                         }                          }
                         $result .=                           $result .= 
                             '<td><a href="'.$link.'"><img src="'.$icon.                              '<td><a href="'.$link.'"><img src="'.$icon.
                             '" border="0" alt="" />'.$showname.'</a></td>'."\n".                              '" border="0" alt="" />'.$showname.'</a>'.$showpath.'</td>'."\n".
                             '<td align="right" valign="bottom">'.$rows{$url}{size}.'</td>'."\n".                              '<td align="right" valign="bottom">'.$rows{$url}{size}.'</td>'."\n".
                             '<td align="right" valign="bottom">'.$rows{$url}{lastmodified}.'</td>'."\n".                              '<td align="right" valign="bottom">'.$rows{$url}{lastmodified}.'</td>'."\n".
                             &Apache::loncommon::end_data_table_row();                              &Apache::loncommon::end_data_table_row();
Line 818  sub current_file_info { Line 830  sub current_file_info {
     return ($status,\%info,$error);      return ($status,\%info,$error);
 }  }
   
   sub portpath_popup_js {
       my %lt = &Apache::lonlocal::texthash(
                                             show => '(Show path)',
                                             hide => '(Hide)',
                                           );
       return <<"END";
   <script type="text/javascript"> 
   // <![CDATA[
   
   function showPortPath(id,idtext) {
       document.getElementById(id).style.display='block';
       document.getElementById(id).style.textAlign='left';
       document.getElementById(id).style.textFace='normal';
       if (document.getElementById(idtext)) {
           document.getElementById(idtext).innerHTML ='<a href="javascript:hidePortPath(\\''+id+'\\',\\''+idtext+'\\'); '+
                                                      '"class="LC_menubuttons_link">$lt{'hide'}</a>&nbsp;';
       }
       return;
   }
   
   function hidePortPath(id,idtext) {
       if (document.getElementById(id)) {
           document.getElementById(id).style.display='none';
       }
       if (document.getElementById(idtext)) {
           document.getElementById(idtext).innerHTML ='<a href="javascript:showPortPath(\\''+id+'\\',\\''+idtext+'\\');" '+
                                                      'class="LC_menubuttons_link">$lt{'show'}</a>';
       }
       return;
   }
   
   // ]]>
   </script>
   
   END
   }
   
 sub valid_award {  sub valid_award {
     my ($award) =@_;      my ($award) =@_;
     foreach my $possibleaward ('EXTRA_ANSWER','MISSING_ANSWER', 'ERROR',      foreach my $possibleaward ('EXTRA_ANSWER','MISSING_ANSWER', 'ERROR',

Removed from v.1.319  
changed lines
  Added in v.1.320


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