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

version 1.120, 2004/04/26 01:20:17 version 1.121, 2004/04/26 16:56:26
Line 298  sub editor { Line 298  sub editor {
    $r->print('<p><font color="red">'.$errtext.'</font></p>');     $r->print('<p><font color="red">'.$errtext.'</font></p>');
     } else {      } else {
 # ------------------------------------------------------------ Process commands  # ------------------------------------------------------------ Process commands
   
 # ---------------- if they are for this folder and user allowed to make changes  # ---------------- if they are for this folder and user allowed to make changes
  if (($allowed) && ($ENV{'form.folder'} eq $folder)) {   if (($allowed) && ($ENV{'form.folder'} eq $folder)) {
   # set parameters
       if (defined($ENV{'form.setparms'})) {
    my $idx=$ENV{'form.setparms'};
    if ($ENV{'form.randpick_'.$idx}) {
       &Apache::lonratedt::storeparameter($idx,'randompick',$ENV{'form.randpick_'.$idx},'int_pos');
    } else {
       &Apache::lonratedt::delparameter($idx,'randompick');
    }
    if ($ENV{'form.hidprs_'.$idx}) {
       &Apache::lonratedt::storeparameter($idx,'hiddenresource','yes','string_yesno');
    } else {
       &Apache::lonratedt::delparameter($idx,'hiddenresource');
    }
    if ($ENV{'form.encprs_'.$idx}) {
       &Apache::lonratedt::storeparameter($idx,'encrypturl','yes','string_yesno');
    } else {
       &Apache::lonratedt::delparameter($idx,'encrypturl');
    }
   
    ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.sequence');
    if ($fatal) {
       $r->print('<p><font color="red">'.$errtext.'</font></p>');
       return;
    }
       }
 # upload a file, if present  # upload a file, if present
            if (($ENV{'form.uploaddoc.filename'}) &&             if (($ENV{'form.uploaddoc.filename'}) &&
                ($ENV{'form.cmd'}=~/^upload_(\w+)/)) {                 ($ENV{'form.cmd'}=~/^upload_(\w+)/)) {
Line 459  sub entryline { Line 485  sub entryline {
  'rm' => 'Remove',   'rm' => 'Remove',
  'rn' => 'Rename');   'rn' => 'Rename');
  $line.=(<<END);   $line.=(<<END);
 <form name="entry_$index" action="/adm/coursedocs">  <form name="entry_$index" action="/adm/coursedocs" method="post">
 <input type="hidden" name="folderpath" value="$folderpath" />  <input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" />
   <input type="hidden" name="setparms" value="$index" />
 <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 511  END Line 538  END
  $folderpath.=$folderarg.'&'.$foldername;   $folderpath.=$folderarg.'&'.$foldername;
  $url.='folderpath='.&Apache::lonnet::escape($folderpath);   $url.='folderpath='.&Apache::lonnet::escape($folderpath);
  $parameterset=&mt('Randomly Pick: ').   $parameterset=&mt('Randomly Pick: ').
     '<input type="text" size="4" name="randpick_$index" />';      '<input type="text" size="4" name="randpick_'.$index.'" value="'.
       &Apache::lonratedt::getparameter($index,'randompick').'" />';
     }      }
     $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>'.
Line 528  END Line 556  END
 <input type="checkbox" name="encprs_$index" /> $lt{'ec'}</td>  <input type="checkbox" name="encprs_$index" /> $lt{'ec'}</td>
 <td bgcolor="#BBBBFF"><font size="-2">$parameterset</font></td>  <td bgcolor="#BBBBFF"><font size="-2">$parameterset</font></td>
 <td bgcolor="#BBBBFF"><font size='-2'>  <td bgcolor="#BBBBFF"><font size='-2'>
 <a href='javascript:alert("Would be storing $index")'>$lt{'sp'}</a>  <input type="submit" value="$lt{'sp'}" />
 </font></td>  </font></td>
 ENDPARMS  ENDPARMS
     }      }
Line 1105  function removeres(folderpath,index,oldt Line 1133  function removeres(folderpath,index,oldt
         this.document.forms.renameform.submit();          this.document.forms.renameform.submit();
     }      }
 }  }
   
 </script>  </script>
   
 ENDNEWSCRIPT  ENDNEWSCRIPT

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


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