version 1.138, 2006/04/10 07:37:39
|
version 1.140, 2006/04/10 22:55:02
|
Line 984 DONEBUTTON
|
Line 984 DONEBUTTON
|
#$result.='<input type="submit" name="save" value="'. |
#$result.='<input type="submit" name="save" value="'. |
# &mt('Save Partial Grade and Continue Grading').'" /> '; |
# &mt('Save Partial Grade and Continue Grading').'" /> '; |
$result.='</form>'."\n</div>\n</div>\n". |
$result.='</form>'."\n</div>\n</div>\n". |
&Apache::loncommon::endbodytag().'</html>'; |
&Apache::loncommon::end_page(); |
} elsif ($target eq 'meta') { |
} elsif ($target eq 'meta') { |
$result.=&Apache::response::meta_package_write('Task'); |
$result.=&Apache::response::meta_package_write('Task'); |
$result.=&Apache::response::meta_stores_write('solved','string', |
$result.=&Apache::response::meta_stores_write('solved','string', |
Line 1321 sub pick_from_queue_data {
|
Line 1321 sub pick_from_queue_data {
|
@possible = sort { $a->[1] <=> $b->[1] } @possible; |
@possible = sort { $a->[1] <=> $b->[1] } @possible; |
# pick one of the entries in the top 10% in small queues and one |
# pick one of the entries in the top 10% in small queues and one |
# of the first ten entries in large queues |
# of the first ten entries in large queues |
my $ten_percent = int($#possible * 0.1); |
#my $ten_percent = int($#possible * 0.1); |
if ($ten_percent < 1 ) { $ten_percent = 1; } |
#if ($ten_percent < 1 ) { $ten_percent = 1; } |
if ($ten_percent > 10) { $ten_percent = 10; } |
#if ($ten_percent > 10) { $ten_percent = 10; } |
my $max=($#possible < $ten_percent) ? $#possible : $ten_percent; |
#my $max=($#possible < $ten_percent) ? $#possible : $ten_percent; |
|
|
return $possible[int(rand($max))][0]; |
#return $possible[int(rand($max))][0]; |
|
return $possible[0][0]; |
} |
} |
return undef; |
return undef; |
} |
} |