version 1.14, 2000/11/27 15:12:42
|
version 1.15, 2000/11/27 16:08:55
|
Line 248 sub handler {
|
Line 248 sub handler {
|
# ---------------------------------------------------------- Anything to store? |
# ---------------------------------------------------------- Anything to store? |
if ($ENV{'form.pres_marker'}) { |
if ($ENV{'form.pres_marker'}) { |
my ($sresid,$spnam,$snum)=split(/\&/,$ENV{'form.pres_marker'}); |
my ($sresid,$spnam,$snum)=split(/\&/,$ENV{'form.pres_marker'}); |
|
$spnam=~s/\_/\./; |
|
# ---------------------------------------------------------- Construct prefixes |
|
|
my $symbparm=$symbp{$sresid}.'.'.$spnam; |
my $symbparm=$symbp{$sresid}.'.'.$spnam; |
my $mapparm=$mapp{$sresid}.'___(all).'.$spnam; |
my $mapparm=$mapp{$sresid}.'___(all).'.$spnam; |
Line 276 sub handler {
|
Line 278 sub handler {
|
if ($snum==6) { $storeunder=$seclevel; } |
if ($snum==6) { $storeunder=$seclevel; } |
if ($snum==5) { $storeunder=$seclevelm; } |
if ($snum==5) { $storeunder=$seclevelm; } |
if ($snum==4) { $storeunder=$seclevelr; } |
if ($snum==4) { $storeunder=$seclevelr; } |
|
$storeunder=&Apache::lonnet::escape($storeunder); |
|
|
|
my $storecontent= |
|
$storeunder.'='.&Apache::lonnet::escape($ENV{'form.pres_value'}).'&'. |
|
$storeunder.'.type='.&Apache::lonnet::escape($ENV{'form.pres_type'}); |
|
|
|
my $reply=''; |
$message.="<h1>Storing $ENV{'form.pres_value'} type $ENV{'form.pres_type'} under $ENV{'form.pres_marker'} in $storeunder</h1>"; |
|
|
|
|
|
# ---------------------------------------------------------- Construct prefixes |
|
if ($snum>3) { |
if ($snum>3) { |
# ---------------------------------------------------------------- Store Course |
# ---------------------------------------------------------------- Store Course |
|
$reply=&Apache::lonnet::critical('put:'. |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.':'. |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}.':resourcedata:'. |
|
$storecontent, |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.home'}); |
} else { |
} else { |
# ------------------------------------------------------------------ Store User |
# ------------------------------------------------------------------ Store User |
} |
$reply= |
} |
&Apache::lonnet::critical('put:'.$udom.':'.$uname.':resourcedata:'. |
|
$storecontent,$uhome); |
|
} |
|
|
|
if ($reply=~/^error\:(.*)/) { |
|
$message.="<h3><font color=red>Write Error: $1</font></h3>"; |
|
} |
|
# ---------------------------------------------------------------- Done storing |
|
} |
# -------------------------------------------------------------- Get coursedata |
# -------------------------------------------------------------- Get coursedata |
my $reply=&Apache::lonnet::reply('dump:'. |
my $reply=&Apache::lonnet::reply('dump:'. |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.':'. |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.':'. |
Line 297 sub handler {
|
Line 312 sub handler {
|
if ($reply!~/^error\:/) { |
if ($reply!~/^error\:/) { |
map { |
map { |
my ($name,$value)=split(/\=/,$_); |
my ($name,$value)=split(/\=/,$_); |
$courseopt{unescape($name)}=unescape($value); |
$courseopt{&Apache::lonnet::unescape($name)}= |
|
&Apache::lonnet::unescape($value); |
} split(/\&/,$reply); |
} split(/\&/,$reply); |
} |
} |
# --------------------------------------------------- Get userdata (if present) |
# --------------------------------------------------- Get userdata (if present) |
Line 307 sub handler {
|
Line 323 sub handler {
|
if ($reply!~/^error\:/) { |
if ($reply!~/^error\:/) { |
map { |
map { |
my ($name,$value)=split(/\=/,$_); |
my ($name,$value)=split(/\=/,$_); |
$useropt{unescape($name)}=unescape($value); |
$useropt{&Apache::lonnet::unescape($name)}= |
|
&Apache::lonnet::unescape($value); |
} split(/\&/,$reply); |
} split(/\&/,$reply); |
} |
} |
} |
} |