Diff for /loncom/interface/londocs.pm between versions 1.103 and 1.104

version 1.103, 2004/02/05 15:19:41 version 1.104, 2004/02/11 00:10:01
Line 68  sub mapread { Line 68  sub mapread {
   
 sub storemap {  sub storemap {
     my ($coursenum,$coursedom,$map)=@_;      my ($coursenum,$coursedom,$map)=@_;
     $hadchanges=1;      my ($outtext,$errtext)=
     return  
       &Apache::lonratedt::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'.        &Apache::lonratedt::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'.
                                 $map,1);                                  $map,1);
       if ($errtext) { return ($errtext,2); }
       
       $hadchanges=1;
       return ($errtext,0);
 }  }
   
 # ----------------------------------------- Return hash with valid author names  # ----------------------------------------- Return hash with valid author names
Line 250  sub group_import { Line 253  sub group_import {
  join ':', ($name, $url, $ext, 'normal', 'res');   join ':', ($name, $url, $ext, 'normal', 'res');
  }   }
     }      }
     &storemap($coursenum, $coursedom, $folder.'.sequence');      return &storemap($coursenum, $coursedom, $folder.'.sequence');
 }  }
   
 sub editor {  sub editor {
Line 295  sub editor { Line 298  sub editor {
                   $comment.':'.$url.':'.$ext.':normal:res';                    $comment.':'.$url.':'.$ext.':normal:res';
               $Apache::lonratedt::order[$#Apache::lonratedt::order+1]=                $Apache::lonratedt::order[$#Apache::lonratedt::order+1]=
                                                               $newidx;                                                                       $newidx;       
        &storemap($coursenum,$coursedom,$folder.'.sequence');  
         ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.sequence');
         if ($fatal) {
     $r->print('<p><font color="red">'.$errtext.'</font></p>');
     return;
         }
      }       }
             }              }
     if ($ENV{'form.cmd'}) {      if ($ENV{'form.cmd'}) {
Line 335  sub editor { Line 343  sub editor {
                                           
                 }                  }
 # Store the changed version  # Store the changed version
  &storemap($coursenum,$coursedom,$folder.'.sequence');   ($errtext,$fatal)=&storemap($coursenum,$coursedom,
       $folder.'.sequence');
    if ($fatal) {
       $r->print('<p><font color="red">'.$errtext.'</font></p>');
       return;
    }
             }              }
 # Group import/search  # Group import/search
     if ($ENV{'form.importdetail'}) {      if ($ENV{'form.importdetail'}) {
Line 349  sub editor { Line 362  sub editor {
     }      }
  }   }
 # Store the changed version  # Store the changed version
  group_import($coursenum, $coursedom, $folder, @imports);   ($errtext,$fatal)=group_import($coursenum, $coursedom, $folder,
          @imports);
    if ($fatal) {
       $r->print('<p><font color="red">'.$errtext.'</font></p>');
       return;
    }
             }              }
 # Loading a complete map  # Loading a complete map
    if (($ENV{'form.importmap'}) && ($ENV{'form.loadmap'})) {     if (($ENV{'form.importmap'}) && ($ENV{'form.loadmap'})) {
               foreach         foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$ENV{'form.importmap'}))) {
 (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$ENV{'form.importmap'}))) {  
                    my $idx=$#Apache::lonratedt::resources;                     my $idx=$#Apache::lonratedt::resources;
                    $idx++;                     $idx++;
                    $Apache::lonratedt::resources[$idx]=$_;                     $Apache::lonratedt::resources[$idx]=$_;
                    $Apache::lonratedt::order                     $Apache::lonratedt::order
                             [$#Apache::lonratedt::order+1]=$idx;         [$#Apache::lonratedt::order+1]=$idx;
                 }         }
   
 # Store the changed version  # Store the changed version
  &storemap($coursenum,$coursedom,$folder.'.sequence');         ($errtext,$fatal)=&storemap($coursenum,$coursedom,
      $folder.'.sequence');
          if ($fatal) {
      $r->print('<p><font color="red">'.$errtext.'</font></p>');
      return;
          }
            }             }
        }         }
 # ---------------------------------------------------------------- End commands  # ---------------------------------------------------------------- End commands

Removed from v.1.103  
changed lines
  Added in v.1.104


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