version 1.25, 2009/08/17 19:46:49
|
version 1.26, 2009/09/24 00:50:03
|
Line 40 use LONCAPA;
|
Line 40 use LONCAPA;
|
|
|
my %qparms; |
my %qparms; |
my $prefix; |
my $prefix; |
|
my $weightprefix; |
my $qtype; |
my $qtype; |
|
|
sub evaloptionhash { |
sub evaloptionhash { |
Line 191 sub handler {
|
Line 192 sub handler {
|
|
|
# ------------------------------------------------ Prefix for everything stored |
# ------------------------------------------------ Prefix for everything stored |
$prefix=$env{'request.course.id'}.'.'.$symb.'.0.'; |
$prefix=$env{'request.course.id'}.'.'.$symb.'.0.'; |
|
#------------------------------------------------- Prefix for storing weight of Problem Parts |
|
$weightprefix=$env{'request.course.id'}.'.'.$symb.'.'; |
|
|
# ---------------------------------------------------------- Anything to store? |
# ---------------------------------------------------------- Anything to store? |
|
|
if (($symb) && (defined($env{'form.questiontype'}))) { |
if (($symb) && (defined($env{'form.questiontype'}))) { |
Line 216 sub handler {
|
Line 220 sub handler {
|
$storecontent{$prefix.$parm}=~s/\s+$//s; |
$storecontent{$prefix.$parm}=~s/\s+$//s; |
} |
} |
} |
} |
|
# ---------------------------------------------------- Set weights of hidden parts to zero |
|
# ------------------------------------------------------ and used part to 1 |
|
$storecontent{$weightprefix.'essay.weight'}=0; |
|
$storecontent{$weightprefix.'numerical.weight'}=0; |
|
$storecontent{$weightprefix.'option.weight'}=0; |
|
$storecontent{$weightprefix.'radio.weight'}=0; |
|
$storecontent{$weightprefix.'string.weight'}=0; |
|
$storecontent{$weightprefix.$env{'form.questiontype'}.'.weight'}=1; |
|
|
|
|
my $reply=&Apache::lonnet::cput |
my $reply=&Apache::lonnet::cput |
('resourcedata',\%storecontent, |
('resourcedata',\%storecontent, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
|
|
&Apache::lonnet::devalidatecourseresdata( |
&Apache::lonnet::devalidatecourseresdata( |
$env{'course.'.$env{'request.course.id'}.'.num'}, |
$env{'course.'.$env{'request.course.id'}.'.num'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}); |
$env{'course.'.$env{'request.course.id'}.'.domain'}); |