Diff for /loncom/interface/londocs.pm between versions 1.116 and 1.120

version 1.116, 2004/04/07 22:32:18 version 1.120, 2004/04/26 01:20:17
Line 273  sub breadcrumbs { Line 273  sub breadcrumbs {
     &Apache::lonhtmlcommon::add_breadcrumb(      &Apache::lonhtmlcommon::add_breadcrumb(
       {'href'=>$url,        {'href'=>$url,
        'title'=>&Apache::lonnet::unescape($foldername),         'title'=>&Apache::lonnet::unescape($foldername),
        'text'=>&Apache::lonnet::unescape($foldername)});         'text'=>'<font size="+1">'.
      &Apache::lonnet::unescape($foldername).'</font>'
          });
                 
       
     }      }
Line 445  sub entryline { Line 447  sub entryline {
     $renametitle=~s/\&quot\;/\\\"/g;      $renametitle=~s/\&quot\;/\\\"/g;
     my $line='<tr>';      my $line='<tr>';
 # Edit commands  # Edit commands
       my $folderpath;
       if ($ENV{'form.folderpath'}) {
    $folderpath=&Apache::lonnet::escape($ENV{'form.folderpath'});
    # $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"');
       }
     if ($allowed) {      if ($allowed) {
  my %lt=('up' => 'Move Up',   my %lt=&Apache::lonlocal::texthash(
                   'up' => 'Move Up',
  'dw' => 'Move Down',   'dw' => 'Move Down',
  'rm' => 'Remove',   'rm' => 'Remove',
  'rn' => 'Rename');   'rn' => 'Rename');
  my $folderpath;  
  if ($ENV{'form.folderpath'}) {  
     $folderpath=&Apache::lonnet::escape($ENV{'form.folderpath'});  
    # $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"');  
  }  
  $line.=(<<END);   $line.=(<<END);
   <form name="entry_$index" action="/adm/coursedocs">
   <input type="hidden" name="folderpath" value="$folderpath" />
 <td><table border='0' cellspacing='2' cellpadding='0'>  <td><table border='0' cellspacing='2' cellpadding='0'>
 <tr><td bgcolor="#DDDDDD">  <tr><td bgcolor="#DDDDDD">
 <a href='/adm/coursedocs?cmd=up_$index&folderpath=$folderpath'>  <a href='/adm/coursedocs?cmd=up_$index&folderpath=$folderpath'>
Line 483  END Line 488  END
           $url='/adm/coursedocs?';            $url='/adm/coursedocs?';
   $folderarg=$1;    $folderarg=$1;
           $isfolder=1;            $isfolder=1;
        } else {         }
   $url=&Apache::lonnet::tokenwrapper($url);  
        }   
     }      }
     $url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//;      $url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//;
     if ((!$isfolder) && ($residx) && ($folder!~/supplemental/)) {      if ((!$isfolder) && ($residx) && ($folder!~/supplemental/)) {
Line 500  END Line 503  END
  $url=&Apache::lonnet::clutter($url);   $url=&Apache::lonnet::clutter($url);
  $url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb);   $url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb);
     }      }
       my $parameterset='&nbsp;';
     if ($isfolder) {      if ($isfolder) {
  my $foldername=&Apache::lonnet::escape($foldertitle);   my $foldername=&Apache::lonnet::escape($foldertitle);
  my $folderpath=$ENV{'form.folderpath'};   my $folderpath=$ENV{'form.folderpath'};
  if ($folderpath) { $folderpath.='&' };   if ($folderpath) { $folderpath.='&' };
  $folderpath.=$folderarg.'&'.$foldername;   $folderpath.=$folderarg.'&'.$foldername;
  $url.='folderpath='.&Apache::lonnet::escape($folderpath);   $url.='folderpath='.&Apache::lonnet::escape($folderpath);
    $parameterset=&mt('Randomly Pick: ').
       '<input type="text" size="4" name="randpick_$index" />';
     }      }
     $line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon.      $line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon.
  '" border="0"></a></td>'.   '" border="0"></a></td>'.
         "<td bgcolor='#FFFFBB'><a href='$url'>$title</a></td></tr>";          "<td bgcolor='#FFFFBB'><a href='$url'>$title</a></td>";
       if (($allowed) && ($folder!~/^supplemental/)) {
     my %lt=&Apache::lonlocal::texthash(
          'hd' => 'Hidden',
          'ec' => 'URL hidden',
          'sp' => 'Store Parameters');
    $line.=(<<ENDPARMS);
   <td bgcolor="#BBBBFF"><font size='-2'>
   <input type="checkbox" name="hidprs_$index" /> $lt{'hd'}</td>
   <td bgcolor="#BBBBFF"><font size='-2'>
   <input type="checkbox" name="encprs_$index" /> $lt{'ec'}</td>
   <td bgcolor="#BBBBFF"><font size="-2">$parameterset</font></td>
   <td bgcolor="#BBBBFF"><font size='-2'>
   <a href='javascript:alert("Would be storing $index")'>$lt{'sp'}</a>
   </font></td>
   ENDPARMS
       }
       $line.="</form></tr>";
     return $line;      return $line;
 }  }
   
