Diff for /loncom/interface/londocs.pm between versions 1.699 and 1.702

version 1.699, 2023/05/22 21:10:55 version 1.702, 2023/07/11 22:24:29
Line 45  use Apache::lontemplate(); Line 45  use Apache::lontemplate();
 use Apache::lonsimplepage();  use Apache::lonsimplepage();
 use Apache::lonhomework();  use Apache::lonhomework();
 use Apache::lonpublisher();  use Apache::lonpublisher();
 use Apache::lonparmset();  
 use Apache::loncourserespicker();  use Apache::loncourserespicker();
 use HTML::Entities;  use HTML::Entities;
 use HTML::TokeParser;  use HTML::TokeParser;
Line 2657  sub url_paste_fixups { Line 2656  sub url_paste_fixups {
                     if ($is_exttool) {                      if ($is_exttool) {
                         $exttoolchg = 1;                          $exttoolchg = 1;
                     }                      }
                 } elsif (($rem =~ m{\d+/ext\.tool$}) &&                  } elsif (($is_exttool) &&
                          ($env{'form.docs.markedcopy_options'} ne 'move')) {                           ($env{'form.docs.markedcopy_options'} ne 'move')) {
                     $dbcopies->{$oldurl}{$id}{'src'} = $ressrc;                      $dbcopies->{$oldurl}{$id}{'src'} = $ressrc;
                     $dbcopies->{$oldurl}{$id}{'cdom'} = $srcdom;                      $dbcopies->{$oldurl}{$id}{'cdom'} = $srcdom;
Line 3754  sub multiple_check_form { Line 3753  sub multiple_check_form {
     return unless (ref($listsref) eq 'HASH');      return unless (ref($listsref) eq 'HASH');
     my $disabled;      my $disabled;
     unless ($canedit) {      unless ($canedit) {
         $disabled = 'disabled="disabled"';           $disabled = ' disabled="disabled"';
     }      }
     my $output =      my $output =
     '<form action="/adm/coursedocs" method="post" name="togglemult'.$caller.'">'.      '<form action="/adm/coursedocs" method="post" name="togglemult'.$caller.'">'.
Line 3792  sub multiple_check_form { Line 3791  sub multiple_check_form {
             '</label></span></td>'."\n".              '</label></span></td>'."\n".
             '<td class="LC_docs_entry_parameter">'.              '<td class="LC_docs_entry_parameter">'.
             '<span class="LC_nobreak LC_docs_copy">'.              '<span class="LC_nobreak LC_docs_copy">'.
             '<label><input type="checkbox" name="copyall" id="copyall" onclick="propagateState(this.form,'."'copy'".')"'. $disabled.' />'.&mt('Copy').              '<label><input type="checkbox" name="copyall" id="copyall" onclick="propagateState(this.form,'."'copy'".')"'.$disabled.' />'.&mt('Copy').
             '</label></span></td>'.              '</label></span></td>'.
             '</tr></table>'."\n";              '</tr></table>'."\n";
     }      }
Line 4555  $form_end; Line 4554  $form_end;
     } else {      } else {
         $reinit = &mt('(re-initialize course to access)');          $reinit = &mt('(re-initialize course to access)');
     }      }
     $line.='<td class="LC_docs_entry_commands"'.$tdalign.'><span class="LC_nobreak">'.$editlink.$renamelink;      $line.='<td class="LC_docs_entry_commands"'.$tdalign.'><span class="LC_nobreak">'.$editlink.$renamelink.'</span>';
     if ($orig_url =~ /$LONCAPA::assess_re/) {      if ($orig_url =~ /$LONCAPA::assess_re/) {
         $line.= '<br />';          $line.= '<br />';
         if ($curralias ne '') {          if ($curralias ne '') {
Line 4566  $form_end; Line 4565  $form_end;
                    $lt{'sa'}.'</a></span>';                     $lt{'sa'}.'</a></span>';
         }          }
     }      }
     $line.='</td><td>';      $line.='</td><td><span class="LC_nobreak">';
     my ($link,$nolink);      my ($link,$nolink);
     if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) {      if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) {
         if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage) {          if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage) {
Line 6234  sub handler { Line 6233  sub handler {
  my $fileupload=(<<FIUP);   my $fileupload=(<<FIUP);
         $quotainfo          $quotainfo
  $lt{'file'}:<br />   $lt{'file'}:<br />
  <input type="file" name="uploaddoc" class="LC_flUpload" size="40" $disabled />  
         <input type="hidden" id="LC_free_space" value="$free_space" />  
 FIUP  FIUP
   
  my $checkbox=(<<CHBO);   my $checkbox=(<<CHBO);
  <!-- <label>$lt{'parse'}?   <!-- <label>$lt{'parse'}?
  <input type="checkbox" name="parserflag" />   <input type="checkbox" name="parserflag" />
Line 6257  CHBO Line 6253  CHBO
         <fieldset id="uploadimsform" style="display: none;">          <fieldset id="uploadimsform" style="display: none;">
         <legend>$lt{'imsf'}</legend>          <legend>$lt{'imsf'}</legend>
         $fileupload          $fileupload
           <input type="file" name="uploaddoc" id="uploaddocims" class="LC_flUpload LC_uploaddoc" size="40" $disabled />
           <input type="hidden" id="LC_free_space_ims" value="$free_space" />
         <br />          <br />
         <p>          <p>
         $lt{'cms'}:&nbsp;           $lt{'cms'}:&nbsp; 
Line 6283  IMSFORM Line 6281  IMSFORM
         <legend>$lt{'upfi'}</legend>          <legend>$lt{'upfi'}</legend>
  <input type="hidden" name="active" value="aa" />   <input type="hidden" name="active" value="aa" />
     $fileupload      $fileupload
           <input type="file" name="uploaddoc" class="LC_flUpload" size="40" $disabled />
           <input type="hidden" id="LC_free_space" value="$free_space" />
  <br />   <br />
  $lt{'title'}:<br />   $lt{'title'}:<br />
  <input type="text" size="60" name="comment" $disabled />   <input type="text" size="60" name="comment" $disabled />
Line 6566  NROSTFORM Line 6566  NROSTFORM
         $help{'Web_Page'}          $help{'Web_Page'}
         </form>          </form>
 NWEBFORM  NWEBFORM
           my $showpath = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
         my @ids=&Apache::lonnet::current_machine_ids();          my @ids=&Apache::lonnet::current_machine_ids();
         my $machines_str = "'".join("','",@ids)."'";          my $machines_str = "'".join("','",@ids)."'";
         my (%is_home,%toppath,$rolehomes);          my (%is_home,%toppath,$rolehomes);
Line 6664  NWEBFORM Line 6664  NWEBFORM
                                                                 "resize_scrollbox('contentscroll','1','0');",                                                                  "resize_scrollbox('contentscroll','1','0');",
                                                                 "toggleExampleText();",'template').'<br />';                                                                  "toggleExampleText();",'template').'<br />';
         my $templatepreview =  '<a href="#" target="sample" onclick="javascript:getExample(600,420,\'yes\',true);  return false;">'.          my $templatepreview =  '<a href="#" target="sample" onclick="javascript:getExample(600,420,\'yes\',true);  return false;">'.
                                '<span id="newresexample">'.&mt('Example').'<span></a>';                                 '<span id="newresexample">'.&mt('Example').'</span></a>';
         my $crsresform=(<<RESFORM);          my $crsresform=(<<RESFORM);
         <a class="LC_menubuttons_link" href="javascript:toggleCrsRes('res');">          <a class="LC_menubuttons_link" href="javascript:toggleCrsRes('res');">
         $lt{'stpr'}</a>$help{'Course_Resource'}          $lt{'stpr'}</a>$help{'Course_Resource'}
Line 6674  NWEBFORM Line 6674  NWEBFORM
         <input type="hidden" name="active" value="bb" />          <input type="hidden" name="active" value="bb" />
         <p>          <p>
         $pickdir          $pickdir
           </p>
         <div id="newstdproblem" style="display:none;">          <div id="newstdproblem" style="display:none;">
           <p>
         <span class="LC_nobreak">$lt{'news'}?&nbsp;          <span class="LC_nobreak">$lt{'news'}?&nbsp;
         <label><input type="radio" name="newsubdir" value="0" onclick="toggleNewsubdir(this.form);" checked="checked" $disabled />No</label>          <label><input type="radio" name="newsubdir" value="0" onclick="toggleNewsubdir(this.form);" checked="checked" $disabled />No</label>
         &nbsp;          &nbsp;
         <label><input type="radio" name="newsubdir" value="1" onclick="toggleNewsubdir(this.form);" $disabled />Yes</label>          <label><input type="radio" name="newsubdir" value="1" onclick="toggleNewsubdir(this.form);" $disabled />Yes</label>
         </span><span id="newsubdir"></span>          </span><span id="newsubdir"></span>
         <input type="hidden" name="newsubdirname" id="newsubdirname" value="" autocomplete="off" />          <input type="hidden" name="newsubdirname" id="newsubdirname" value="" autocomplete="off" />
         </div>  
         </p>          </p>
           </div>
         $lt{'fnam'}          $lt{'fnam'}
         <input type="text" size="20" name="newresourcename" autocomplete="off" $disabled />          <input type="text" size="20" name="newresourcename" autocomplete="off" $disabled />
         <p>  
         <div id="newresource" style="display:none">          <div id="newresource" style="display:none">
           <p>
         $lt{'addp'}          $lt{'addp'}
         <label><input type="radio" name="newresourceadd" value="0" checked="checked" onclick="toggleNewInCourse(this.form);" $disabled />          <label><input type="radio" name="newresourceadd" value="0" checked="checked" onclick="toggleNewInCourse(this.form);" $disabled />
         $lt{'no'}</label>&nbsp;&nbsp;          $lt{'no'}</label>&nbsp;&nbsp;
Line 6694  NWEBFORM Line 6696  NWEBFORM
         $lt{'yes'}</label>          $lt{'yes'}</label>
         <span id="newrestitle"></span>          <span id="newrestitle"></span>
         <input type="hidden" size="20" name="newresourcetitle" id="newresourcetitle" autocomplete="off" $disabled />          <input type="hidden" size="20" name="newresourcetitle" id="newresourcetitle" autocomplete="off" $disabled />
         </div>  
         </p>          </p>
           </div>
         <p>          <p>
         $lt{'uste'}          $lt{'uste'}
         <label><input type="radio" name="newresusetemp" value="0" checked="checked" onclick="toggleWithTemplate(this.form);" $disabled />          <label><input type="radio" name="newresusetemp" value="0" checked="checked" onclick="toggleWithTemplate(this.form);" $disabled />
         $lt{'no'}</label>&nbsp;&nbsp;          $lt{'no'}</label>&nbsp;&nbsp;
         <label><input type="radio" name="newresusetemp" value="1" onclick="toggleWithTemplate(this.form);" $disabled />          <label><input type="radio" name="newresusetemp" value="1" onclick="toggleWithTemplate(this.form);" $disabled />
         $lt{'yes'}</label>          $lt{'yes'}</label>
           </p>
         <div id="newrestemplate" style="display:none">          <div id="newrestemplate" style="display:none">
         $templates          $templates
         $templatepreview          $templatepreview
         </div>          </div>
         </p>  
         <span class="LC_nobreak">          <span class="LC_nobreak">
         <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />          <input type="hidden" name="folderpath" value="$showpath" />
         <input type="submit" name="newcrs" value="$lt{'crpr'}" $disabled />          <input type="submit" name="newcrs" value="$lt{'crpr'}" $disabled />
         </span>          </span>
         </div>  
         <div id="stdprobswitch" style="display:none;">          <div id="stdprobswitch" style="display:none;">
         $rolehomes          $rolehomes
         <input type="button" name="switchfornewprob" value="$lt{'swit'}" onclick="switchForProb();" />          <input type="button" name="switchfornewprob" value="$lt{'swit'}" onclick="switchForProb();" />
Line 6831  my %orderhash = ( Line 6832  my %orderhash = (
                 'aa' => ['Upload',$fileuploadform],                  'aa' => ['Upload',$fileuploadform],
                 'bb' => ['Import',$importpubform],                  'bb' => ['Import',$importpubform],
                 'cc' => ['External',$externalform],                  'cc' => ['External',$externalform],
                 'dd' => ['Grading',$gradingform],                  'dd' => ['Assessment',$gradingform],
                 'ff' => ['Other',$specialdocumentsform],                  'ff' => ['Other',$specialdocumentsform],
                 );                  );
 unless ($container eq 'page') {  unless ($container eq 'page') {
Line 6884  unless ($container eq 'page') { Line 6885  unless ($container eq 'page') {
         <legend>$lt{'upfi'}</legend>          <legend>$lt{'upfi'}</legend>
  <input type="hidden" name="active" value="ee" />   <input type="hidden" name="active" value="ee" />
  $fileupload   $fileupload
           <input type="file" name="uploaddoc" id="uploaddocsupp" class="LC_flUpload LC_uploaddoc" size="40" $disabled />
           <input type="hidden" id="LC_free_space_supp" value="$free_space" />
  <br />   <br />
  <br />   <br />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 6896  unless ($container eq 'page') { Line 6899  unless ($container eq 'page') {
  $pathitem   $pathitem
  <input type="hidden" name="cmd" value="upload_supplemental" />   <input type="hidden" name="cmd" value="upload_supplemental" />
         <input type='submit' value="$lt{'upld'}" />          <input type='submit' value="$lt{'upld'}" />
           </fieldset>
         </form>          </form>
 SUPDOCFORM  SUPDOCFORM
   

Removed from v.1.699  
changed lines
  Added in v.1.702


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