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

Diff of /trunk/pg/lib/PGcore.pm

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

Revision 6279 Revision 6280
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: pg/lib/PGcore.pm,v 1.5 2010/05/25 22:22:27 gage Exp $ 4# $CVSHeader: pg/lib/PGcore.pm,v 1.6 2010/05/25 22:47:52 gage Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
81 unlabeled_answer_eval_count => 0, 81 unlabeled_answer_eval_count => 0,
82 KEPT_EXTRA_ANSWERS => [], 82 KEPT_EXTRA_ANSWERS => [],
83 ANSWER_PREFIX => 'AnSwEr', 83 ANSWER_PREFIX => 'AnSwEr',
84 ARRAY_PREFIX => 'ArRaY', 84 ARRAY_PREFIX => 'ArRaY',
85 vec_num => 0, # for distinguishing matrices 85 vec_num => 0, # for distinguishing matrices
86 QUIZ_PREFIX => '', 86 QUIZ_PREFIX => $envir->{QUIZ_PREFIX},
87 SECTION_PREFIX => '', # might be used for sequential (compound) questions? 87 SECTION_PREFIX => '', # might be used for sequential (compound) questions?
88 88
89 PG_ACTIVE => 1, # turn to zero to stop processing 89 PG_ACTIVE => 1, # turn to zero to stop processing
90 submittedAnswers => 0, # have any answers been submitted? is this the first time this session? 90 submittedAnswers => 0, # have any answers been submitted? is this the first time this session?
91 PG_session_persistence_hash =>{}, # stores data from one invoction of the session to the next. 91 PG_session_persistence_hash =>{}, # stores data from one invoction of the session to the next.
285sub LABELED_ANS{ 285sub LABELED_ANS{
286 my $self = shift; 286 my $self = shift;
287 my @in = @_; 287 my @in = @_;
288 while (@in ) { 288 while (@in ) {
289 my $label = shift @in; 289 my $label = shift @in;
290 $label = join("", $self->{QUIZ_PREFIX}, $self->{SECTION_PREFIX}, $label); 290 #$label = join("", $self->{QUIZ_PREFIX}, $self->{SECTION_PREFIX}, $label);
291 my $ans_eval = shift @in; 291 my $ans_eval = shift @in;
292 $self->WARN("<BR><B>Error in LABELED_ANS:|$label|</B> 292 $self->WARN("<BR><B>Error in LABELED_ANS:|$label|</B>
293 -- inputs must be references to AnswerEvaluator objects or subroutines<BR>") 293 -- inputs must be references to AnswerEvaluator objects or subroutines<BR>")
294 unless ref($ans_eval) =~ /CODE/ or ref($ans_eval) =~ /AnswerEvaluator/ ; 294 unless ref($ans_eval) =~ /CODE/ or ref($ans_eval) =~ /AnswerEvaluator/ ;
295 if (defined($self->{PG_ANSWERS_HASH}->{$label}) ){ 295 if (defined($self->{PG_ANSWERS_HASH}->{$label}) ){

Legend:
Removed from v.6279  
changed lines
  Added in v.6280

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9