--- loncom/html/adm/helper/newslot.helper 2005/11/18 16:26:57 1.9 +++ loncom/html/adm/helper/newslot.helper 2005/11/18 16:51:13 1.10 @@ -7,6 +7,8 @@ if (exists($env{'form.name'}) || $env{'form.name'} =~ /\S/) { $helper->{'VARS'}{'name'}=$env{'form.name'}; + $helper->{VARS}{'origname'}=$env{'form.name'}; + $helper->{DATA}{copy} = 1; } } $helper->{DATA}{origslot} = sub { @@ -17,7 +19,7 @@ } my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; - my $name=$helper->{'VARS'}{'name'}; + my $name=$helper->{VARS}{'origname'}; my %slot=&Apache::lonnet::get('slots', [$name], $cdom, $cnum); if (!ref($slot{$name})) { return $default; } if (!exists($slot{$name}{$which})) { return $default; } @@ -27,7 +29,7 @@ Name:
    -
+
@@ -40,6 +42,14 @@ return $helper->{'VARS'}{'name'}; + + $helper->{DATA}{copy} + + +

Changing the Name will create a new slot with the new name, and not rename the existing slot.

+
+
+

Start time: