[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 28 Mar 2006 19:55:44 -0000
albertel Tue Mar 28 14:55:44 2006 EDT
Modified files:
/loncom/homework bridgetask.pm
Log:
- grading of tasks works again, morphed the name of the input element and didn't carry the change through
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.121 loncom/homework/bridgetask.pm:1.122
--- loncom/homework/bridgetask.pm:1.121 Tue Mar 28 13:57:49 2006
+++ loncom/homework/bridgetask.pm Tue Mar 28 14:55:43 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.121 2006/03/28 18:57:49 albertel Exp $
+# $Id: bridgetask.pm,v 1.122 2006/03/28 19:55:43 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -176,10 +176,10 @@
if (scalar(keys(%sections)) < 3) {
$size=scalar(keys(%sections))+2;
}
- my $sec_select = '<select multiple name="chosensections" size="'.$size.'">'."\n";
+ my $sec_select = '<select multiple="multiple" name="chosensections" size="'.$size.'">'."\n";
$sec_select .= "<option value='all' selected='selected'>all</option>\n";
foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) {
- $sec_select .= "<option name=\"$sec\">$sec</option>\n";
+ $sec_select .= "<option value=\"$sec\">$sec</option>\n";
}
$sec_select .= "<option value='none'>none</option></select>\n";
@@ -1701,6 +1701,10 @@
{
my $last_link;
+ sub link {
+ my ($instance,$id) = @_;
+ return 'LC_GRADING_criteria_'.$instance.'_'.$id;
+ }
sub end_Dimension {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result=&Apache::lonxml::endredirection();
@@ -1795,7 +1799,7 @@
@Apache::scripttag::parser_env = @_;
&Apache::scripttag::xmlparse($dimension{$instance.'.text'});
foreach my $id (@{$dimension{$instance.'.criterias'}}) {
- my $link='LC_GRADING_criteria_'.$instance.'_'.$id;
+ my $link=&link($instance,$id);
my $status=$Apache::lonhomework::history{"resource.$version.0.$dim.$instance.$id.status"};
$result.='<div class="LC_GRADING_criteria" id="'.$link.'">'."\n".
'<a name="'.$link.'" />'."\n".
@@ -1828,8 +1832,9 @@
my $ungraded=0;
my $review=0;
foreach my $id (@{$dimension{$instance.'.criterias'}}) {
- my $status=$Apache::lonhomework::results{"resource.$version.0.$dim.$instance.$id.status"}=$env{'form.HWVAL_criteria_'.$instance.'_'.$id};
- $Apache::lonhomework::results{"resource.$version.0.$dim.$instance.$id.comment"}=$env{'form.HWVAL_comment_criteria_'.$instance.'_'.$id};
+ my $link=&link($instance,$id);
+ my $status=$Apache::lonhomework::results{"resource.$version.0.$dim.$instance.$id.status"}=$env{'form.HWVAL_'.$link};
+ $Apache::lonhomework::results{"resource.$version.0.$dim.$instance.$id.comment"}=$env{'form.HWVAL_comment_'.$link};
my $mandatory=($dimension{$instance.'.criteria.'.$id.'.mandatory'} ne 'N');
if ($status eq 'pass') {
if (!$mandatory) { $optional_passed++; }