version 1.152, 2006/05/16 21:21:31
|
version 1.154, 2006/05/25 19:37:47
|
Line 1394 sub pick_from_queue_data {
|
Line 1394 sub pick_from_queue_data {
|
} |
} |
my $end_time; |
my $end_time; |
if (my $slot=&slotted_access($queuedata->{$key})) { |
if (my $slot=&slotted_access($queuedata->{$key})) { |
|
&Apache::lonxml::debug("looking at slot $slot"); |
my %slot_data=&Apache::lonnet::get_slot($slot); |
my %slot_data=&Apache::lonnet::get_slot($slot); |
if ($slot_data{'endtime'} < time) { |
if ($slot_data{'endtime'} < time) { |
$end_time = $slot_data{'endtime'}; |
$end_time = $slot_data{'endtime'}; |
|
} else { |
|
&Apache::lonxml::debug("not time ".$slot_data{'endtime'}); |
|
next; |
} |
} |
} else { |
} else { |
my $due_date = &Apache::lonhomework::due_date('0',$symb); |
my $due_date = &Apache::lonhomework::due_date('0',$symb); |
if ($due_date > time) { |
if ($due_date < time) { |
$end_time = $due_date; |
$end_time = $due_date; |
|
} else { |
|
&Apache::lonxml::debug("not time $due_date"); |
|
next; |
} |
} |
} |
} |
if ($end_time ne '') { |
|
&Apache::lonxml::debug("not time"); |
|
next; |
|
} |
|
|
|
if (exists($queuedata->{"$key\0locked"})) { |
if (exists($queuedata->{"$key\0locked"})) { |
&Apache::lonxml::debug("someone already has um."); |
&Apache::lonxml::debug("someone already has um."); |
Line 1909 sub get_instance {
|
Line 1912 sub get_instance {
|
my $mandatory_failed=0; |
my $mandatory_failed=0; |
my $ungraded=0; |
my $ungraded=0; |
my $review=0; |
my $review=0; |
|
|
|
@Apache::scripttag::parser_env = @_; |
|
$result.=&Apache::scripttag::xmlparse($dimension{'intro'}); |
foreach my $id (@{$dimension{$instance.'.criterias'}}, |
foreach my $id (@{$dimension{$instance.'.criterias'}}, |
@{$dimension{'criterias'}}) { |
@{$dimension{'criterias'}}) { |
my $link=&link($id); |
my $link=&link($id); |
|
@Apache::scripttag::parser_env = @_; |
|
$result.=&Apache::scripttag::xmlparse($dimension{$instance.'.text'}); |
my $status=$Apache::lonhomework::results{"resource.$version.0.$dim.$id.status"}=$env{'form.HWVAL_'.$link}; |
my $status=$Apache::lonhomework::results{"resource.$version.0.$dim.$id.status"}=$env{'form.HWVAL_'.$link}; |
$Apache::lonhomework::results{"resource.$version.0.$dim.$id.comment"}=$env{'form.HWVAL_comment_'.$link}; |
$Apache::lonhomework::results{"resource.$version.0.$dim.$id.comment"}=$env{'form.HWVAL_comment_'.$link}; |
my $mandatory=($dimension{'criteria.'.$id.'.mandatory'} ne 'N'); |
my $mandatory=($dimension{'criteria.'.$id.'.mandatory'} ne 'N'); |
Line 1995 sub grading_history {
|
Line 2003 sub grading_history {
|
sub start_IntroParagraph { |
sub start_IntroParagraph { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
if ($target eq 'web' || $target eq 'webgrade') { |
if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') { |
if ($tagstack->[-2] eq 'Dimension' || $tagstack->[-2] eq 'Question' ) { |
if ($tagstack->[-2] eq 'Dimension' || $tagstack->[-2] eq 'Question' ) { |
$dimension{'intro'}= |
$dimension{'intro'}= |
&Apache::lonxml::get_all_text('/introparagraph', |
&Apache::lonxml::get_all_text('/introparagraph', |
Line 2037 sub start_InstanceText {
|
Line 2045 sub start_InstanceText {
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $instance_id=$Apache::bridgetask::instance[-1]; |
my $instance_id=$Apache::bridgetask::instance[-1]; |
my $text=&Apache::lonxml::get_all_text('/instancetext',$parser,$style); |
my $text=&Apache::lonxml::get_all_text('/instancetext',$parser,$style); |
if ($target eq 'web' || $target eq 'webgrade') { |
if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') { |
$dimension{$instance_id.'.text'}=$text; |
$dimension{$instance_id.'.text'}=$text; |
} |
} |
return ''; |
return ''; |