Diff for /rat/lonratedt.pm between versions 1.15 and 1.16

version 1.15, 2002/05/13 21:26:05 version 1.16, 2002/05/14 15:19:13
Line 126  sub mapread { Line 126  sub mapread {
     return $errtext;      return $errtext;
 }  }
   
   # ---------------------------------------------- Read a map as well as possible
   
   sub attemptread {
       my $fn=shift;
   
       my @links;
       undef @links;
       my @theseres;
       undef @theseres;
   
       my ($outtext,$errtext)=&Apache::lonratsrv::loadmap($fn,'');
       if ($errtext) { return @theseres }
   
   # -------------------------------------------------------------------- Read map
       foreach (split(/\<\&\>/,$outtext)) {
    my ($command,$number,$content)=split(/\<\:\>/,$_);
           if ($command eq 'objcont') {
       $theseres[$number]=$content;
           }
           if ($command eq 'objlinks') {
               $links[$number]=$content;
           }
       }
   
   # --------------------------------------------------------------- Sort, sort of
   
       my $startidx=0;
       my $endidx=0;
       for (my $i=0; $i<=$#theseres; $i++) {
           if (defined($theseres[$i])) {
               my ($title,$url,$ext,$type)=split(/\:/,$theseres[$i]);
       if ($type eq 'start') { $startidx=$i; }
               if ($type eq 'finish') { $endidx=$i; }
           }
       }
   
   
       return @theseres;
   
   }
   
   
 # --------------------------------------------------------- Build up RAT screen  # --------------------------------------------------------- Build up RAT screen
 sub ratedt {  sub ratedt {
   my ($r,$url)=@_;    my ($r,$url)=@_;
Line 193  sub smpedt { Line 235  sub smpedt {
    my $importdetail=$ENV{'form.curimpdetail'};     my $importdetail=$ENV{'form.curimpdetail'};
   
 # ---------------------------------------------------- Importing from groupsort  # ---------------------------------------------------- Importing from groupsort
    if ($ENV{'form.importdetail'}) {     if (($ENV{'form.importdetail'}) && (!$ENV{'form.impfortarget'})) {
   
        $importdetail='';         $importdetail='';
        my @curimport=split(/\&/,$ENV{'form.curimpdetail'});         my @curimport=split(/\&/,$ENV{'form.curimpdetail'});
Line 401  value="Browse"><input type=submit name=l Line 443  value="Browse"><input type=submit name=l
 <input type=submit name="discard" value="Discard Selected">  <input type=submit name="discard" value="Discard Selected">
 <input type=submit name="clear" value="Clear All">  <input type=submit name="clear" value="Clear All">
 <input type=button onClick="javascript:viewimport()" value="View">  <input type=button onClick="javascript:viewimport()" value="View">
   
     </td><td>&nbsp;</td><td bgcolor="#FFFFCC">      </td><td>&nbsp;</td><td bgcolor="#FFFFCC">
 <input type=button onClick="javascript:viewtarget()" value="View">  
   <input type=button onClick=
   "javascript:impfortarget.value=1;groupsearch()" value="Group Search">
   <input type=button onClick=
   "javascript:impfortarget.value=1;groupimport();" value="Group Import">
   after selected
   <hr><input type=button onClick="javascript:viewtarget()" value="View">
 </td></tr>  </td></tr>
   
 <tr><td bgcolor="#FFFFCC"><select name="import" multiple>  <tr><td bgcolor="#FFFFCC"><select name="import" multiple>
 $importwindow  $importwindow
 </select>  </select>
Line 422  $targetwindow Line 472  $targetwindow
 <input type=hidden name=importdetail value="">  <input type=hidden name=importdetail value="">
 <input type=hidden name=curimpdetail value="$importdetail">  <input type=hidden name=curimpdetail value="$importdetail">
 <input type=hidden name=targetdetail value="$targetdetail">  <input type=hidden name=targetdetail value="$targetdetail">
   <input type=hidden name=impfortarget value="0">
 </form>  </form>
 </body></html>  </body></html>
 ENDSMPHEAD  ENDSMPHEAD

Removed from v.1.15  
changed lines
  Added in v.1.16


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