Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv17749/mod/math_assignment
Modified Files:
pdfgen.php
Log Message:
Changed pdfgen.php to output pdf directly again. This time I think it should work, even with IE.
Index: pdfgen.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/pdfgen.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pdfgen.php 17 Sep 2003 17:13:09 -0000 1.3
--- pdfgen.php 18 Sep 2003 20:15:12 -0000 1.4
***************
*** 178,186 ****
// output of pdf
! /*
if ($file = fopen("temp.pdf", "rb")) { // the 'b' is for compatibility with Windoze
// tell the browser that it is pdf
header("Content-type: application/pdf");
fpassthru($file); // chuck all the data direct to the browser and close the handle
--- 178,190 ----
// output of pdf
!
if ($file = fopen("temp.pdf", "rb")) { // the 'b' is for compatibility with Windoze
// tell the browser that it is pdf
header("Content-type: application/pdf");
+ if ($solutions)
+ header("Content-disposition: inline; filename=solutions.pdf");
+ else
+ header("Content-disposition: inline; filename=problems.pdf");
fpassthru($file); // chuck all the data direct to the browser and close the handle
***************
*** 189,195 ****
error("It didn't work!"); // error message
}
- */
-
- redirect("temp.pdf");
?>
--- 193,196 ----
|