Diff for /loncom/interface/londocs.pm between versions 1.281 and 1.282

version 1.281, 2007/06/29 23:25:30 version 1.282, 2007/07/02 23:43:36
Line 379  sub exportcourse { Line 379  sub exportcourse {
                 }                  }
                 $display .= ' />'."\n";                  $display .= ' />'."\n";
                 for (my $i=0; $i<$depth; $i++) {                  for (my $i=0; $i<$depth; $i++) {
                     $display .= '<img src="/adm/lonIcons/whitespace1.gif" width="25" height="1" alt="" border="0" /><img src="/adm/lonIcons/whitespace1.gif" width="25" height="1" alt="" border="0" />'."\n";                      $display .= '<img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" /><img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" />'."\n";
                 }                  }
                 if ($curRes->is_sequence()) {                  if ($curRes->is_sequence()) {
                     $display .= '<img src="/adm/lonIcons/navmap.folder.open.gif">&nbsp;'."\n";                      $display .= '<img src="/adm/lonIcons/navmap.folder.open.gif">&nbsp;'."\n";
Line 1577  sub process_file_upload { Line 1577  sub process_file_upload {
                 if ($total_embedded > 0) {                  if ($total_embedded > 0) {
                     my $num = 0;                      my $num = 0;
     my $state = '      my $state = '
    <input type="hidden" name="folderpath" value="'.$env{'form.folderpath'}.'" />     <input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />
    <input type="hidden" name="cmd" value="upload_embedded" />     <input type="hidden" name="cmd" value="upload_embedded" />
    <input type="hidden" name="newidx" value="'.$newidx.'" />     <input type="hidden" name="newidx" value="'.$newidx.'" />
    <input type="hidden" name="primaryurl" value="'.&escape($url).'" />     <input type="hidden" name="primaryurl" value="'.&escape($url).'" />
Line 1720  sub entryline { Line 1720  sub entryline {
     if ($env{'form.folderpath'}) {      if ($env{'form.folderpath'}) {
  $type = 'folder';   $type = 'folder';
         $container = 'sequence';          $container = 'sequence';
  $esc_path=&escape($path = $env{'form.folderpath'});   $esc_path=&escape($env{'form.folderpath'});
    $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
  # $htmlfoldername=&HTML::Entities::encode($env{'form.foldername'},'<>&"');   # $htmlfoldername=&HTML::Entities::encode($env{'form.foldername'},'<>&"');
     }      }
     if ($env{'form.pagepath'}) {      if ($env{'form.pagepath'}) {
         $type = $container = 'page';          $type = $container = 'page';
         $esc_path=&escape($path = $env{'form.pagepath'});          $esc_path=&escape($path = $env{'form.pagepath'});
    $path = &HTML::Entities::encode($env{'form.pagepath'},'<>&"');
         $symb=&escape($env{'form.pagesymb'});          $symb=&escape($env{'form.pagesymb'});
     }      }
     my $cpinfo='';      my $cpinfo='';
Line 1799  ENDCUT Line 1801  ENDCUT
    <table border='0' cellspacing='2' cellpadding='0'>     <table border='0' cellspacing='2' cellpadding='0'>
       <tr>        <tr>
          <td bgcolor="#DDDDDD">           <td bgcolor="#DDDDDD">
             <a href='/adm/coursedocs?cmd=up_$index&${type}path=$esc_path&${type}symb=$symb$cpinfo'><img src="${iconpath}move_up.gif" alt='$lt{'up'}' border='0' /></a>              <a href='/adm/coursedocs?cmd=up_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'><img src="${iconpath}move_up.gif" alt='$lt{'up'}' class="LC_icon" /></a>
          </td>           </td>
       </tr>        </tr>
       <tr>        <tr>
         <td bgcolor="#DDDDDD">          <td bgcolor="#DDDDDD">
            <a href='/adm/coursedocs?cmd=down_$index&${type}path=$esc_path&${type}symb=$symb$cpinfo'><img src="${iconpath}move_down.gif" alt='$lt{'dw'}' border='0' /></a>             <a href='/adm/coursedocs?cmd=down_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'><img src="${iconpath}move_down.gif" alt='$lt{'dw'}' class="LC_icon" /></a>
         </td>          </td>
       </tr>        </tr>
     </table>      </table>
Line 1921  END Line 1923  END
        $path.$pagearg.'.page');         $path.$pagearg.'.page');
  }   }
  $url.='pagepath='.&escape($pagepath).   $url.='pagepath='.&escape($pagepath).
     '&pagesymb='.&escape($symb).$cpinfo;      '&amp;pagesymb='.&escape($symb).$cpinfo;
     }      }
     $line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon.      $line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon.
  '" border="0"></a></td>'.   '" class="LC_icon" /></a></td>'.
         "<td bgcolor='#FFFFBB'>".($url?"<a href=\"$url\">":'').$title.          "<td bgcolor='#FFFFBB'>".($url?"<a href=\"$url\">":'').$title.
         ($url?'</a>':' <font size="-2">'.&mt('(re-initialize course to access)').'</font>')."</td>";          ($url?'</a>':' <font size="-2">'.&mt('(re-initialize course to access)').'</font>')."</td>";
     if (($allowed) && ($folder!~/^supplemental/)) {      if (($allowed) && ($folder!~/^supplemental/)) {
Line 2492  sub handler { Line 2494  sub handler {
         $env{'form.folder'}=pop(@pagepath);          $env{'form.folder'}=pop(@pagepath);
         $containertag = '<input type="hidden" name="pagepath" value="" />'.          $containertag = '<input type="hidden" name="pagepath" value="" />'.
     '<input type="hidden" name="pagesymb" value="" />';      '<input type="hidden" name="pagesymb" value="" />';
         $uploadtag = '<input type="hidden" name="pagepath" value="'.$env{'form.pagepath'}.'" />'.          $uploadtag = '<input type="hidden" name="pagepath" value="'.&HTML::Entities::encode($env{'form.pagepath'},'<>&"').'" />'.
     '<input type="hidden" name="pagesymb" value="'.$env{'form.pagesymb'}.'" />';      '<input type="hidden" name="pagesymb" value="'.&HTML::Entities::encode($env{'form.pagesymb'},'<>&"').'" />';
     }      }
     if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) {      if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) {
        $showdoc='/'.$1;         $showdoc='/'.$1;
Line 2675  sub handler { Line 2677  sub handler {
        }         }
        unless ($env{'form.pagepath'}) {         unless ($env{'form.pagepath'}) {
            $containertag = '<input type="hidden" name="folderpath" value="" />';             $containertag = '<input type="hidden" name="folderpath" value="" />';
            $uploadtag = '<input type="hidden" name="folderpath" value="'.$folderpath.'" />';             $uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />';
        }         }
   
        $r->print(<<ENDCOURSEVERIFY);         $r->print(<<ENDCOURSEVERIFY);
Line 2785  $help{'Importing_LON-CAPA_Resource'} Line 2787  $help{'Importing_LON-CAPA_Resource'}
 <p>  <p>
 <hr />  <hr />
 $lt{'copm'}<br />  $lt{'copm'}<br />
 <input type="text" size="40" name="importmap"><br />  <input type="text" size="40" name="importmap" /><br />
 <nobr><input type=button   <nobr><input type=button 
 onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')"  onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')"
 value="$lt{'selm'}"> <input type="submit" name="loadmap" value="$lt{'load'}">  value="$lt{'selm'}" /> <input type="submit" name="loadmap" value="$lt{'load'}" />
 $help{'Load_Map'}</nobr>  $help{'Load_Map'}</nobr>
 </p>  </p>
 </form>  </form>
Line 2811  value="$lt{'extr'}" /> $help{'Adding_Ext Line 2813  value="$lt{'extr'}" /> $help{'Adding_Ext
 <br /><form action="/adm/imsimportdocs" method="post" name="ims">  <br /><form action="/adm/imsimportdocs" method="post" name="ims">
 <input type="hidden" name="folder" value="$folder" />  <input type="hidden" name="folder" value="$folder" />
 <input name="imsimport" type="button" value="$lt{'imsf'}" onClick="javascript:makeims();" />  <input name="imsimport" type="button" value="$lt{'imsf'}" onClick="javascript:makeims();" />
 </nobr>  
 </form>  </form>
 ENDFORM  ENDFORM
        }         }
        $r->print('</td><td bgcolor="#DDDDDD">');         $r->print('</td><td bgcolor="#DDDDDD">');
        unless ($env{'form.pagepath'}) {         unless ($env{'form.pagepath'}) {
      my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
            $r->print(<<ENDFORM);             $r->print(<<ENDFORM);
 <br /><form action="/adm/coursedocs" method="post" name="newfolder">  <br /><form action="/adm/coursedocs" method="post" name="newfolder">
 <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$path" />
 <input type="hidden" name="importdetail" value="" />  <input type="hidden" name="importdetail" value="" />
 <nobr>  <nobr>
 <input name="newfolder" type="button"  <input name="newfolder" type="button"
Line 2828  value="$lt{'newf'}" />$help{'Adding_Fold Line 2830  value="$lt{'newf'}" />$help{'Adding_Fold
 </nobr>  </nobr>
 </form>  </form>
 <br /><form action="/adm/coursedocs" method="post" name="newpage">  <br /><form action="/adm/coursedocs" method="post" name="newpage">
 <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$path" />
 <input type="hidden" name="importdetail" value="" />  <input type="hidden" name="importdetail" value="" />
 <nobr>  <nobr>
 <input name="newpage" type="button"  <input name="newpage" type="button"
Line 2965  ENDBLOCK Line 2967  ENDBLOCK
        }         }
        &editor($r,$coursenum,$coursedom,$folder,$allowed);         &editor($r,$coursenum,$coursedom,$folder,$allowed);
        if ($allowed) {         if ($allowed) {
        my $folderseq=     my $folderseq=
                   '/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time.         '/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time.
                      '.sequence';         '.sequence';
   
           $r->print(<<ENDSUPFORM);     my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
      $r->print(<<ENDSUPFORM);
 <table cellspacing=4 cellpadding=4><tr>  <table cellspacing=4 cellpadding=4><tr>
 <th bgcolor="#DDDDDD">$lt{'upls'}</th>  <th bgcolor="#DDDDDD">$lt{'upls'}</th>
 <th bgcolor="#DDDDDD">$lt{'spec'}</th>  <th bgcolor="#DDDDDD">$lt{'spec'}</th>
Line 2989  $lt{'comment'}:<br /> Line 2992  $lt{'comment'}:<br />
 <textarea cols=50 rows=4 name='comment'>  <textarea cols=50 rows=4 name='comment'>
 </textarea>  </textarea>
 <br />  <br />
 <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$path" />
 <input type="hidden" name="cmd" value="upload_supplemental">  <input type="hidden" name="cmd" value="upload_supplemental">
 <nobr>  <nobr>
 <input type="submit" value="$lt{'upld'}">  <input type="submit" value="$lt{'upld'}">
Line 2999  $lt{'comment'}:<br /> Line 3002  $lt{'comment'}:<br />
 </td>  </td>
 <td bgcolor="#DDDDDD">  <td bgcolor="#DDDDDD">
 <form action="/adm/coursedocs" method="post" name="supnewfolder">  <form action="/adm/coursedocs" method="post" name="supnewfolder">
 <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$path" />
 <input type="hidden" name="importdetail" value="" />  <input type="hidden" name="importdetail" value="" />
 <nobr>  <nobr>
 <input name="newfolder" type="button"  <input name="newfolder" type="button"
Line 3008  value="$lt{'newf'}" /> $help{'Adding_Fol Line 3011  value="$lt{'newf'}" /> $help{'Adding_Fol
 </nobr>  </nobr>
 </form>  </form>
 <br /><form action="/adm/coursedocs" method="post" name="supnewext">  <br /><form action="/adm/coursedocs" method="post" name="supnewext">
 <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$path" />
 <input type="hidden" name="importdetail" value="" />  <input type="hidden" name="importdetail" value="" />
 <nobr>  <nobr>
 <input name="newext" type="button"   <input name="newext" type="button" 
Line 3017  value="$lt{'extr'}" /> $help{'Adding_Ext Line 3020  value="$lt{'extr'}" /> $help{'Adding_Ext
 </nobr>  </nobr>
 </form>  </form>
 <br /><form action="/adm/coursedocs" method="post" name="supnewsyl">  <br /><form action="/adm/coursedocs" method="post" name="supnewsyl">
 <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$path" />
 <input type="hidden" name="importdetail"   <input type="hidden" name="importdetail" 
 value="Syllabus=/public/$coursedom/$coursenum/syllabus" />  value="Syllabus=/public/$coursedom/$coursenum/syllabus" />
 <nobr>  <nobr>
Line 3026  $help{'Syllabus'} Line 3029  $help{'Syllabus'}
 </nobr>  </nobr>
 </form>  </form>
 <br /><form action="/adm/coursedocs" method="post" name="subnewaboutme">  <br /><form action="/adm/coursedocs" method="post" name="subnewaboutme">
 <input type="hidden" name="folderpath" value="$env{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$path" />
 <input type="hidden" name="importdetail"   <input type="hidden" name="importdetail" 
 value="$plainname=/adm/$udom/$uname/aboutme" />  value="$plainname=/adm/$udom/$uname/aboutme" />
 <nobr>  <nobr>

Removed from v.1.281  
changed lines
  Added in v.1.282


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