Diff for /loncom/interface/londocs.pm between versions 1.484.2.93.2.18 and 1.484.2.93.2.19

version 1.484.2.93.2.18, 2025/01/17 14:10:05 version 1.484.2.93.2.19, 2025/03/15 03:08:02
Line 716  sub group_import { Line 716  sub group_import {
                 my $marker = $2;                  my $marker = $2;
                 my $info = $3;                  my $info = $3;
                 my ($toolid,$toolprefix,$tooltype,%toolhash,%toolsettings);                  my ($toolid,$toolprefix,$tooltype,%toolhash,%toolsettings);
                 my @extras = ('linktext','explanation','crslabel','crstitle','crsappend');                  my @extras = ('linktext','explanation','crslabel','crstitle','crsappend','returnurl','backtourl');
                 my @toolinfo = split(/:/,$info);                  my @toolinfo = split(/:/,$info);
                 if ($residx) {                  if ($residx) {
                     %toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum);                      %toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum);
Line 733  sub group_import { Line 733  sub group_import {
                 $toolid =~ s/\D//g;                  $toolid =~ s/\D//g;
                 ($toolhash{'target'},$toolhash{'width'},$toolhash{'height'},                  ($toolhash{'target'},$toolhash{'width'},$toolhash{'height'},
                  $toolhash{'linktext'},$toolhash{'explanation'},$toolhash{'crslabel'},                   $toolhash{'linktext'},$toolhash{'explanation'},$toolhash{'crslabel'},
                  $toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'}) = @toolinfo;                   $toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'},
                    $toolhash{'returnurl'},$toolhash{'backtourl'}) = @toolinfo;
                 foreach my $item (@extras) {                  foreach my $item (@extras) {
                     $toolhash{$item} = &unescape($toolhash{$item});                      $toolhash{$item} = &unescape($toolhash{$item});
                 }                  }
Line 820  sub group_import { Line 821  sub group_import {
                                         }                                          }
                                     }                                      }
                                 }                                  }
                                   if ($tools{'crsconf'}{'returnurl'}) {
                                       unless ($toolhash{'returnurl'} eq 'custom') {
                                           delete($toolhash{'backtourl'});
                                       }
                                   } else {
                                       delete($toolhash{'returnurl'});
                                       delete($toolhash{'backtourl'});
                                   }
                             }                              }
                             if ($toolhash{'passback'}) {                              if ($toolhash{'passback'}) {
                                 my $gradesecret = UUID::Tiny::create_uuid_as_string(UUID_V4);                                  my $gradesecret = UUID::Tiny::create_uuid_as_string(UUID_V4);
Line 848  sub group_import { Line 857  sub group_import {
                                     }                                      }
                                 }                                  }
                             }                              }
                               if ($residx) {
                                   if (($toolsettings{'backtourl'} ne '') && (!exists($toolhash{'backtourl'}))) { 
                                       push(@deleted,'backtourl');
                                   }
                                   if (($toolsettings{'returnurl'} ne '') && (!exists($toolhash{'returnurl'}))) {
                                       push(@deleted,'returnurl');
                                   }
                               }
                             my $putres = &Apache::lonnet::put('exttool_'.$marker,\%toolhash,$coursedom,$coursenum);                              my $putres = &Apache::lonnet::put('exttool_'.$marker,\%toolhash,$coursedom,$coursenum);
                             if ($putres eq 'ok') {                              if ($putres eq 'ok') {
                                 if (@deleted) {                                  if (@deleted) {

Removed from v.1.484.2.93.2.18  
changed lines
  Added in v.1.484.2.93.2.19


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