version 1.16, 2005/05/03 06:44:56
|
version 1.19, 2005/05/09 21:55:01
|
Line 194 sub start_Task {
|
Line 194 sub start_Task {
|
$Apache::bridgetask::queue_key=$todo; |
$Apache::bridgetask::queue_key=$todo; |
&Apache::structuretags::initialize_storage(); |
&Apache::structuretags::initialize_storage(); |
&Apache::lonhomework::showhash(%Apache::lonhomework::history); |
&Apache::lonhomework::showhash(%Apache::lonhomework::history); |
|
$result.="\n".'<table width="100%" style="width:100%" border="1">'; |
} else { |
} else { |
$result.="\n". |
$result.="\n". |
'<table><tr><td>No user to be graded.</td></tr></table>'; |
'<table><tr><td>No user to be graded.</td></tr></table>'; |
Line 246 sub end_Task {
|
Line 247 sub end_Task {
|
} |
} |
} |
} |
} elsif ($target eq 'webgrade') { |
} elsif ($target eq 'webgrade') { |
$result.="\n<hr />"; |
$result.="</table>\n<hr />"; |
$result.='<input type="submit" name="next" value="'. |
$result.='<input type="submit" name="next" value="'. |
&mt('Save & Next').'" /> '; |
&mt('Save & Next').'" /> '; |
$result.='<input type="submit" name="end" value="'. |
$result.='<input type="submit" name="end" value="'. |
Line 338 sub pick_from_queue_data {
|
Line 339 sub pick_from_queue_data {
|
my ($symb,$uname,$udom)=&decode_queue_key($key); |
my ($symb,$uname,$udom)=&decode_queue_key($key); |
if ($check_section) { |
if ($check_section) { |
my $section=&Apache::lonnet::getsection($uname,$udom); |
my $section=&Apache::lonnet::getsection($uname,$udom); |
if ($section ne $check_section) { |
if ($section eq $check_section) { |
&Apache::lonnet::logthis("not my sec"); |
&Apache::lonnet::logthis("my sec"); |
next; |
next; |
} |
} |
} |
} |
Line 468 sub end_ClosingParagraph {
|
Line 469 sub end_ClosingParagraph {
|
return $result; |
return $result; |
} |
} |
|
|
|
sub get_id { |
|
my ($parstack,$safeeval)=@_; |
|
my $id=&Apache::lonxml::get_param('id',$parstack,$safeeval); |
|
if (!$id) { $id=$Apache::lonxml::curdepth; } |
|
return $id; |
|
} |
|
|
my %dimension; |
my %dimension; |
sub start_Dimension { |
sub start_Dimension { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
undef(%dimension); |
undef(%dimension); |
my $dim_id=$Apache::lonxml::curdepth; |
my $dim_id=&get_id($parstack,$safeeval); |
$Apache::bridgetask::dimension=$dim_id; |
$Apache::bridgetask::dimension=$dim_id; |
push(@Apache::bridgetask::dimensionlist,$dim_id); |
push(@Apache::bridgetask::dimensionlist,$dim_id); |
undef(@Apache::bridgetask::instance); |
undef(@Apache::bridgetask::instance); |
Line 488 sub get_instance {
|
Line 496 sub get_instance {
|
return $order[0]; |
return $order[0]; |
} |
} |
|
|
sub end_Dimension { |
{ |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my $last_link; |
my $result; |
sub end_Dimension { |
if ($target eq 'web') { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
|
my $result; |
my $instance=&get_instance(); |
my $instance=&get_instance(); |
$result=$dimension{'intro'}.$dimension{$instance.'.text'}; |
if ($target eq 'web') { |
} elsif ($target eq 'webgrade') { |
$result=$dimension{'intro'}.$dimension{$instance.'.text'}; |
my $instance=&get_instance(); |
} elsif ($target eq 'webgrade') { |
$result.="\n".'<table>'; |
foreach my $id (@{$dimension{$instance.'.criterias'}}) { |
foreach my $id (@{$dimension{$instance.'.criterias'}}) { |
my $link='criteria_'.$instance.'_'.$id; |
$result.='<tr><td>'. |
$result.='<tr><td width="100%" valign="top">'. |
$dimension{$instance.'.criteria.'.$id}.'</td></tr>'; |
'<a name="'.$link.'" />'. |
|
'<a name="next_'.$last_link.'" />'. |
|
'<br /><textarea enabled="false" style="width:100%" rows="8" width="25" wrap="hard">'.$dimension{$instance.'.criteria.'.$id}.'</textarea>'. |
|
#$dimension{$instance.'.criteria.'.$id}. |
|
'</td>'. |
|
'<td><nobr>Additional Comment for Student</nobr> <br />'. |
|
'<textarea style="width:100%" rows="8" width="25" wrap="hard" name="HWVAL_comment_'.$link.'"></textarea>'. |
|
'</td>'. |
|
'<td>'. |
|
'<nobr><label><input type="radio" name="HWVAL_'.$link.'" value="ungraded" />Ungraded</label></nobr><br />'. |
|
'<label><input type="radio" name="HWVAL_'.$link.'" value="pass" />Pass</label><br />'. |
|
'<label><input type="radio" name="HWVAL_'.$link.'" value="fail" />Fail</label><br />'. |
|
'<label><input type="radio" name="HWVAL_'.$link.'" value="review" />Review</label><br />'. |
|
'</td>'. |
|
'<td>'. |
|
'<a href="#'.$last_link.'">Prev</a><br />'. |
|
'<a href="#next_'.$link.'">Next</a><br />'. |
|
'</td></tr>'; |
|
$last_link=$link; |
|
} |
|
} elsif ($target eq 'grade') { |
|
my $optional_passed=0; |
|
foreach my $id (@{$dimension{$instance.'.criterias'}}) { |
|
if ($env{'form.HWVAL_criteria_'.$instance.'_'.$id} eq 'pass') { |
|
} elsif ($env{'form.HWVAL_criteria_'.$instance.'_'.$id} eq 'fail') { |
|
} elsif ($env{'form.HWVAL_criteria_'.$instance.'_'.$id} eq 'ungraded') { |
|
} elsif ($env{'form.HWVAL_criteria_'.$instance.'_'.$id} eq 'review') { |
|
} |
|
} |
} |
} |
$result.='</table>'; |
return $result; |
} |
} |
return $result; |
|
} |
} |
|
|
sub start_IntroParagraph { |
sub start_IntroParagraph { |
Line 530 sub end_IntroParagraph {
|
Line 566 sub end_IntroParagraph {
|
|
|
sub start_Instance { |
sub start_Instance { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
push(@{$dimension{'instances'}},$Apache::lonxml::curdepth); |
my $id=&get_id($parstack,$safeeval); |
push(@Apache::bridgetask::instance,$Apache::lonxml::curdepth); |
push(@{$dimension{'instances'}},$id); |
push(@Apache::bridgetask::instancelist,$Apache::lonxml::curdepth); |
push(@Apache::bridgetask::instance,$id); |
|
push(@Apache::bridgetask::instancelist,$id); |
|
$dimension{$instance_id.'.optionalrequired'}= |
|
&Apache::lonxml::get_param('OptionalRequired',$parstack,$safeeval); |
return ''; |
return ''; |
} |
} |
|
|
Line 571 sub end_Criteria {
|
Line 610 sub end_Criteria {
|
my $instance_id=$Apache::bridgetask::instance[-1]; |
my $instance_id=$Apache::bridgetask::instance[-1]; |
if ($target eq 'web' || $target eq 'webgrade') { |
if ($target eq 'web' || $target eq 'webgrade') { |
my $criteria=&Apache::lonxml::endredirection(); |
my $criteria=&Apache::lonxml::endredirection(); |
my $id=$Apache::lonxml::curdepth; |
my $id=&get_id($parstack,$safeeval); |
$dimension{$instance_id.'.criteria.'.$id}=$criteria; |
$dimension{$instance_id.'.criteria.'.$id}=$criteria; |
|
$dimension{$instance_id.'.criteria.'.$id.'.mandatory'}= |
|
&Apache::lonxml::get_param('Mandatory',$parstack,$safeeval); |
push(@{$dimension{$instance_id.'.criterias'}},$id); |
push(@{$dimension{$instance_id.'.criterias'}},$id); |
} |
} |
return ''; |
return ''; |