[system] / trunk / pg / lib / Value / AnswerChecker.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value/AnswerChecker.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3868 Revision 3869
1010 list_type => undef, 1010 list_type => undef,
1011 typeMatch => $element, 1011 typeMatch => $element,
1012 extra => undef, 1012 extra => undef,
1013 requireParenMatch => 1, 1013 requireParenMatch => 1,
1014 removeParens => 1, 1014 removeParens => 1,
1015 implicitList => 1,
1015 ); 1016 );
1016} 1017}
1017 1018
1018# 1019#
1019# Match anything but formulas 1020# Match anything but formulas
1045 my $showHints = getOption($ans,'showHints'); 1046 my $showHints = getOption($ans,'showHints');
1046 my $showLengthHints = getOption($ans,'showLengthHints'); 1047 my $showLengthHints = getOption($ans,'showLengthHints');
1047 my $showParenHints = getOption($ans,'showParenHints'); 1048 my $showParenHints = getOption($ans,'showParenHints');
1048 my $partialCredit = getOption($ans,'partialCredit'); 1049 my $partialCredit = getOption($ans,'partialCredit');
1049 my $requireParenMatch = $ans->{requireParenMatch}; 1050 my $requireParenMatch = $ans->{requireParenMatch};
1051 my $implicitList = $ans->{implicitList};
1050 my $typeMatch = $ans->{typeMatch}; 1052 my $typeMatch = $ans->{typeMatch};
1051 my $value = $ans->{entry_type}; 1053 my $value = $ans->{entry_type};
1052 my $ltype = $ans->{list_type} || lc($self->type); 1054 my $ltype = $ans->{list_type} || lc($self->type);
1053 my $stype = $ans->{short_type} || $ltype; 1055 my $stype = $ans->{short_type} || $ltype;
1054 1056
1072 $cOpen = $self->{tree}{open}; $cClose = $self->{tree}{close}; 1074 $cOpen = $self->{tree}{open}; $cClose = $self->{tree}{close};
1073 } 1075 }
1074 my $student = $ans->{student_value}; my @student = ($student); 1076 my $student = $ans->{student_value}; my @student = ($student);
1075 my ($sOpen,$sClose) = ('',''); 1077 my ($sOpen,$sClose) = ('','');
1076 if (Value::isFormula($student) && $student->type eq $self->type) { 1078 if (Value::isFormula($student) && $student->type eq $self->type) {
1079 if ($implicitList && $student->{tree}{open} ne '') {
1080 @student = ($student);
1081 } else {
1077 @student = Value::List->splitFormula($student,$ans); 1082 @student = Value::List->splitFormula($student,$ans);
1078 $sOpen = $student->{tree}{open}; $sClose = $student->{tree}{close}; 1083 $sOpen = $student->{tree}{open}; $sClose = $student->{tree}{close};
1084 }
1079 } elsif ($student->class ne 'Formula' && $student->class eq $self->type) { 1085 } elsif ($student->class ne 'Formula' && $student->class eq $self->type) {
1086 if ($implicitList && $student->{open} ne '') {
1087 @student = ($student);
1088 } else {
1080 @student = @{$student->{data}}; 1089 @student = @{$student->{data}};
1081 $sOpen = $student->{open}; $sClose = $student->{close}; 1090 $sOpen = $student->{open}; $sClose = $student->{close};
1091 }
1082 } 1092 }
1083 return if $ans->{split_error}; 1093 return if $ans->{split_error};
1084 # 1094 #
1085 # Check for parenthesis match 1095 # Check for parenthesis match
1086 # 1096 #

Legend:
Removed from v.3868  
changed lines
  Added in v.3869

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9