| 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/Problem.pm,v 1.145 2004/06/25 00:09:18 toenail Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.146 2004/06/26 00:00:01 jj 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. |
| … | |
… | |
| 33 | use WeBWorK::PG::IO; |
33 | use WeBWorK::PG::IO; |
| 34 | use WeBWorK::Utils qw(writeLog writeCourseLog encodeAnswers decodeAnswers ref2string makeTempDirectory); |
34 | use WeBWorK::Utils qw(writeLog writeCourseLog encodeAnswers decodeAnswers ref2string makeTempDirectory); |
| 35 | use WeBWorK::DB::Utils qw(global2user user2global findDefaults); |
35 | use WeBWorK::DB::Utils qw(global2user user2global findDefaults); |
| 36 | use WeBWorK::Timing; |
36 | use WeBWorK::Timing; |
| 37 | |
37 | |
| 38 | use WeBWorK::Utils::Tasks qw(fake_set fake_problem print_dvipng_script); |
38 | use WeBWorK::Utils::Tasks qw(fake_set fake_problem); |
| 39 | |
39 | |
| 40 | ############################################################ |
40 | ############################################################ |
| 41 | # |
41 | # |
| 42 | # user |
42 | # user |
| 43 | # effectiveUser |
43 | # effectiveUser |
| … | |
… | |
| 732 | -label=>"Check Answers") |
732 | -label=>"Check Answers") |
| 733 | : ""), |
733 | : ""), |
| 734 | ); |
734 | ); |
| 735 | print CGI::end_div(); |
735 | print CGI::end_div(); |
| 736 | |
736 | |
| 737 | # if the mode is not dvipng, this won't do anything |
|
|
| 738 | my $dvipng_align = $ce->{pg}->{renderers}->{dvipng_align}; |
|
|
| 739 | print_dvipng_script($pg->{translator}->{envir}->{imagegen}) |
|
|
| 740 | if ($dvipng_align and $dvipng_align eq 'mysql'); |
|
|
| 741 | |
|
|
| 742 | print CGI::start_div({class=>"scoreSummary"}); |
737 | print CGI::start_div({class=>"scoreSummary"}); |
| 743 | |
738 | |
| 744 | # score summary |
739 | # score summary |
| 745 | my $attempts = $problem->num_correct + $problem->num_incorrect; |
740 | my $attempts = $problem->num_correct + $problem->num_incorrect; |
| 746 | my $attemptsNoun = $attempts != 1 ? "times" : "time"; |
741 | my $attemptsNoun = $attempts != 1 ? "times" : "time"; |
| … | |
… | |
| 907 | dvipng => $ce->{externalPrograms}->{dvipng}, |
902 | dvipng => $ce->{externalPrograms}->{dvipng}, |
| 908 | useCache => 1, |
903 | useCache => 1, |
| 909 | cacheDir => $ce->{webworkDirs}->{equationCache}, |
904 | cacheDir => $ce->{webworkDirs}->{equationCache}, |
| 910 | cacheURL => $ce->{webworkURLs}->{equationCache}, |
905 | cacheURL => $ce->{webworkURLs}->{equationCache}, |
| 911 | cacheDB => $ce->{webworkFiles}->{equationCacheDB}, |
906 | cacheDB => $ce->{webworkFiles}->{equationCacheDB}, |
|
|
907 | dvipng_align => $ce->{pg}->{renderers}->{dvipng_align}, |
|
|
908 | dvipng_depth_db => $ce->{pg}->{renderers}->{dvipng_depth_db}, |
| 912 | ); |
909 | ); |
| 913 | |
910 | |
| 914 | my $header; |
911 | my $header; |
| 915 | #$header .= CGI::th("Part"); |
912 | #$header .= CGI::th("Part"); |
| 916 | $header .= $showAttemptAnswers ? CGI::th("Entered") : ""; |
913 | $header .= $showAttemptAnswers ? CGI::th("Entered") : ""; |