| … | |
… | |
| 62 | unless (@sets) { |
62 | unless (@sets) { |
| 63 | print CGI::p("No problem sets were specified."); |
63 | print CGI::p("No problem sets were specified."); |
| 64 | return OK; |
64 | return OK; |
| 65 | } |
65 | } |
| 66 | |
66 | |
|
|
67 | #print CGI::pre($self->getMultiSetTeX(@sets)); |
|
|
68 | #return ""; |
|
|
69 | |
| 67 | print CGI::p("Generating your hardcopy..."); |
70 | print CGI::p("Generating your hardcopy..."); |
| 68 | my $url = $self->makeHardcopy(@sets); |
71 | my $url = $self->makeHardcopy(@sets); |
| 69 | if ($url) { |
72 | if ($url) { |
| 70 | print CGI::p("Ok, your hardcopy is ready. Click the following link to download it."); |
73 | print CGI::p("Ok, your hardcopy is ready. Click the following link to download it."); |
| 71 | print CGI::p({-align=>"center"}, |
74 | print CGI::p({-align=>"center"}, |
| … | |
… | |
| 117 | |
120 | |
| 118 | # create a temporary directory for tex to shit in |
121 | # create a temporary directory for tex to shit in |
| 119 | my $wd = tempdir("webwork-hardcopy-XXXXXXXX", TMPDIR => 1); |
122 | my $wd = tempdir("webwork-hardcopy-XXXXXXXX", TMPDIR => 1); |
| 120 | my $texFile = "$wd/hardcopy.tex"; |
123 | my $texFile = "$wd/hardcopy.tex"; |
| 121 | my $pdfFile = "$wd/hardcopy.pdf"; |
124 | my $pdfFile = "$wd/hardcopy.pdf"; |
|
|
125 | my $logFile = "$wd/hardcopy.log"; |
| 122 | |
126 | |
| 123 | # write the tex file |
127 | # write the tex file |
| 124 | local *TEX; |
128 | local *TEX; |
| 125 | open TEX, ">", $texFile; |
129 | open TEX, ">", $texFile; |
| 126 | print TEX $tex; |
130 | print TEX $tex; |