Line 874  sub changewarning { Line 897  sub changewarning {
     $r->print(      $r->print(
 '<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'.   '<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. 
 '<form method="post" action="/adm/roles" target="loncapaclient">'.  '<form method="post" action="/adm/roles" target="loncapaclient">'.
 '<input type="hidden" name="orgurl" value="/adm/coursedocs" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.  '<input type="hidden" name="orgurl" value="/adm/coursedocs?folderpath='.
   &Apache::lonnet::escape($ENV{'form.folderpath'}).
   '" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.
 &mt('Changes will become active for your current session after').  &mt('Changes will become active for your current session after').
 ' <input type="hidden" name="'.  ' <input type="hidden" name="'.
 $ENV{'request.role'}.'" value="1" /><input type="button" value="'.  $ENV{'request.role'}.'" value="1" /><input type="button" value="'.
Line 1124  ENDNEWSCRIPT Line 1149  ENDNEWSCRIPT
  'vc' => 'Verify Content',   'vc' => 'Verify Content',
  'cv' => 'Check/Set Resource Versions',   'cv' => 'Check/Set Resource Versions',
   );    );
   
          my $folderpath=$ENV{'form.folderpath'};
          if (!$folderpath) {
      if ($ENV{'form.folder'} eq '' ||
          $ENV{'form.folder'} eq 'supplemental') {
          $folderpath='default&'.
      &Apache::lonnet::escape(&mt('Main Course Documents'));
      }
          }
        $r->print(<<ENDCOURSEVERIFY);         $r->print(<<ENDCOURSEVERIFY);
 <form name="renameform" method="post" action="/adm/coursedocs">  <form name="renameform" method="post" action="/adm/coursedocs">
 <input type="hidden" name="title" />  <input type="hidden" name="title" />
Line 1132  ENDNEWSCRIPT Line 1166  ENDNEWSCRIPT
 </form>  </form>
 <form name="simpleedit" method="post" action="/adm/coursedocs">  <form name="simpleedit" method="post" action="/adm/coursedocs">
 <input type=hidden name="importdetail" value="">  <input type=hidden name="importdetail" value="">
 <input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" />  <input type="hidden" name="folderpath" value="$folderpath" />
 </form>  </form>
 <form action="/adm/coursedocs" method="post" name="courseverify">  <form action="/adm/coursedocs" method="post" name="courseverify">
 <table bgcolor="#AAAAAA" width="100%" cellspacing="4" cellpadding="4">  <table bgcolor="#AAAAAA" width="100%" cellspacing="4" cellpadding="4">
Line 1148  ENDCOURSEVERIFY Line 1182  ENDCOURSEVERIFY
      &mt('Editing the Table of Contents for your Course')));       &mt('Editing the Table of Contents for your Course')));
     }      }
 # --------------------------------------------------------- Standard documents  # --------------------------------------------------------- Standard documents
     #my $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"');  
     $r->print('<table border=2 cellspacing=4 cellpadding=4>');      $r->print('<table border=2 cellspacing=4 cellpadding=4>');
     if (($standard) && ($allowed) && (!$forcesupplement)) {      if (($standard) && ($allowed) && (!$forcesupplement)) {
  $r->print('<tr><td bgcolor="#BBBBBB">');   $r->print('<tr><td bgcolor="#BBBBBB">');
 #  '<h2>'.&mt('Main Course Documents').  #  '<h2>'.&mt('Main Course Documents').
 #  ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>');  #  ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>');
        my $folder=$ENV{'form.folder'};         my $folder=$ENV{'form.folder'};
        if ($folder eq '') {         if ($folder eq '' || $folder eq 'supplemental') {
            $folder='default';             $folder='default';
    $ENV{'form.folderpath'}='default&'.&Apache::lonnet::escape(&mt('Main Course Documents'));     $ENV{'form.folderpath'}='default&'.&Apache::lonnet::escape(&mt('Main Course Documents'));
        }         }
Line 1163  ENDCOURSEVERIFY Line 1196  ENDCOURSEVERIFY
        if ($folder eq 'default') {         if ($folder eq 'default') {
    $r->print('<script>this.window.name="loncapaclient";</script>');     $r->print('<script>this.window.name="loncapaclient";</script>');
        } else {         } else {
            $postexec='self.close();';             #$postexec='self.close();';
        }         }
        $hadchanges=0;         $hadchanges=0;
        &editor($r,$coursenum,$coursedom,$folder,$allowed);         &editor($r,$coursenum,$coursedom,$folder,$allowed);
Line 1298  onClick="javascript:makeabout();" /> Line 1331  onClick="javascript:makeabout();" />
 </nobr>  </nobr>
 </form>  </form>
 <form action="/adm/imsimportdocs" method="post" name="ims">  <form action="/adm/imsimportdocs" method="post" name="ims">
 <input type="hidden" name="folder" value="$ENV{'form.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>  </nobr>
 </form>  </form>
Line 1313  ENDFORM Line 1346  ENDFORM
 # '<h2>'.&mt('Supplemental Course Documents').  # '<h2>'.&mt('Supplemental Course Documents').
 #  ($allowed?' '.$help{'Supplemental'}:'').'</h2>');  #  ($allowed?' '.$help{'Supplemental'}:'').'</h2>');
        my $folder=$ENV{'form.folder'};         my $folder=$ENV{'form.folder'};
        unless ($folder=~/supplemental/) {         unless ($folder=~/^supplemental/) {
    $folder='supplemental';     $folder='supplemental';
    $ENV{'form.folderpath'}='supplemental&'.&Apache::lonnet::escape(&mt('Supplemental Course Documents'));;         }
          if ($folder =~ /^supplemental$/ &&
      $ENV{'form.folderpath'} =~ /^default\&/) {
      $ENV{'form.folderpath'}='supplemental&'.
          &Apache::lonnet::escape(&mt('Supplemental Course Documents'));
        }         }
        &editor($r,$coursenum,$coursedom,$folder,$allowed);         &editor($r,$coursenum,$coursedom,$folder,$allowed);
        if ($allowed) {         if ($allowed) {

Removed from v.1.116  
changed lines
  Added in v.1.120


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