version 1.140, 2006/06/19 16:32:35
|
version 1.144, 2006/07/18 17:24:33
|
Line 128 sub setrandomnumber {
|
Line 128 sub setrandomnumber {
|
} |
} |
$shift_amt=scalar(@Apache::inputtags::responselist); |
$shift_amt=scalar(@Apache::inputtags::responselist); |
} elsif ($Apache::lonhomework::parsing_a_task) { |
} elsif ($Apache::lonhomework::parsing_a_task) { |
$id1=$Apache::bridgetask::dimension; |
$id1=&Apache::bridgetask::get_dim_id(); |
if (!$ignore_id2 && defined($Apache::bridgetask::instance[-1])) { |
if (!$ignore_id2 && ref($Apache::bridgetask::instance{$id1})) { |
$id2=$Apache::bridgetask::instance[-1]; |
$id2=$Apache::bridgetask::instance{$id1}[-1]; |
|
$shift_amt=scalar(@{$Apache::bridgetask::instance{$id1}}); |
|
} else { |
|
$shift_amt=0; |
} |
} |
$shift_amt=scalar(@Apache::bridgetask::instance); |
|
} |
} |
&Apache::lonxml::debug("id1: $id1, id2: $id2, shift_amt: $shift_amt"); |
&Apache::lonxml::debug("id1: $id1, id2: $id2, shift_amt: $shift_amt"); |
if (!$rand_alg || $rand_alg eq '32bit' || $rand_alg eq '64bit' || |
if (!$rand_alg || $rand_alg eq '32bit' || $rand_alg eq '64bit' || |
Line 376 sub start_customresponse {
|
Line 378 sub start_customresponse {
|
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::text_arg('String to display for answer:', |
$result.=&Apache::edit::text_arg('String to display for answer:', |
'answerdisplay',$token); |
'answerdisplay',$token). |
|
&Apache::loncommon::help_open_topic('Custom_Response_Problems','How to write custom responses'); |
$result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
$result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |
my $constructtag; |
my $constructtag; |
Line 987 sub add_to_gradingqueue {
|
Line 990 sub add_to_gradingqueue {
|
# a return of 3 means it after the answer date |
# a return of 3 means it after the answer date |
sub check_status { |
sub check_status { |
my ($id)=@_; |
my ($id)=@_; |
if (!$id) { $id=$Apache::linputtags::part; } |
if (!defined($id)) { $id=$Apache::inputtags::part; } |
my $curtime=&Apache::lonnet::EXT('system.time'); |
my $curtime=&Apache::lonnet::EXT('system.time'); |
my $opendate=&Apache::lonnet::EXT("resource.$id.opendate"); |
my $opendate=&Apache::lonnet::EXT("resource.$id.opendate"); |
my $duedate=&Apache::lonnet::EXT("resource.$id.duedate"); |
my $duedate=&Apache::lonnet::EXT("resource.$id.duedate"); |