[system] / trunk / pg / lib / WeBWorK / PG / Translator.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/WeBWorK/PG/Translator.pm

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

Revision 6386 Revision 6387
163 PG_PROBLEM_TEXT_ARRAY_REF => [], 163 PG_PROBLEM_TEXT_ARRAY_REF => [],
164 PG_PROBLEM_TEXT_REF => 0, 164 PG_PROBLEM_TEXT_REF => 0,
165 PG_HEADER_TEXT_REF => 0, 165 PG_HEADER_TEXT_REF => 0,
166 PG_ANSWER_HASH_REF => {}, 166 PG_ANSWER_HASH_REF => {},
167 PG_FLAGS_REF => {}, 167 PG_FLAGS_REF => {},
168 rh_pgcore => undef, # ref to PGcore object
168 safe => $safe_cmpt, 169 safe => $safe_cmpt,
169 safe_compartment_name => $safe_cmpt->root, 170 safe_compartment_name => $safe_cmpt->root,
170 errors => "", 171 errors => "",
171 source => "", 172 source => "",
172 rh_correct_answers => {}, 173 rh_correct_answers => {},
949# This section could use some more error messages. In particular if a problem doesn't produce the right output, the user needs 950# This section could use some more error messages. In particular if a problem doesn't produce the right output, the user needs
950# information about which problem was at fault. 951# information about which problem was at fault.
951# 952#
952# 953#
953 954
955#################
956# FIXME The various warning message tracks are still being sorted out
957# WARNING and DEBUG tracks are being handled elsewhere (in Problem.pm?)
958#################
954 $self->{errors} .= $@; 959 $self->{errors} .= $@;
960
961
955# $self->{errors}.=join(CGI::br(), @{$PGcore->{flags}->{WARNING_messages}} ); 962# $self->{errors}.=join(CGI::br(), @{$PGcore->{flags}->{WARNING_messages}} );
956# $self->{errors}.=join(CGI::br(), @{$PGcore->{flags}->{DEBUG_messages }} ); 963# $self->{errors}.=join(CGI::br(), @{$PGcore->{flags}->{DEBUG_messages }} );
964#######################################################################
965
957# push(@PROBLEM_TEXT_OUTPUT , split(/(\n)/,$$PG_PROBLEM_TEXT_REF) ) if defined($$PG_PROBLEM_TEXT_REF ); 966# push(@PROBLEM_TEXT_OUTPUT , split(/(\n)/,$$PG_PROBLEM_TEXT_REF) ) if defined($$PG_PROBLEM_TEXT_REF );
958 push(@PROBLEM_TEXT_OUTPUT , split(/^/,$$PG_PROBLEM_TEXT_REF) ) if ref($PG_PROBLEM_TEXT_REF ) eq 'SCALAR'; 967 push(@PROBLEM_TEXT_OUTPUT , split(/^/,$$PG_PROBLEM_TEXT_REF) ) if ref($PG_PROBLEM_TEXT_REF ) eq 'SCALAR';
959 ## This is better than using defined($$PG_PROBLEM_TEXT_REF) 968 ## This is better than using defined($$PG_PROBLEM_TEXT_REF)
960 ## Because more pleasant feedback is given 969 ## Because more pleasant feedback is given
961 ## when the problem doesn't render. 970 ## when the problem doesn't render.
1240 local %rf_options = @_; 1249 local %rf_options = @_;
1241 local $rf_grader = $self->{rf_problem_grader}; 1250 local $rf_grader = $self->{rf_problem_grader};
1242 local $rh_answers = $self->{rh_evaluated_answers}; 1251 local $rh_answers = $self->{rh_evaluated_answers};
1243 local $rh_state = $self->{rh_problem_state}; 1252 local $rh_state = $self->{rh_problem_state};
1244 $self->{safe}->share('$rf_grader','$rh_answers','$rh_state','%rf_options'); 1253 $self->{safe}->share('$rf_grader','$rh_answers','$rh_state','%rf_options');
1254############################################
1255#
1256# FIXME
1257# warning messages are not being transmitted from this evaluation
1258# ??????
1259############################################
1260
1245 ($self->{rh_problem_result},$self->{rh_problem_state}) = 1261 ($self->{rh_problem_result},$self->{rh_problem_state}) =
1246 $self->{safe}->reval('&{$rf_grader}($rh_answers,$rh_state,%rf_options)'); 1262 $self->{safe}->reval('&{$rf_grader}($rh_answers,$rh_state,%rf_options)');
1247 use strict; 1263 use strict;
1248 die $@ if $@; 1264 die $@ if $@;
1249 ($self->{rh_problem_result}, $self->{rh_problem_state}); 1265 ($self->{rh_problem_result}, $self->{rh_problem_state});

Legend:
Removed from v.6386  
changed lines
  Added in v.6387

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9