[system] / trunk / pg / macros / PG.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PG.pl

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

Revision 6279 Revision 6280
98sub HEADER_TEXT { 98sub HEADER_TEXT {
99 $PG->HEADER_TEXT(@_); 99 $PG->HEADER_TEXT(@_);
100} 100}
101 101
102sub LABELED_ANS { 102sub LABELED_ANS {
103 my @in = @_;
104 my @out = ();
105 #prepend labels with the quiz and section prefixes.
106 while (@in ) {
107 my $label = shift @in;
108 $label = join("", $self->{QUIZ_PREFIX}, $self->{SECTION_PREFIX}, $label);
109 $ans_eval = shift @in;
110 push @out, $label, $ans_eval;
111 }
103 $PG->LABELED_ANS(@_); # returns pointer to the labeled answer group 112 pus$PG->LABELED_ANS(@out); # returns pointer to the labeled answer group
104} 113}
105 114
106sub NAMED_ANS { 115sub NAMED_ANS {
107 $PG->LABELED_ANS(@_); # returns pointer to the labeled answer group 116 &LABELED_ANS(@_); # returns pointer to the labeled answer group
108} 117}
109 118
110sub ANS { 119sub ANS {
111 #warn "using PGnew for ANS"; 120 #warn "using PGnew for ANS";
112 $PG->ANS(@_); # returns pointer to the labeled answer group 121 $PG->ANS(@_); # returns pointer to the labeled answer group
549__END__ 558__END__
550 559
551################################################################################ 560################################################################################
552# WeBWorK Online Homework Delivery System 561# WeBWorK Online Homework Delivery System
553# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ 562# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
554# $CVSHeader: pg/macros/PG.pl,v 1.44 2010/05/14 16:53:28 gage Exp $ 563# $CVSHeader: pg/macros/PG.pl,v 1.45 2010/05/15 19:38:49 gage Exp $
555# 564#
556# This program is free software; you can redistribute it and/or modify it under 565# This program is free software; you can redistribute it and/or modify it under
557# the terms of either: (a) the GNU General Public License as published by the 566# the terms of either: (a) the GNU General Public License as published by the
558# Free Software Foundation; either version 2, or (at your option) any later 567# Free Software Foundation; either version 2, or (at your option) any later
559# version, or (b) the "Artistic License" which comes with this package. 568# version, or (b) the "Artistic License" which comes with this package.

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9