Diff for /loncom/interface/londocs.pm between versions 1.76 and 1.78

version 1.76, 2003/09/08 21:19:44 version 1.78, 2003/09/15 15:24:18
Line 162  sub dumpcourse { Line 162  sub dumpcourse {
  $title=~s/\W//gs;   $title=~s/\W//gs;
  $r->print('<h3>Folder in Construction Space</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');   $r->print('<h3>Folder in Construction Space</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');
  &tiehash();   &tiehash();
    $r->print('<h3>Filenames in Construction Space</h3><table border="2"><tr><th>Internal Filename</th><th>Title</th><th>Save as ...</th></tr>');
  foreach (&Apache::loncreatecourse::crsdirlist($origcrsid,'userfiles')) {   foreach (&Apache::loncreatecourse::crsdirlist($origcrsid,'userfiles')) {
     $r->print("\n<br />".$_.' '.      $r->print('<tr><td>'.$_.'</td>');
   $hash{'title_'.$hash{      my ($ext)=($_=~/\.(\w+)$/);
 'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}}      my $title=$hash{'title_'.$hash{
       );   'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}};
       $r->print('<td>'.($title?$title:'&nbsp;').'</td>');
       unless ($title) {
    $title=$_;
       }
       $title=~s/\.(\w+)$//;
       $title=~s/\W+/\_/gs;
       $title.='.'.$ext;
       $r->print("\n<td><input type='text' size='60' name='".$_."' value='".$title."' /></td></tr>\n");
  }   }
    $r->print("</table>\n");
  &untiehash();   &untiehash();
  $r->print(   $r->print(
   '<input type="submit" name="dumpcourse" value="Dump Course DOCS" /></form>');    '<p><input type="submit" name="dumpcourse" value="Dump Course DOCS" /></p></form>');
     }      }
 }  }
   
Line 658  sub handler { Line 668  sub handler {
        $forcesupplement=($ENV{'form.folder'}=~/^supplemental_/);         $forcesupplement=($ENV{'form.folder'}=~/^supplemental_/);
   
 # does this user have privileges to post, etc?  # does this user have privileges to post, etc?
        $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});         $allowed=&Apache::lonnet::allowed('mdc',$ENV{'request.course.id'});
        if ($allowed) {          if ($allowed) { 
          &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']);           &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']);
          $script=&Apache::lonratedt::editscript('simple');            $script=&Apache::lonratedt::editscript('simple'); 

Removed from v.1.76  
changed lines
  Added in v.1.78


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