Diff for /loncom/interface/londocs.pm between versions 1.180 and 1.182

version 1.180, 2005/06/08 19:36:54 version 1.182, 2005/06/08 21:38:44
Line 1044  sub editor { Line 1044  sub editor {
                 }                  }
 # this is for a course, not a user, so set coursedoc flag  # this is for a course, not a user, so set coursedoc flag
 # probably the only place in the system where this should be "1"  # probably the only place in the system where this should be "1"
               my $newidx=$#Apache::lonratedt::resources+1;  
                 my $newidx=&Apache::lonratedt::getresidx();
               $destination .= $newidx;                $destination .= $newidx;
       my $url=&Apache::lonnet::userfileupload('uploaddoc',1,$destination);        my $url=&Apache::lonnet::userfileupload('uploaddoc',1,$destination);
   
               my $ext='false';                my $ext='false';
               if ($url=~/^http\:\/\//) { $ext='true'; }                if ($url=~/^http\:\/\//) { $ext='true'; }
               $url=~s/\:/\:/g;                $url=~s/\:/\:/g;
Line 1151  sub editor { Line 1153  sub editor {
 # Loading a complete map  # Loading a complete map
    if (($env{'form.importmap'}) && ($env{'form.loadmap'})) {     if (($env{'form.importmap'}) && ($env{'form.loadmap'})) {
        foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$env{'form.importmap'}))) {         foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$env{'form.importmap'}))) {
                    my $idx=$#Apache::lonratedt::resources;     my ($title,$url,$ext,$type)=split(/\:/,$_);
                    $idx++;                     my $idx=&Apache::lonratedt::getresidx($url);
                    $Apache::lonratedt::resources[$idx]=$_;                     $Apache::lonratedt::resources[$idx]=$_;
                    $Apache::lonratedt::order                     $Apache::lonratedt::order
        [$#Apache::lonratedt::order+1]=$idx;         [$#Apache::lonratedt::order+1]=$idx;
Line 1865  sub changewarning { Line 1867  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 name="reinit" method="post" action="/adm/roles" target="loncapaclient">'.
 '<input type="hidden" name="orgurl" value="'.$url.  '<input type="hidden" name="orgurl" value="'.$url.
 '" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.  '" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.
 &mt($message,' <input type="hidden" name="'.  &mt($message,' <input type="hidden" name="'.
Line 2158  ENDNEWSCRIPT Line 2160  ENDNEWSCRIPT
                 'upls' => 'Upload a new supplemental course document',                  'upls' => 'Upload a new supplemental course document',
                 'impp' => 'Import a document',                  'impp' => 'Import a document',
                 'pubd' => 'Published documents',                  'pubd' => 'Published documents',
  'copm' => 'All documents out of a published map',   'copm' => 'All documents out of a published map into this folder',
                 'spec' => 'Special documents',                  'spec' => 'Special documents',
                 'upld' => 'Upload Document',                  'upld' => 'Upload Document',
                 'srch' => 'Search',                  'srch' => 'Search',
Line 2264  ENDCOURSEVERIFY Line 2266  ENDCOURSEVERIFY
 </tr>  </tr>
 <tr><td bgcolor="#DDDDDD">  <tr><td bgcolor="#DDDDDD">
 $lt{'file'}:<br />  $lt{'file'}:<br />
 <form action="/adm/coursedocs" method="post" enctype="multipart/form-data">  <form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data">
 <input type="file" name="uploaddoc" size="40">  <input type="file" name="uploaddoc" size="40">
 <br />  <br />
 $lt{'title'}:<br />  $lt{'title'}:<br />
Line 2288  $help{'Importing_LON-CAPA_Resource'} Line 2290  $help{'Importing_LON-CAPA_Resource'}
 </nobr>  </nobr>
 <p>  <p>
 <hr />  <hr />
 $lt{'copm'}  $lt{'copm'}<br />
 <input type="text" size="20" 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'}">
Line 2404  $uploadtag Line 2406  $uploadtag
 <input name="newaboutsomeone" type="button" value="$lt{'abou'}"   <input name="newaboutsomeone" type="button" value="$lt{'abou'}" 
 onClick="javascript:makeabout();" />  onClick="javascript:makeabout();" />
 </nobr>  </nobr>
   </form>
 ENDFORM  ENDFORM
        }         }
        if ($env{'form.pagepath'}) {         if ($env{'form.pagepath'}) {
Line 2424  $uploadtag Line 2427  $uploadtag
 onClick="javascript:makeexamupload();" />  onClick="javascript:makeexamupload();" />
 $help{'Score_Upload_Form'}  $help{'Score_Upload_Form'}
 </nobr>  </nobr>
   </form>
 ENDBLOCK  ENDBLOCK
            $r->print('</form>');  
        }         }
        $r->print('</td></tr>'."\n".         $r->print('</td></tr>'."\n".
 '</table>');  '</table>');
Line 2514  ENDSUPFORM Line 2517  ENDSUPFORM
        }         }
     }      }
     if ($allowed) {      if ($allowed) {
  $r->print('<form name="extimport"><input type="hidden" name="title"><input type="hidden" name="url"><input type="hidden" name="useform"></form>');   $r->print('<form method="POST" name="extimport" action="/adm/coursedocs"><input type="hidden" name="title" /><input type="hidden" name="url" /><input type="hidden" name="useform" /></form>');
     }      }
     $r->print('</table>');      $r->print('</table>');
   } else {    } else {

Removed from v.1.180  
changed lines
  Added in v.1.182


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