[system] / branches / gage_dev / webwork2 / lib / WeBWorK / ContentGenerator / Hardcopy.pm Repository:
ViewVC logotype

Diff of /branches/gage_dev/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm

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

Revision 3668 Revision 3700
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Hardcopy.pm,v 1.65 2005/09/29 01:25:20 gage Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm,v 1.66 2005/09/29 17:41:09 apizer 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.
811 $self->{at_least_one_problem_rendered_without_error} = 1; 811 $self->{at_least_one_problem_rendered_without_error} = 1;
812 812
813 print $FH $pg->{body_text}; 813 print $FH $pg->{body_text};
814 814
815 # write the list of correct answers is appropriate 815 # write the list of correct answers is appropriate
816 my @ans_entry_order = @{$pg->{flags}->{ANSWER_ENTRY_ORDER}};
816 if ($showCorrectAnswers && $MergedProblem->problem_id != 0) { 817 if ($showCorrectAnswers && $MergedProblem->problem_id != 0 && @ans_entry_order) {
817 my $correctTeX = "\\par{\\small{\\it Correct Answers:}\n" 818 my $correctTeX = "\\par{\\small{\\it Correct Answers:}\n"
818 . "\\vspace{-\\parskip}\\begin{itemize}\n"; 819 . "\\vspace{-\\parskip}\\begin{itemize}\n";
819 820
820 foreach my $ansName (@{$pg->{flags}->{ANSWER_ENTRY_ORDER}}) { 821 foreach my $ansName (@ans_entry_order) {
821 my $correctAnswer = $pg->{answers}->{$ansName}->{correct_ans}; 822 my $correctAnswer = $pg->{answers}->{$ansName}->{correct_ans};
822 $correctTeX .= "\\item\\begin{verbatim}$correctAnswer\\end{verbatim}\n"; 823 $correctTeX .= "\\item\\begin{verbatim}$correctAnswer\\end{verbatim}\n";
823 # FIXME: What about vectors (where TeX will complain about < and > outside of math mode)? 824 # FIXME: What about vectors (where TeX will complain about < and > outside of math mode)?
824 } 825 }
825 826

Legend:
Removed from v.3668  
changed lines
  Added in v.3700

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9