};
+ } else {
+ $result = "\n".'
'.
+ "\n".$result;
}
- if ($optional_passed < $dimension{$instance.'.optionalrequired'}) {
- $mandatory_failed++;
+ $result .= "\n
\n";
+ }
+ } elsif ($target eq 'webgrade') {
+ # in case of any side effects that we need
+ &nested_parse(\$dimension{$dim}{'intro'},[@_]);
+ &nested_parse(\$dimension{$dim}{$instance.'.text'},[@_]);
+ $result.=
+ &nested_parse(\$dimension{$dim}{'questiontext'},[@_],
+ {'set_dim_id' => undef,
+ 'delayed_dim_results' => 1});
+ foreach my $id (@{$dimension{$dim}{$instance.'.criterias'}},
+ @{$dimension{$dim}{'criterias'}} ) {
+ my $type = $dimension{$dim}{'criteria.'.$id.'.type'};
+ if ($type eq 'dimension') {
+ # dimensional 'criteria' don't get assigned grades
+ $result.=
+ &nested_parse(\$dimension{$dim}{'criteria.'.$id},
+ [@_],{'set_dim_id' => $id});
+ next;
+ } else {
+ my $criteria =&nested_parse(\$dimension{$dim}{'criteria.'.$id},
+ [@_]);
+ $criteria = &layout_webgrade_Criteria($dim,$id,$criteria);
+ my $internal_location=&internal_location($id);
+ if ($result =~ m/\Q$internal_location\E/) {
+ $result =~ s/\Q$internal_location\E/$criteria/;
+ } else {
+ $result.=$criteria ;
+ }
}
- &Apache::lonxml::debug("all instance ".join(':',@{$dimension{$instance.'.criterias'}})." results -> m_f $mandatory_failed o_p $optional_passed u $ungraded r $review");
- if ($review) {
- $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
- 'review';
- } elsif ($ungraded) {
- $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
- 'ungraded';
- } elsif ($mandatory_failed) {
- $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
- 'fail';
+ }
+ if (&nest()) {
+ &Apache::lonxml::debug(" for $dim stashing results into ".$dimension{$dim}{'nested'});
+ $dimension{$dimension{$dim}{'nested'}}{'result'}.=$result;
+ undef($result);
+ }
+ } elsif ($target eq 'grade' && $env{'form.webgrade'}) {
+ my $optional_passed=0;
+ my $mandatory_failed=0;
+ my $ungraded=0;
+ my $review=0;
+
+ $result .= &nested_parse(\$dimension{$dim}{'intro'},[@_]);
+ $result .= &nested_parse(\$dimension{$dim}{$instance.'.text'},
+ [@_]);
+ $result .= &nested_parse(\$dimension{$dim}{'questiontext'},
+ [@_],{'set_dim_id' => undef});
+
+ foreach my $id (@{$dimension{$dim}{$instance.'.criterias'}},
+ @{$dimension{$dim}{'criterias'}}) {
+ my $link=&link($id);
+
+ my $type = $dimension{$dim}{'criteria.'.$id.'.type'};
+ if ($type eq 'criteria') {
+ # dimensional 'criteria' don't get assigned grades
+ $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};
+ } else {
+ $result .=
+ &nested_parse(\$dimension{$dim}{'criteria.'.$id},
+ [@_],{'set_dim_id' => $id});
+ }
+ my $status= &get_criteria('status',$version,$dim,$id);
+
+ my $mandatory=($dimension{$dim}{'criteria.'.$id.'.mandatory'} ne 'N');
+ if ($status eq 'pass') {
+ if (!$mandatory) { $optional_passed++; }
+ } elsif ($status eq 'fail') {
+ if ($mandatory) { $mandatory_failed++; }
+ } elsif ($status eq 'review') {
+ $review++;
+ } elsif ($status eq 'ungraded') {
+ $ungraded++;
} else {
- $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
- 'pass';
+ $ungraded++;
}
+ }
+
+ my $opt_req=$dimension{$dim}{$instance.'.optionalrequired'};
+ if ($opt_req !~ /\S/) {
+ $opt_req=
+ &Apache::lonxml::get_param('OptionalRequired',
+ $parstack,$safeeval);
+ if ($opt_req !~ /\S/) { $opt_req = 0; }
+ }
+ if ($optional_passed < $opt_req) {
+ $mandatory_failed++;
+ }
+ &Apache::lonxml::debug("all instance ".join(':',@{$dimension{$dim}{$instance.'.criterias'}})." results -> m_f $mandatory_failed o_p $optional_passed u $ungraded r $review");
+ if ($review) {
+ $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
+ 'review';
+ } elsif ($ungraded) {
+ $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
+ 'ungraded';
+ } elsif ($mandatory_failed) {
+ $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
+ 'fail';
} else {
- # any other targets no output
- undef($result);
+ $Apache::lonhomework::results{"resource.$version.0.$dim.status"}=
+ 'pass';
}
- return $result;
+ } elsif ($target eq 'edit') {
+ } elsif ($target eq 'modified') {
+ } else {
+ # any other targets no output
+ undef($result);
+ }
+ if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') {
+ &disable_dimension_parsing();
+ pop(@Apache::bridgetask::dimension);
+ }
+ return $result;
+}
+
+sub question_status_message {
+ my ($counts,$depth) = @_;
+ my %req = ('man' => 'mandatory',
+ 'opt' => 'optional',);
+ my %type = ('cri' => 'criteria',
+ 'dim' => ('sub'x($depth+1)).'questions',);
+ my @sections;
+ foreach my $req ('man','opt') {
+ foreach my $type ('cri','dim') {
+ if ($counts->{$req.'_'.$type}) {
+ push(@sections,
+ $counts->{$req.'_'.$type.'_passed'}.' of the '.
+ $counts->{$req.'_'.$type}.' '.
+ $req{$req}.' '.$type{$type});
+ }
+ }
+ }
+
+ my $status = 'You passed ';
+ if (@sections == -1) {
+ } elsif (@sections == 1) {
+ $status .= $sections[0];
+ } elsif (@sections == 2) {
+ $status .= $sections[0].' and '.$sections[1];
+ } else {
+ my $last = pop(@sections);
+ $status .= join(', ',@sections).', and '.$last;
+ }
+ $status .= '.';
+ if ($counts->{'opt'}) {
+ $status .= ' You were required to pass '.$counts->{'opt_req'}.
+ ' optional ';
+ if ($counts->{'opt_dim'} + $counts->{'man_dim'} < 1) {
+ $status .=
+ ($counts->{'opt_req'} == 1?'criterion':'criteria');
+ } else {
+ $status .=
+ 'component'.($counts->{'opt_req'} == 1?'':'s');
+ }
+ $status .= '.';
}
+ return $status;
+}
+
+sub get_counts {
+ my ($dim,$instance,$parstack,$safeeval) = @_;
+ my %counts;
+ my @possible = ('man_cri','man_dim',
+ 'opt_cri','opt_dim',
+ 'man_cri_passed', 'man_dim_passed',
+ 'opt_cri_passed', 'opt_dim_passed',
+ 'man_passed',
+ 'opt_passed',
+ 'opt_req');
+ foreach my $which (@possible) { $counts{$which} = 0; }
+
+ my $version = &get_version();
+
+ foreach my $id ( @{$dimension{$dim}{$instance.'.criterias'}},
+ @{$dimension{$dim}{'criterias'}} ) {
+ my $status = &get_criteria('status',$version,$dim,$id);
+ my $which;
+ if ($dimension{$dim}{'criteria.'.$id.'.mandatory'}
+ eq 'N') {
+ $which = 'opt';
+ } else {
+ $which = 'man';
+ }
+ $counts{$which}++;
+ if ($status eq 'pass') { $counts{$which.'_passed'}++; }
+ if ($dimension{$dim}{'criteria.'.$id.'.type'}
+ eq 'dimension') {
+ $which .= '_dim';
+ } else {
+ $which .= '_cri';
+ }
+ $counts{$which}++;
+ if ($status eq 'pass') { $counts{$which.'_passed'}++; }
+
+
+ }
+ if ($counts{'man_dim_passed'} eq $counts{'man_dim'}) {
+ $counts{'man_dim_passed'}='all';
+ }
+ if ($counts{'man_cri_passed'} eq $counts{'man_cri'}) {
+ $counts{'man_cri_passed'}='all';
+ }
+
+ $counts{'opt_req'}=$dimension{$dim}{$instance.'.optionalrequired'};
+ if ($counts{'opt_req'} !~ /\S/) {
+ $counts{'opt_req'}= &Apache::lonxml::get_param('OptionalRequired',
+ $parstack,$safeeval);
+ if ($counts{'opt_req'} !~ /\S/) { $counts{'opt_req'} = 0; }
+ }
+ return %counts;
+}
+
+sub end_Setup {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+ my $result;
+ my $dim=&get_id($parstack,$safeeval);
+ my $instance=&get_instance($dim);
+ my $version=&get_version();
+ if ($target eq 'web' || $target eq 'webgrade' || $target eq 'grade') {
+ $result=&Apache::lonxml::endredirection();
+ }
+ if ($target eq 'web') {
+ @Apache::scripttag::parser_env = @_;
+ $result.=&Apache::scripttag::xmlparse($dimension{$dim}{'intro'});
+ my @instances = $instance;
+ if (&Apache::response::showallfoils()) {
+ @instances = @{$dimension{$dim}{'instances'}};
+ }
+ foreach my $instance (@instances) {
+ @Apache::scripttag::parser_env = @_;
+ $result.=&Apache::scripttag::xmlparse($dimension{$dim}{$instance.'.text'});
+ @Apache::scripttag::parser_env = @_;
+ $result.=&Apache::scripttag::xmlparse($dimension{$dim}{'questiontext'});
+ }
+ } elsif ($target eq 'webgrade'
+ || $target eq 'grade' && $env{'form.webgrade'}) {
+ # in case of any side effects that we need
+ @Apache::scripttag::parser_env = @_;
+ &Apache::scripttag::xmlparse($dimension{$dim}{'intro'});
+ @Apache::scripttag::parser_env = @_;
+ &Apache::scripttag::xmlparse($dimension{$dim}{$instance.'.text'});
+ @Apache::scripttag::parser_env = @_;
+ &Apache::scripttag::xmlparse($dimension{$dim}{'questiontext'});
+ } else {
+ # any other targets no output
+ undef($result);
+ }
+ pop(@Apache::bridgetask::dimension);
+ return $result;
}
sub grading_history {
- my ($version,$dim,$instance,$criteria) = @_;
+ my ($version,$dim,$id) = @_;
if (!&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) {
return '';
}
my ($result,$grader);
- my $scope="resource.$version.0.$dim.$instance.$criteria";
+ my $scope="resource.$version.0.";
+ $scope .= ($dim ne $top) ? "$dim.$id"
+ : "$id";
foreach my $t (1..$Apache::lonhomework::history{'version'}) {
if (exists($Apache::lonhomework::history{$t.':resource.0.regrader'})) {
my ($gname,$gdom) =
@@ -1864,11 +2683,12 @@ sub grading_history {
$entry.=' comment: "'.$Apache::lonhomework::history{"$t:$scope.comment"}.'"';
}
if ($entry) {
- $result.= "
$grader : $entry ";
+ $result.= "\n\t\t
\n\t\t\t$grader :\n\t\t\t $entry \n\t\t ";
}
}
if ($result) {
- return '
';
+ return "\n\t".'
'."\n";
}
return '';
}
@@ -1876,14 +2696,23 @@ sub grading_history {
sub start_IntroParagraph {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
my $result;
- if ($target eq 'web' || $target eq 'webgrade') {
- if ($tagstack->[-2] eq 'Dimension') {
- $dimension{'intro'}=&Apache::lonxml::get_all_text('/introparagraph',$parser,$style);
-
- } elsif ($tagstack->[-2] eq 'Task' && $target eq 'webgrade') {
+ my $dim = &get_dim_id();
+ if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') {
+ if ($tagstack->[-2] eq 'Dimension' || $tagstack->[-2] eq 'Question' ) {
+ $dimension{$dim}{'intro'}=
+ &Apache::lonxml::get_all_text('/introparagraph',
+ $parser,$style);
+ } elsif ($tagstack->[-2] eq 'Task' && $target eq 'webgrade') {
&Apache::lonxml::startredirection();
}
+ } elsif ($target eq 'edit') {
+ my $bodytext=&Apache::lonxml::get_all_text("/introparagraph",$parser);
+ $result = &Apache::edit::tag_start($target,$token);
+ $result.= &Apache::edit::editfield($token->[1],$bodytext,'',80,4);
+ } elsif ($target eq 'modified') {
+ $result = $token->[4].&Apache::edit::modifiedfield('/introparagraph',
+ $parser);
}
return $result;
}
@@ -1897,30 +2726,68 @@ sub end_IntroParagraph {
sub start_Instance {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
- my $id=&get_id($parstack,$safeeval);
- push(@{$dimension{'instances'}},$id);
- push(@Apache::bridgetask::instance,$id);
+ my $dim = &get_dim_id();
+ my $id = &get_id($parstack,$safeeval);
+ push(@{$dimension{$dim}{'instances'}},$id);
+ push(@{$Apache::bridgetask::instance{$dim}},$id);
push(@Apache::bridgetask::instancelist,$id);
- $dimension{$id.'.optionalrequired'}=
+ $dimension{$dim}{$id.'.optionalrequired'}=
&Apache::lonxml::get_param('OptionalRequired',$parstack,$safeeval);
my $disabled = &Apache::lonxml::get_param('Disabled',$parstack,$safeeval);
if (lc($disabled) eq 'yes') {
- $dimension{$id.'.disabled'}='1';
+ $dimension{$dim}{$id.'.disabled'}='1';
}
- return '';
+ my $result;
+ if ($target eq 'edit') {
+ $result = &Apache::edit::tag_start($target,$token);
+ $result.=
+ &Apache::edit::text_arg('Id:','id',$token,10).' '.
+ &Apache::edit::select_arg('Instance is Disabled:','Disabled',
+ [['no', 'No'],
+ ['yes','Yes'],],
+ $token)
+ .'
'.
+ &Apache::edit::text_arg('Required number of passed optional elements to pass the Instance:',
+ 'OptionalRequired',$token,4)
+ .&Apache::edit::end_row().
+ &Apache::edit::start_spanning_row();
+ } elsif ($target eq 'modified') {
+ my $constructtag=
+ &Apache::edit::get_new_args($token,$parstack,$safeeval,
+ 'id','OptionalRequired','Disabled');
+ if ($constructtag) {
+ $result = &Apache::edit::rebuild_tag($token);
+ }
+ }
+ return $result;
}
sub end_Instance {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+ my $result;
+ if ($target eq 'edit') {
+ $result = &Apache::edit::tag_end($target,$token);
+ }
+ return $result;
}
sub start_InstanceText {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
- my $instance_id=$Apache::bridgetask::instance[-1];
- my $text=&Apache::lonxml::get_all_text('/instancetext',$parser,$style);
- if ($target eq 'web' || $target eq 'webgrade') {
- $dimension{$instance_id.'.text'}=$text;
+ my $result;
+ if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') {
+ my $text=&Apache::lonxml::get_all_text('/instancetext',$parser,$style);
+ my $dim = &get_dim_id();
+ my $instance_id=$Apache::bridgetask::instance{$dim}[-1];
+ $dimension{$dim}{$instance_id.'.text'}=$text;
+ } elsif ($target eq 'edit') {
+ my $bodytext=&Apache::lonxml::get_all_text("/instancetext",$parser);
+ $result = &Apache::edit::tag_start($target,$token);
+ $result.= &Apache::edit::editfield($token->[1],$bodytext,'',80,4);
+ } elsif ($target eq 'modified') {
+ $result = $token->[4].&Apache::edit::modifiedfield('/instancetext',
+ $parser);
}
- return '';
+ return $result;
}
sub end_InstanceText {
@@ -1929,24 +2796,224 @@ sub end_InstanceText {
sub start_Criteria {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
- my $instance_id=$Apache::bridgetask::instance[-1];
- my $criteria=&Apache::lonxml::get_all_text('/criteria',$parser,$style);
+ my $result = '';
if ($target eq 'web' || $target eq 'webgrade' || $target eq 'grade') {
+ my $criteria=&Apache::lonxml::get_all_text('/criteria',$parser,$style);
+ my $dim = &get_dim_id();
my $id=&get_id($parstack,$safeeval);
- $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);
+ if ($target eq 'web' || $target eq 'webgrade') {
+ if ($target eq 'webgrade') {
+ &Apache::lonxml::debug(" for $dim $id stashing results into $dim ");
+ $dimension{$dim}{'result'} .= &internal_location($id);
+ } else {
+ &Apache::lonxml::debug(" not stashing $dim $id");
+ #$result .= &internal_location($id);
+ }
+ }
+ &Apache::lonxml::debug("Criteria $id with $dim");
+ if (&Apache::londefdef::is_inside_of($tagstack,'Instance')) {
+ my $instance_id=$Apache::bridgetask::instance{$dim}[-1];
+ $dimension{$dim}{"criteria.$instance_id.$id"}=$criteria;
+ $dimension{$dim}{"criteria.$instance_id.$id.type"}='criteria';
+ $dimension{$dim}{"criteria.$instance_id.$id.mandatory"}=
+ &Apache::lonxml::get_param('Mandatory',$parstack,$safeeval);
+ push(@{$dimension{$dim}{$instance_id.'.criterias'}},"$instance_id.$id");
+ } else {
+ $dimension{$dim}{'criteria.'.$id}=$criteria;
+ $dimension{$dim}{'criteria.'.$id.'.type'}='criteria';
+ $dimension{$dim}{'criteria.'.$id.'.mandatory'}=
+ &Apache::lonxml::get_param('Mandatory',$parstack,$safeeval);
+ push(@{$dimension{$dim}{'criterias'}},$id);
+ }
+ } elsif ($target eq 'edit') {
+ if (0) {
+ $result = &Apache::edit::tag_start($target,$token);
+ my $text=&Apache::lonxml::get_all_text("/criteria",$parser);
+ &Apache::lonnet::logthis("get_all_text criteria \n$text");
+ my $local_parser = HTML::LCParser->new(\$text);
+ $local_parser->xml_mode(1);
+ $local_parser->marked_sections(1);
+ while (1) {
+ my $criteria_text =
+ &Apache::lonxml::get_all_text('gradernote',$local_parser);
+ $result.=
+ &Apache::edit::editfield($token->[1],$criteria_text,'',80,4);
+
+ # check for a
next might be end
+ my $token = $local_parser->get_token();
+ # is the end
+ last if (!$token);
+ my $gradernote = &Apache::lonxml::get_all_text('/gradernote',
+ $local_parser);
+ # purge the end tag
+ my $token = $local_parser->get_token();
+ $gradernote = ''.$gradernote.' ';
+ @Apache::scripttag::parser_env = @_;
+ $result .=
+ &Apache::edit::end_row().&Apache::edit::start_spanning_row().
+ &Apache::scripttag::xmlparse($gradernote).
+ &Apache::edit::end_row().&Apache::edit::start_spanning_row();
+ }
+ }
+ $result .=&Apache::edit::tag_start($target,$token);
+ $result.=
+ &Apache::edit::text_arg('Id:','id',$token,10).' '.
+ &Apache::edit::select_arg('Passing is Mandatory:','Mandatory',
+ [['yes', 'Yes'],
+ ['no','No'],],
+ $token)
+ .' '.&Apache::edit::end_row().
+ &Apache::edit::start_spanning_row();
+ } elsif ($target eq 'modified') {
+ my $constructtag=
+ &Apache::edit::get_new_args($token,$parstack,$safeeval,
+ 'id','Mandatory');
+ if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); }
}
- return '';
+ return $result;
+}
+
+sub layout_web_Criteria {
+ my ($dim,$id,$criteria) = @_;
+
+ my $version = &get_version();
+ my $status= &get_criteria('status', $version,$dim,$id);
+ my $comment=&get_criteria('comment',$version,$dim,$id);
+ my $mandatory=($dimension{$dim}{'criteria.'.$id.'.mandatory'} ne 'N');
+ if ($mandatory) {
+ $mandatory='Mandatory';
+ } else {
+ $mandatory='Optional';
+ }
+ my $status_display=$status;
+ $status_display=~s/^([a-z])/uc($1)/e;
+ my $criteria_info.=
+ ''."\n\t".'
'
+ .$mandatory.' Criteria '."\n\t".'
'
+ ."\n";
+ $criteria =~ s/^\s*//s;
+ $criteria =~ s/\s*$//s;
+ $criteria_info.= $criteria;
+ $criteria_info.="\n\t".'
'.
+ "\n\t".'
'.$status_display.'
';
+ if ($comment =~ /\w/) {
+ $criteria_info.=
+ "\n\t".
+ '';
+ }
+ $criteria_info.="\n".'
'."\n";
+
+ return $criteria_info;
+}
+
+sub layout_webgrade_Criteria {
+ my ($dim,$id,$criteria) = @_;
+ my $link=&link($id);
+ my $version = &get_version();
+ my $status = &get_criteria('status',$version,$dim,$id);
+ my %lt = ( 'ungraded' => 'Ungraded',
+ 'fail' => 'Fail',
+ 'pass' => 'Pass',
+ 'review' => 'Review',
+ 'comment' => 'Additional Comment for Student',
+ );
+ %lt = &Apache::lonlocal::texthash(%lt);
+ my $comment = &get_criteria('comment',$version,$dim,$id);
+ $comment = &HTML::Entities::encode($comment,'<>"&');
+ my %checked;
+ foreach my $which ('ungraded','fail','pass','review') {
+ if ($status eq $which) { $checked{$which} = 'checked="checked"'; }
+ }
+ if (!%checked) { $checked{'ungraded'} = 'checked="checked"'; }
+ my $buttons;
+ foreach my $which ('ungraded','fail','pass','review') {
+ $buttons .= <
+
+ $lt{$which}
+
+END_BUTTON
+ }
+ $criteria =~ s/^\s*//s;
+ $criteria =~ s/\s*$//s;
+ my $result = <
+
+ $criteria
+
+
+$buttons
+
+
+
+END_CRITERIA
+ $result .= &grading_history($version,$dim,$id);
+ return $result;
}
sub end_Criteria {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+ if ($target eq 'edit') {
+ } elsif ($target eq 'modified') {
+ }
}
+sub start_CriteriaText {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+ my $result;
+ if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') {
+
+ } elsif ($target eq 'edit') {
+ my $bodytext=&Apache::lonxml::get_all_text("/criteriatext",$parser);
+ $result = &Apache::edit::tag_start($target,$token);
+ $result.= &Apache::edit::editfield($token->[1],$bodytext,'',80,4);
+ } elsif ($target eq 'modified') {
+ $result = $token->[4].&Apache::edit::modifiedfield('/criteriatext',
+ $parser);
+ }
+ return $result;
+}
+
+sub end_CriteriaText {
+ return '';
+}
+
+sub start_GraderNote {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+ my $result;
+ if ($target eq 'webgrade') {
+ $result = '