[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 6296 Revision 6346
352 my @in = @_; 352 my @in = @_;
353 while (@in ) { 353 while (@in ) {
354 my $label = shift @in; 354 my $label = shift @in;
355 #$label = join("", $self->{QUIZ_PREFIX}, $self->{SECTION_PREFIX}, $label); 355 #$label = join("", $self->{QUIZ_PREFIX}, $self->{SECTION_PREFIX}, $label);
356 my $ans_eval = shift @in; 356 my $ans_eval = shift @in;
357 $self->WARN("<BR><B>Error in LABELED_ANS:|$label|</B> 357 $self->warning_message("<BR><B>Error in LABELED_ANS:|$label|</B>
358 -- inputs must be references to AnswerEvaluator objects or subroutines<BR>") 358 -- inputs must be references to AnswerEvaluator objects or subroutines<BR>")
359 unless ref($ans_eval) =~ /CODE/ or ref($ans_eval) =~ /AnswerEvaluator/ ; 359 unless ref($ans_eval) =~ /CODE/ or ref($ans_eval) =~ /AnswerEvaluator/ ;
360 if (defined($self->{PG_ANSWERS_HASH}->{$label}) ){ 360 if (defined($self->{PG_ANSWERS_HASH}->{$label}) ){
361 $self->{PG_ANSWERS_HASH}->{$label}->insert(ans_label => $label, ans_eval => $ans_eval, active=>$self->{PG_ACTIVE}); 361 $self->{PG_ANSWERS_HASH}->{$label}->insert(ans_label => $label, ans_eval => $ans_eval, active=>$self->{PG_ACTIVE});
362 } else { 362 } else {
509 my @response_list = @_; 509 my @response_list = @_;
510 my $answer_group = $self->{PG_ANSWERS_HASH}->{$label}; 510 my $answer_group = $self->{PG_ANSWERS_HASH}->{$label};
511 if (ref($answer_group) =~/PGanswergroup/) { 511 if (ref($answer_group) =~/PGanswergroup/) {
512 $answer_group->append_responses(@response_list); 512 $answer_group->append_responses(@response_list);
513 } else { 513 } else {
514 $self->WARN("The answer |$label| has not yet been defined, you cannot extend it.",caller() ); 514 $self->warning_message("The answer |$label| has not yet been defined, you cannot extend it.",caller() );
515 515
516 } 516 }
517 $label; 517 $label;
518} 518}
519sub record_unlabeled_ans_name { 519sub record_unlabeled_ans_name {
598} 598}
599sub get_debug_messages { 599sub get_debug_messages {
600 my $self = shift; 600 my $self = shift;
601 $self->{flags}->{DEBUG_messages}; 601 $self->{flags}->{DEBUG_messages};
602} 602}
603sub warning_message {
604 my $self = shift;
605 my @str = @_;
606 push @{$self->{flags}->{WARNING_messages}}, @str;
607}
608sub get_warning_messages {
609 my $self = shift;
610 $self->{flags}->{WARNING_messages};
611}
603 612
604sub internal_debug_message { 613sub internal_debug_message {
605 my $self = shift; 614 my $self = shift;
606 my @str = @_; 615 my @str = @_;
607 push @{$internal_debug_messages}, @str; 616 push @{$internal_debug_messages}, @str;
617 626
618sub DESTROY { 627sub DESTROY {
619 # doing nothing about destruction, hope that isn't dangerous 628 # doing nothing about destruction, hope that isn't dangerous
620} 629}
621 630
622sub WARN { 631# sub WARN {
623 warn(@_); 632# warn(@_);
624} 633# }
625 634
626 635
627# This creates on the fly graphs 636# This creates on the fly graphs
628 637
629=head2 insertGraph 638=head2 insertGraph

Legend:
Removed from v.6296  
changed lines
  Added in v.6346

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9